Class DISCommandUtil
java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.DISCommandUtil
Utilities for DIS command channel.
This is shared by ConfigurationTools and Ingesters projects.
Deephaven internal use only, except for consuming the
Deephaven internal use only, except for consuming the
DisCommandResult class as a return value.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DisCommandResult.StatustoStatus(AckMessage.Result ackResult) Convert anAckMessage.Resultto aDisCommandResult.Status.static DisCommandResulttruncateAndDeleteIntradayPartitionImpl(@NotNull com.fishlib.io.logger.Logger userLog, @NotNull com.fishlib.io.logger.Logger sysLog, @NotNull TableIdentifier tableIdentifier, @Nullable String internalPartitionValue, @NotNull String columnPartitionValue, @NotNull Collection<? extends DataImportServiceConfig.DeferredEndpoint> dises, @NotNull TokenFactoryFactory tokenAuthenticationManager) Send a truncate message to all listed DIS endpoints, followed by a delete message if the truncate succeeds.static DisCommandResult.BuildertruncateOrDeleteIntradayPartitionImpl(@NotNull com.fishlib.io.logger.Logger userLog, @NotNull com.fishlib.io.logger.Logger sysLog, @NotNull TableIdentifier tableIdentifier, @Nullable String internalPartitionValue, @NotNull String columnPartitionValue, @NotNull Collection<? extends DataImportServiceConfig.DeferredEndpoint> dises, boolean delete, boolean dryRun, @NotNull TokenFactoryFactory tokenAuthenticationManager) Send a truncate or delete message to all listed DIS endpoints.
-
Constructor Details
-
DISCommandUtil
public DISCommandUtil()
-
-
Method Details
-
toStatus
Convert anAckMessage.Resultto aDisCommandResult.Status.- Parameters:
ackResult- the AckMessage result- Returns:
- the corresponding Status
-
truncateOrDeleteIntradayPartitionImpl
@InternalUseOnly public static DisCommandResult.Builder truncateOrDeleteIntradayPartitionImpl(@NotNull @NotNull com.fishlib.io.logger.Logger userLog, @NotNull @NotNull com.fishlib.io.logger.Logger sysLog, @NotNull @NotNull TableIdentifier tableIdentifier, @Nullable @Nullable String internalPartitionValue, @NotNull @NotNull String columnPartitionValue, @NotNull @NotNull Collection<? extends DataImportServiceConfig.DeferredEndpoint> dises, boolean delete, boolean dryRun, @NotNull @NotNull TokenFactoryFactory tokenAuthenticationManager) Send a truncate or delete message to all listed DIS endpoints.Returns a
DisCommandResult.Builderso callers can add additional entries (e.g. skipped DIS) before building the final immutable result.- Parameters:
userLog- for informational logging to the console/UIsysLog- for logging a process logtableIdentifier- the System table to truncate or deleteinternalPartitionValue- optional internal partition to truncate or delete. Null means "all" internal partitionscolumnPartitionValue- the column partition to truncate or deletedises- collection of dises to which requests will be sentdelete- if false, truncate the location, else delete itdryRun- if true, the DIS will not actually perform the action, but will indicate what locations would have been affected.tokenAuthenticationManager- the TokenFactoryFactory to use for authentication, will be AuthenticationClientManager.getDefault() in most cases- Returns:
- a builder containing the results, ready for additional entries or
DisCommandResult.Builder.build()
-
truncateAndDeleteIntradayPartitionImpl
@InternalUseOnly public static DisCommandResult truncateAndDeleteIntradayPartitionImpl(@NotNull @NotNull com.fishlib.io.logger.Logger userLog, @NotNull @NotNull com.fishlib.io.logger.Logger sysLog, @NotNull @NotNull TableIdentifier tableIdentifier, @Nullable @Nullable String internalPartitionValue, @NotNull @NotNull String columnPartitionValue, @NotNull @NotNull Collection<? extends DataImportServiceConfig.DeferredEndpoint> dises, @NotNull @NotNull TokenFactoryFactory tokenAuthenticationManager) Send a truncate message to all listed DIS endpoints, followed by a delete message if the truncate succeeds.- Parameters:
userLog- for informational loggingsysLog- for logging a process logtableIdentifier- the System table to deleteinternalPartitionValue- optional internal partition value to delete. Null means "all" internal partitionscolumnPartitionValue- the column partition to deletedises- collection of dises to which requests will be senttokenAuthenticationManager- the TokenFactoryFactory to use in authentication, will be AuthenticationClientManager.getDefault() in most cases- Returns:
- the compound result in DisCommandResult
-