K - - The incoming Key typeV - - The incoming Value typeHdfsK - - The HDFS Key typeHdfsV - - The HDFS Value typepublic abstract class HdfsAbstractSequenceFileSink<K,V,HdfsK,HdfsV> extends HdfsAbstractSink<K,V> implements Sink<V>
| Modifier and Type | Field and Description |
|---|---|
protected AtomicLong |
counter |
protected org.apache.hadoop.fs.FSDataOutputStream |
hdfsStream |
protected org.apache.hadoop.io.SequenceFile.Writer |
writer |
hdfsSinkConfig, syncThread, unackedRecordscompressionCodecFactory, connectorConfig, hdfsResources| Constructor and Description |
|---|
HdfsAbstractSequenceFileSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
abstract KeyValue<HdfsK,HdfsV> |
convert(KeyValue<K,V> kv) |
protected void |
createWriter() |
protected List<org.apache.hadoop.io.SequenceFile.Writer.Option> |
getOptions() |
protected org.apache.hadoop.io.SequenceFile.Writer |
getWriter() |
void |
write(org.apache.pulsar.functions.api.Record<V> record) |
connectToHdfs, extractKeyValue, getHdfsStream, getOutputStreamBuilder, getPath, launchSyncThread, opencheckHdfsUriForTimeout, getCompressionCodec, getCompressionCodecFactory, getConfiguration, getEncoding, getFileSystem, getFileSystem, getFileSystemAsUser, getUserGroupInformation, resetHDFSResourcesprotected AtomicLong counter
protected org.apache.hadoop.fs.FSDataOutputStream hdfsStream
protected org.apache.hadoop.io.SequenceFile.Writer writer
public void close()
throws Exception
close in interface AutoCloseableclose in class HdfsAbstractSink<K,V>Exceptionprotected void createWriter()
throws IOException
createWriter in class HdfsAbstractSink<K,V>IOExceptionpublic void write(org.apache.pulsar.functions.api.Record<V> record)
protected org.apache.hadoop.io.SequenceFile.Writer getWriter()
throws IOException
IOExceptionprotected List<org.apache.hadoop.io.SequenceFile.Writer.Option> getOptions() throws IllegalArgumentException, IOException
IllegalArgumentExceptionIOExceptionCopyright © 2017–2022 Apache Software Foundation. All rights reserved.