Class OrcPipelineOutput
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.core.FoundationObject
com.northconcepts.datapipeline.foundations.pipeline.PipelineObject
com.northconcepts.datapipeline.foundations.pipeline.PipelineOutput
com.northconcepts.datapipeline.foundations.pipeline.output.FileSinkPipelineOutput
com.northconcepts.datapipeline.orc.output.OrcPipelineOutput
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,DataWriterFactory,JavaCodeGenerator,Serializable
A pipeline output that writes an Apache ORC file to a
FileSink's path using an OrcDataWriter.- See Also:
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
internalId, internalName, log, TIMESTAMP_FORMATFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddConfiguration(String key, String value) Sets the Orc configuration parameters.addConfiguration(Map<String, String> configuration) Sets the Orc configuration parameters.fromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXmlElement(Element pipelineOutputElement) voidgenerateJavaCode(JavaCodeBuilder javaCodeBuilder) Appends Java source code representing this object to the given builder.intIndicates the maximum number of records to buffer when writing ORC data (default 1024).intReturns default precision value for BigDecimal type of values.intIndicates the scale used when writing BigDecimal values (default 10).CompressionKindIndicates the compression used for writing (default NONE).Returns the Orc configuration parameters.getName()Returns a display name for this output, such as the destination's name followed by its format.Indicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP).RowBatchVersionReturnsRowBatchVersionto store ORC data.TypeDescriptionReturns the schema used to write the file.booleanOverwrites the file if true, otherwise, throws an exception if the file already exists.booleanIndicates ifInstants should be used to store datetime values.booleanisUTC()Indicates if datetime values are adjusted to UTC.booleanIndicates whether UUID values are written as strings or bytes.setBatchSize(int batchSize) Indicates the maximum number of records to buffer when writing ORC data (default 1024).setBigDecimalPrecision(int bigDecimalPrecision) Sets default precision value for BigDecimal type of values.setBigDecimalScale(int bigDecimalScale) Indicates the scale used when writing BigDecimal values (default 10).setCompressionKind(CompressionKind compressionKind) Indicates the compression used for writing (default NONE).setFileSink(FileSink fileSink) setOverwrite(boolean overwrite) Overwrites the file if true, otherwise, throws an exception if the file already exists.setRoundingMode(RoundingMode roundingMode) Indicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP).setRowBatchVersion(RowBatchVersion rowBatchVersion) SetsRowBatchVersionto store ORC data.setSchema(TypeDescription schema) Sets the schema used to write the file.setUseTimestampInstant(boolean useTimestampInstant) Indicates ifInstants should be used to store datetime values.voidsetUTC(boolean UTC) Indicates if datetime values are adjusted to UTC.setWriteUuidAsString(boolean writeUuidAsString) Indicates whether UUID values are written as strings or bytes.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.Methods inherited from class com.northconcepts.datapipeline.foundations.pipeline.output.FileSinkPipelineOutput
generateSaveCodeMethods inherited from class com.northconcepts.datapipeline.foundations.pipeline.PipelineOutput
getNestedPipelineOutput, getPipelineOutput, getRootPipelineOutputMethods inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
addExceptionProperties, assertValid, assertValid, clone, exception, exception, exception, getInternalId, getInternalName, resetInternalIdMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties
-
Constructor Details
-
OrcPipelineOutput
public OrcPipelineOutput()
-
-
Method Details
-
getName
Description copied from class:PipelineOutputReturns a display name for this output, such as the destination's name followed by its format.- Overrides:
getNamein classFileSinkPipelineOutput
-
getFileSink
- Specified by:
getFileSinkin classFileSinkPipelineOutput
-
setFileSink
- Specified by:
setFileSinkin classFileSinkPipelineOutput
-
createDataWriter
-
generateJavaCode
Description copied from interface:JavaCodeGeneratorAppends Java source code representing this object to the given builder. -
getSchema
public TypeDescription getSchema()Returns the schema used to write the file. -
setSchema
Sets the schema used to write the file. -
getConfiguration
Returns the Orc configuration parameters. -
addConfiguration
Sets the Orc configuration parameters. -
addConfiguration
Sets the Orc configuration parameters. -
getBatchSize
public int getBatchSize()Indicates the maximum number of records to buffer when writing ORC data (default 1024). -
setBatchSize
Indicates the maximum number of records to buffer when writing ORC data (default 1024). -
isUseTimestampInstant
public boolean isUseTimestampInstant()Indicates ifInstants should be used to store datetime values. -
setUseTimestampInstant
Indicates ifInstants should be used to store datetime values. -
isOverwrite
public boolean isOverwrite()Overwrites the file if true, otherwise, throws an exception if the file already exists. -
setOverwrite
Overwrites the file if true, otherwise, throws an exception if the file already exists. -
isUTC
public boolean isUTC()Indicates if datetime values are adjusted to UTC. -
setUTC
public void setUTC(boolean UTC) Indicates if datetime values are adjusted to UTC. -
isWriteUuidAsString
public boolean isWriteUuidAsString()Indicates whether UUID values are written as strings or bytes. If set to false, UUID values will be written as bytes.
Default value is true.
-
setWriteUuidAsString
Indicates whether UUID values are written as strings or bytes. If set to false, UUID values will be written as bytes.
Default value is true.
-
getRowBatchVersion
public RowBatchVersion getRowBatchVersion()ReturnsRowBatchVersionto store ORC data. precision > TypeDescription.MAX_DECIMAL64_PRECISION (18) then DecimalColumnVector is used instead of Decimal64ColumnVector. -
setRowBatchVersion
SetsRowBatchVersionto store ORC data. If BigDecimal value has precision > TypeDescription.MAX_DECIMAL64_PRECISION (18) then DecimalColumnVector is used instead of Decimal64ColumnVector. -
getBigDecimalPrecision
public int getBigDecimalPrecision()Returns default precision value for BigDecimal type of values. Default value is HiveDecimal.MAX_PRECISION (38). -
setBigDecimalPrecision
Sets default precision value for BigDecimal type of values. Default value is HiveDecimal.MAX_PRECISION (38). -
getBigDecimalScale
public int getBigDecimalScale()Indicates the scale used when writing BigDecimal values (default 10). -
setBigDecimalScale
Indicates the scale used when writing BigDecimal values (default 10). -
getRoundingMode
Indicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP). -
setRoundingMode
Indicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP). -
getCompressionKind
public CompressionKind getCompressionKind()Indicates the compression used for writing (default NONE). -
setCompressionKind
Indicates the compression used for writing (default NONE). -
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classPipelineOutput- Parameters:
source-- Returns:
- this instance.
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException.- Specified by:
toXmlElementin interfaceXmlSerializable- Overrides:
toXmlElementin classPipelineOutput
-
fromXmlElement
-