Package com.illumon.iris.importers
Class BaseMergeData
java.lang.Object
com.illumon.iris.importers.BaseMergeData
- Direct Known Subclasses:
MergeIntradayData
,RemergeData
Re-writes an input table to multi-day storage, (merged, partitioned, grouped, and sorted as appropriate). Create
concrete instances via MergeData
TODO: Experiment with sequential reading and splayed writing, instead of the current (reversed) operation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Database
protected final com.fishlib.io.logger.Logger
protected final MergeParameters
-
Constructor Summary
ConstructorsConstructorDescriptionBaseMergeData
(Database db, MergeParameters params, com.fishlib.io.logger.Logger log) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
awaitSyncOperators
(com.fishlib.io.logger.Logger log, String logPrefix, SyncOperator... syncOperators) protected File[]
filterWritablePartitions
(File[] originalWritablePartitions) Filter the input array of candidate writable partitions.static ExecutorService
makeExecutor
(String name, int poolSize) Make a suitableExecutorService
for use in merge processing.final void
merge
(com.fishlib.util.process.FatalErrorReporter fatalErrorReporter, StatusCallback statusCallback) Read, partition, group, sort input data and re-write it into multi-day locations or parquet.
-
Field Details
-
logger
protected final com.fishlib.io.logger.Logger logger -
database
-
params
-
-
Constructor Details
-
BaseMergeData
public BaseMergeData(@Nullable Database db, @NotNull MergeParameters params, @NotNull com.fishlib.io.logger.Logger log)
-
-
Method Details
-
merge
public final void merge(@NotNull com.fishlib.util.process.FatalErrorReporter fatalErrorReporter, @NotNull StatusCallback statusCallback) Read, partition, group, sort input data and re-write it into multi-day locations or parquet.- Parameters:
fatalErrorReporter
- An error reporterstatusCallback
- A callback for statusgetInputData(String, TableDefinition)
-
filterWritablePartitions
Filter the input array of candidate writable partitions. This can be used by an overriding class to merge only a subset of the possible partitions. Partitions removed from the originalWritablePartitions array will not be touched.- Parameters:
originalWritablePartitions
- the list of writable partitions to filter- Returns:
- all partitions for which the merge should continue.
-
awaitJobs
-
awaitSyncOperators
public static void awaitSyncOperators(@NotNull com.fishlib.io.logger.Logger log, @NotNull String logPrefix, @NotNull SyncOperator... syncOperators) -
makeExecutor
Make a suitableExecutorService
for use in merge processing.- Parameters:
name
- The name of the executor to be used in thread namingpoolSize
- The number of threads that will be allowed in the executor (core and maximum)- Returns:
- The new
ExecutorService
-