Package com.illumon.iris.importers
Class StandardImporterArguments
java.lang.Object
com.illumon.iris.importers.StandardImporterArguments
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
- Direct Known Subclasses:
BinaryStoreImporter.Arguments
Standard class for importer arguments. Extends StandardArguments to add arguments and capabilities needed for data
import.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StandardImporterArguments
(String namespace, String tableName, String destinationPartitionStr, File destinationDirectory, String partitioningColumn, ImportOutputMode outputMode) protected
StandardImporterArguments
(org.apache.commons.cli.CommandLine commandLine) -
Method Summary
Modifier and TypeMethodDescriptionfinal com.fishlib.base.log.LogOutput
append
(com.fishlib.base.log.LogOutput logOutput) com.fishlib.base.log.LogOutput
appendArguments
(com.fishlib.base.log.LogOutput logOutput) Sub-classes should define their own version of appendArguments, which should almost always invoke the super-class implementation first.String[]
static String
getHelpString
(String importerName, UnaryOperator<org.apache.commons.cli.Options>... extraOptionSuppliers) Construct a help string based on the standard arguments and those of an extending class.static void
Entry point for execution in testing.static <AT extends com.illumon.iris.importers.StandardArguments>
ATparseCommandLine
(String importerName, com.illumon.iris.importers.StandardArguments.ArgumentsConstructor<AT> argumentsConstructor, String[] commandLineArguments, UnaryOperator<org.apache.commons.cli.Options>... extraOptionSuppliers) toString()
-
Field Details
-
namespace
-
tableName
-
-
Constructor Details
-
StandardImporterArguments
protected StandardImporterArguments(@NotNull org.apache.commons.cli.CommandLine commandLine) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
StandardImporterArguments
-
-
Method Details
-
getPartitioningColumnName
-
getDestinationPartitions
-
getDestinationDirectory
-
getImportTableWriterFactory
-
appendArguments
public com.fishlib.base.log.LogOutput appendArguments(@NotNull com.fishlib.base.log.LogOutput logOutput) Sub-classes should define their own version of appendArguments, which should almost always invoke the super-class implementation first.- Parameters:
logOutput
- A LogOutput to append argument names and values to.- Returns:
- The logOutput
-
toString
-
parseCommandLine
@SafeVarargs public static <AT extends com.illumon.iris.importers.StandardArguments> AT parseCommandLine(@NotNull String importerName, @NotNull com.illumon.iris.importers.StandardArguments.ArgumentsConstructor<AT> argumentsConstructor, @NotNull String[] commandLineArguments, @NotNull UnaryOperator<org.apache.commons.cli.Options>... extraOptionSuppliers) -
getHelpString
@SafeVarargs public static String getHelpString(@NotNull String importerName, @NotNull UnaryOperator<org.apache.commons.cli.Options>... extraOptionSuppliers) Construct a help string based on the standard arguments and those of an extending class.- Parameters:
importerName
- The name of the importer implementation classextraOptionSuppliers
- options supplied by extension of StandardImporterArguments.- Returns:
- a string documenting the expected command line arguments
-
main
Entry point for execution in testing.- Parameters:
args
- command line
-
append
public final com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput logOutput) - Specified by:
append
in interfacecom.fishlib.base.log.LogOutputAppendable
-