Class LogAggregatorServiceBinaryStoreWriterFactory
java.lang.Object
com.illumon.intradaylogger.IntradayLogger.TableWriterFactoryImpl
com.illumon.iris.db.v2.logaggregator.LogAggregatorServiceBinaryStoreWriterFactory
- All Implemented Interfaces:
IntradayLogger.TableWriterFactory
public final class LogAggregatorServiceBinaryStoreWriterFactory
extends IntradayLogger.TableWriterFactoryImpl
Creates a TableWriter that will connect to a Log Aggregator Service. Rows are written to network and not to disk.
-
Method Summary
Modifier and TypeMethodDescriptionbuildWriter(String[] columnNames, SupportedType[] intradayTypes, Class[] columnTypes_notUsed, Object[] typeMetadata, Map<String, Object> constantColumnValues, int applicationVersion) Creates a new table writer.currentDatePartitionFactory(@NotNull com.fishlib.io.logger.Logger log, @NotNull String namespace, @NotNull String tableName, TableIdentifier.NamespaceSet namespaceSet, @NotNull String internalPartition, @Nullable TokenFactoryFactory tokenAuthenticationManager) Construct a LogAggregatorServiceBinaryStoreWriterFactory instance that will create a column partition value based on the current time, and will cycle LogAggregatorService connections if the date changes.dynamicColumnPartitionFactory(@NotNull com.fishlib.io.logger.Logger log, @NotNull String namespace, @NotNull String tableName, TableIdentifier.NamespaceSet namespaceSet, @NotNull String internalPartition, @Nullable TokenFactoryFactory tokenAuthenticationManager) Construct an instance without a column partition value (for dynamic column partition selection).fixedColumnPartitionFactory(@NotNull com.fishlib.io.logger.Logger log, @NotNull String namespace, @NotNull String tableName, TableIdentifier.NamespaceSet namespaceSet, @NotNull String internalPartition, @NotNull String columnPartition, @Nullable TokenFactoryFactory tokenAuthenticationManager) Construct a LogAggregatorServiceBinaryStoreWriterFactory instance that uses the specified column partition value.makeDynamicBufferWriter(@NotNull ByteBuffer header) Builds a MultiPartitionWriter, backed by the LAS, for use with a V2 logger that uses dynamic partitions.makeSingleBufferWriter(@NotNull ByteBuffer header) Builds a SinglePartitionWriter, backed by the LAS, for use with a V2 logger that does not use dynamic partitions.booleanThis must indicate whether or not the TableWriter instances supplied by this factory support dynamic column partition values.Methods inherited from class com.illumon.intradaylogger.IntradayLogger.TableWriterFactoryImpl
buildWriter, buildWriter
-
Method Details
-
dynamicColumnPartitionFactory
public static LogAggregatorServiceBinaryStoreWriterFactory dynamicColumnPartitionFactory(@NotNull @NotNull com.fishlib.io.logger.Logger log, @NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull TableIdentifier.NamespaceSet namespaceSet, @NotNull @NotNull String internalPartition, @Nullable @Nullable TokenFactoryFactory tokenAuthenticationManager) Construct an instance without a column partition value (for dynamic column partition selection).- Parameters:
log- the loggernamespace- the namespace for the tabletableName- the tableName to which this will writenamespaceSet- the NamespaceSetinternalPartition- the internal partition for the locationtokenAuthenticationManager- source for authentication tokens. If null, use AuthenticationClientManager.getDefault().- Returns:
- a LogAggregatorServiceBinaryStoreWriterFactory configured for logger-generated dynamic partitions
-
currentDatePartitionFactory
public static LogAggregatorServiceBinaryStoreWriterFactory currentDatePartitionFactory(@NotNull @NotNull com.fishlib.io.logger.Logger log, @NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull TableIdentifier.NamespaceSet namespaceSet, @NotNull @NotNull String internalPartition, @Nullable @Nullable TokenFactoryFactory tokenAuthenticationManager) Construct a LogAggregatorServiceBinaryStoreWriterFactory instance that will create a column partition value based on the current time, and will cycle LogAggregatorService connections if the date changes.- Parameters:
log- the loggernamespace- the namespace for the tabletableName- the tableName to which this will writenamespaceSet- the NamespaceSetinternalPartition- the internal partition for the locationtokenAuthenticationManager- source for authentication tokens. If null, use AuthenticationClientManager.getDefault().- Returns:
- a LogAggregatorServiceBinaryStoreWriterFactory configure to use the current date as the partition
-
fixedColumnPartitionFactory
public static LogAggregatorServiceBinaryStoreWriterFactory fixedColumnPartitionFactory(@NotNull @NotNull com.fishlib.io.logger.Logger log, @NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull TableIdentifier.NamespaceSet namespaceSet, @NotNull @NotNull String internalPartition, @NotNull @NotNull String columnPartition, @Nullable @Nullable TokenFactoryFactory tokenAuthenticationManager) Construct a LogAggregatorServiceBinaryStoreWriterFactory instance that uses the specified column partition value.- Parameters:
log- the loggernamespace- the namespace for the tabletableName- the tableName to which this will writenamespaceSet- the NamespaceSetinternalPartition- the internal partition for the locationcolumnPartition- the column partition valuetokenAuthenticationManager- source for authentication tokens. If null, use AuthenticationClientManager.getDefault().- Returns:
- a LogAggregatorServiceBinaryStoreWriterFactory using a fixed column partition
-
buildWriter
public TableWriter buildWriter(String[] columnNames, SupportedType[] intradayTypes, Class[] columnTypes_notUsed, Object[] typeMetadata, Map<String, Object> constantColumnValues, int applicationVersion) throws IOExceptionDescription copied from interface:IntradayLogger.TableWriterFactoryCreates a new table writer.- Parameters:
columnNames- column namesintradayTypes- column types for the intraday loggercolumnTypes_notUsed- column types for the tabletypeMetadata- metadata for encoding and decoding a typeconstantColumnValues- values that do not change for each rowapplicationVersion- application version number used to select listener for reading this file- Returns:
- new table writer
- Throws:
IOException- problem creating the table writer
-
makeDynamicBufferWriter
public LogAggregatorWriterMultiPartition makeDynamicBufferWriter(@NotNull @NotNull ByteBuffer header) throws IOException Builds a MultiPartitionWriter, backed by the LAS, for use with a V2 logger that uses dynamic partitions.- Parameters:
header-- Returns:
- a MultiPartitionWriter backed by the LAS
- Throws:
IOException- if the buffer writer could not be created
-
makeSingleBufferWriter
public LogAggregatorWriterStandard makeSingleBufferWriter(@NotNull @NotNull ByteBuffer header) throws IOException Builds a SinglePartitionWriter, backed by the LAS, for use with a V2 logger that does not use dynamic partitions.- Parameters:
header-- Returns:
- a SinglePartitionWriter backed by the LAS
- Throws:
IOException- if the buffer writer could not be created
-
supportsDynamicPartitioning
public boolean supportsDynamicPartitioning()Description copied from interface:IntradayLogger.TableWriterFactoryThis must indicate whether or not the TableWriter instances supplied by this factory support dynamic column partition values. Support of dynamic column partitions means that the underlying writers must be able to determine the column partition values based on each supplied row.- Returns:
- true if the factory supports dynamic column partitions, false otherwise.
-