Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import org.jooq.DSLContext;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Class used to create tables that are required for tracking containers.
Expand All @@ -38,6 +40,8 @@ public class ContainerSchemaDefinition implements ReconSchemaDefinition {

public static final String UNHEALTHY_CONTAINERS_TABLE_NAME =
"UNHEALTHY_CONTAINERS";
private static final Logger LOG =
LoggerFactory.getLogger(ContainerSchemaDefinition.class);

/**
* ENUM describing the allowed container states which can be stored in the
Expand Down Expand Up @@ -68,6 +72,7 @@ public void initializeSchema() throws SQLException {
Connection conn = dataSource.getConnection();
dslContext = DSL.using(conn);
if (!TABLE_EXISTS_CHECK.test(conn, UNHEALTHY_CONTAINERS_TABLE_NAME)) {
LOG.info("UNHEALTHY_CONTAINERS is missing creating new one.");
createUnhealthyContainersTable();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,14 @@ private ReconConstants() {
// For file-size count reprocessing: ensure only one task truncates the table.
public static final AtomicBoolean FILE_SIZE_COUNT_TABLE_TRUNCATED = new AtomicBoolean(false);

public static final AtomicBoolean CONTAINER_KEY_TABLES_TRUNCATED = new AtomicBoolean(false);

/**
* Resets the table-truncated flag for the given tables. This should be called once per reprocess cycle,
* Resets the table truncated flag for the given tables. This should be called once per reprocess cycle,
* for example by the OM task controller, before the tasks run.
*/
public static void resetTableTruncatedFlags() {
FILE_SIZE_COUNT_TABLE_TRUNCATED.set(false);
CONTAINER_KEY_TABLES_TRUNCATED.set(false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
import org.apache.hadoop.ozone.recon.spi.impl.ReconDBProvider;
import org.apache.hadoop.ozone.recon.spi.impl.ReconNamespaceSummaryManagerImpl;
import org.apache.hadoop.ozone.recon.spi.impl.StorageContainerServiceProviderImpl;
import org.apache.hadoop.ozone.recon.tasks.ContainerKeyMapperTask;
import org.apache.hadoop.ozone.recon.tasks.ContainerKeyMapperTaskFSO;
import org.apache.hadoop.ozone.recon.tasks.ContainerKeyMapperTaskOBS;
import org.apache.hadoop.ozone.recon.tasks.FileSizeCountTaskFSO;
import org.apache.hadoop.ozone.recon.tasks.FileSizeCountTaskOBS;
import org.apache.hadoop.ozone.recon.tasks.NSSummaryTask;
Expand Down Expand Up @@ -131,7 +132,8 @@ static class ReconOmTaskBindingModule extends AbstractModule {
protected void configure() {
Multibinder<ReconOmTask> taskBinder =
Multibinder.newSetBinder(binder(), ReconOmTask.class);
taskBinder.addBinding().to(ContainerKeyMapperTask.class);
taskBinder.addBinding().to(ContainerKeyMapperTaskFSO.class);
taskBinder.addBinding().to(ContainerKeyMapperTaskOBS.class);
taskBinder.addBinding().to(FileSizeCountTaskFSO.class);
taskBinder.addBinding().to(FileSizeCountTaskOBS.class);
taskBinder.addBinding().to(OmTableInsightTask.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public final class ReconServerConfigKeys {

public static final String OZONE_RECON_TASK_THREAD_COUNT_KEY =
"ozone.recon.task.thread.count";
public static final int OZONE_RECON_TASK_THREAD_COUNT_DEFAULT = 5;
public static final int OZONE_RECON_TASK_THREAD_COUNT_DEFAULT = 8;

public static final String OZONE_RECON_HTTP_AUTH_CONFIG_PREFIX =
"ozone.recon.http.auth.";
Expand Down
Loading