public class AvroFileDeltaInputWriter extends Object implements DeltaInputWriter<org.apache.avro.generic.GenericRecord>
DeltaInputWriter that writes avro records to the result file.| Modifier and Type | Field and Description |
|---|---|
static String |
AVRO_EXTENSION |
| Constructor and Description |
|---|
AvroFileDeltaInputWriter(org.apache.hadoop.conf.Configuration configuration,
String basePath,
String schemaStr,
Long maxFileSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite()
Check whether more data can/should be written.
|
void |
close() |
DeltaWriteStats |
getDeltaWriteStats()
Return the statistics of data written.
|
org.apache.hadoop.fs.FileSystem |
getFs() |
DeltaInputWriter |
getNewWriter()
Return a new instance of this writer.
|
org.apache.hadoop.fs.Path |
getPath() |
void |
writeData(org.apache.avro.generic.GenericRecord iData)
Generate any type of data.
|
public static final String AVRO_EXTENSION
public AvroFileDeltaInputWriter(org.apache.hadoop.conf.Configuration configuration,
String basePath,
String schemaStr,
Long maxFileSize)
throws IOException
IOExceptionpublic void writeData(org.apache.avro.generic.GenericRecord iData)
throws IOException
DeltaInputWriterwriteData in interface DeltaInputWriter<org.apache.avro.generic.GenericRecord>IOExceptionpublic boolean canWrite()
DeltaInputWritercanWrite in interface DeltaInputWriter<org.apache.avro.generic.GenericRecord>public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic DeltaInputWriter getNewWriter() throws IOException
DeltaInputWritergetNewWriter in interface DeltaInputWriter<org.apache.avro.generic.GenericRecord>IOExceptionpublic org.apache.hadoop.fs.FileSystem getFs()
public org.apache.hadoop.fs.Path getPath()
public DeltaWriteStats getDeltaWriteStats()
DeltaInputWritergetDeltaWriteStats in interface DeltaInputWriter<org.apache.avro.generic.GenericRecord>Copyright © 2023 The Apache Software Foundation. All rights reserved.