Class DISCommandUtil

java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.DISCommandUtil

@InternalUseOnly public class DISCommandUtil extends Object
Utilities for DIS command channel. This is shared by ConfigurationTools and Ingesters projects.
Deephaven internal use only, except for consuming the DisCommandResult class as a return value.
  • Constructor Details

    • DISCommandUtil

      public DISCommandUtil()
  • Method Details

    • toStatus

      public static DisCommandResult.Status toStatus(@NotNull AckMessage.Result ackResult)
      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.Builder so callers can add additional entries (e.g. skipped DIS) before building the final immutable result.

      Parameters:
      userLog - for informational logging to the console/UI
      sysLog - for logging a process log
      tableIdentifier - the System table to truncate or delete
      internalPartitionValue - optional internal partition to truncate or delete. Null means "all" internal partitions
      columnPartitionValue - the column partition to truncate or delete
      dises - collection of dises to which requests will be sent
      delete - if false, truncate the location, else delete it
      dryRun - 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 logging
      sysLog - for logging a process log
      tableIdentifier - the System table to delete
      internalPartitionValue - optional internal partition value to delete. Null means "all" internal partitions
      columnPartitionValue - the column partition to delete
      dises - collection of dises to which requests will be sent
      tokenAuthenticationManager - the TokenFactoryFactory to use in authentication, will be AuthenticationClientManager.getDefault() in most cases
      Returns:
      the compound result in DisCommandResult