Package com.illumon.iris.binarystore
Class MultiPartitionFileManager
java.lang.Object
com.illumon.iris.binarystore.MultiPartitionFileManager
- All Implemented Interfaces:
ChannelManager
,ChannelManagerMultiPartition
ChannelManager implementation for binary log files, using dynamic column partition selection. This implementation creates binary
log files in the format yyyy-MM-dd-date/timestamp based on the supplied column partition values.
-
Constructor Summary
ConstructorsConstructorDescriptionMultiPartitionFileManager
(String baseDirName, String namespace, String tableName, TableIdentifier.NamespaceSet namespaceSet, String internalPartition, ByteBuffer headerBuffer, com.fishlib.io.logger.Logger log) Create a dynamic binary store writer which determines the destination file based on each row's column partition value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Attempt to close all the partitions (files) managed by this MultiPartitionFileManager.void
flush()
This flush implementation is a no-op.getChannel
(String columnPartitionValue) For ChannelManager implementations that support dynamic column partition determination, the channel will be based on a partition determined by the caller.
-
Constructor Details
-
MultiPartitionFileManager
public MultiPartitionFileManager(@NotNull String baseDirName, @NotNull String namespace, @NotNull String tableName, @NotNull TableIdentifier.NamespaceSet namespaceSet, @NotNull String internalPartition, ByteBuffer headerBuffer, com.fishlib.io.logger.Logger log) Create a dynamic binary store writer which determines the destination file based on each row's column partition value.- Parameters:
baseDirName
- the base directory namenamespace
- the namespacetableName
- the table namenamespaceSet
- the namespace setinternalPartition
- the internal partitionheaderBuffer
- the header buffer to be put at the beginning of each new filelog
- Logger instance
-
-
Method Details
-
close
Attempt to close all the partitions (files) managed by this MultiPartitionFileManager. If an IOException occurs on one or more channels, the first one will be rethrown, but the operation will still be attempted on all remaining channels. If an exception occurs that is not an IOException, that exception will be thrown and operations on remaining channels will not be attempted.- Specified by:
close
in interfaceChannelManager
- Throws:
IOException
- from the close calls
-
flush
public void flush()This flush implementation is a no-op.- Specified by:
flush
in interfaceChannelManager
-
getChannel
Description copied from interface:ChannelManagerMultiPartition
For ChannelManager implementations that support dynamic column partition determination, the channel will be based on a partition determined by the caller. Current implementations determine the value for each entry of data being sent.- Specified by:
getChannel
in interfaceChannelManagerMultiPartition
- Parameters:
columnPartitionValue
- the row's column partition value- Returns:
- a non-null, open
GatheringByteChannel
- Throws:
IOException
- if the call encounters an error
-