public class ParquetDataWriter extends IntegrationWriter
DataEndpoint.State
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEY
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZE
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
ParquetDataWriter(File file)
Write parquet data to a file.
|
ParquetDataWriter(OutputFile outputFile)
Write parquet data to an
OutputFile . |
Modifier and Type | Method and Description |
---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException . |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
CompressionCodecName |
getCompressionCodecName()
Indicates the compression used for writing (default UNCOMPRESSED).
|
Configuration |
getConfiguration()
Returns the Parquet configuration parameters.
|
int |
getDefaultBigDecimalScale()
Returns the default scale used when writing BigDecimal values (default 5).
|
RoundingMode |
getRoundingMode()
Indicates the rounding algorithm used for all BigDecimal values (default is
RoundingMode.HALF_UP ). |
MessageType |
getSchema()
Returns the schema used to write the file.
|
boolean |
isDefaulAdjustToUTC()
Deprecated.
|
boolean |
isDefaultAdjustedToUTC()
Indicates if all datetime fields should be marked as AdjustedToUTC.
|
void |
open()
Makes this endpoint ready for reading or writing.
|
ParquetDataWriter |
setCompressionCodecName(CompressionCodecName compressionCodecName)
Indicates the compression used for writing (default UNCOMPRESSED).
|
ParquetDataWriter |
setConfiguration(Configuration configuration)
Sets the Parquet configuration parameters.
|
ParquetDataWriter |
setDefaultAdjustedToUTC(boolean defaultAdjustedToUTC)
Indicates if all datetime fields should be marked as AdjustedToUTC.
|
ParquetDataWriter |
setDefaultAdjustToUTC(boolean defaultAdjustToUTC)
Deprecated.
|
ParquetDataWriter |
setDefaultBigDecimalScale(int defaultBigDecimalScale)
Sets the default scale used when writing BigDecimal values (default 5).
|
ParquetDataWriter |
setRoundingMode(RoundingMode roundingMode)
Indicates the rounding algorithm used for all BigDecimal values (default is
RoundingMode.HALF_UP ). |
ParquetDataWriter |
setSchema(MessageType schema)
Sets the schema used to write the file.
|
protected void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this
DataWriter . |
available, getNestedEndpoint, getNestedWriter, getRootEndpoint, getRootWriter, write
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toString
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
public ParquetDataWriter(File file)
public ParquetDataWriter(OutputFile outputFile)
OutputFile
.outputFile
- - OutputFile with FileSystem.public void open() throws DataException
DataEndpoint
open
in class IntegrationWriter
DataException
protected void writeImpl(Record record) throws Throwable
DataWriter
DataWriter
.writeImpl
in class DataWriter
Throwable
public void close() throws DataException
DataEndpoint
close
in class DataEndpoint
DataException
public MessageType getSchema()
public ParquetDataWriter setSchema(MessageType schema)
public int getDefaultBigDecimalScale()
public ParquetDataWriter setDefaultBigDecimalScale(int defaultBigDecimalScale)
public DataException addExceptionProperties(DataException exception)
Endpoint
DataException
. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties
in class DataWriter
public CompressionCodecName getCompressionCodecName()
public ParquetDataWriter setCompressionCodecName(CompressionCodecName compressionCodecName)
@Deprecated public boolean isDefaulAdjustToUTC()
isDefaultAdjustedToUTC()
@Deprecated public ParquetDataWriter setDefaultAdjustToUTC(boolean defaultAdjustToUTC)
setDefaultAdjustedToUTC(boolean)
public boolean isDefaultAdjustedToUTC()
public ParquetDataWriter setDefaultAdjustedToUTC(boolean defaultAdjustedToUTC)
public RoundingMode getRoundingMode()
RoundingMode.HALF_UP
).public ParquetDataWriter setRoundingMode(RoundingMode roundingMode)
RoundingMode.HALF_UP
).public Configuration getConfiguration()
public ParquetDataWriter setConfiguration(Configuration configuration)