public class WebHdfsPersistWriter extends Object implements StreamsPersistWriter, Flushable, Closeable, DatumStatusCountable
Modifier and Type | Field and Description |
---|---|
protected HdfsWriterConfiguration |
hdfsConfiguration |
protected Queue<StreamsDatum> |
persistQueue |
static String |
STREAMS_ID |
boolean |
terminate |
Constructor and Description |
---|
WebHdfsPersistWriter() |
WebHdfsPersistWriter(HdfsWriterConfiguration hdfsConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
void |
close() |
void |
flush() |
DatumStatusCounter |
getDatumStatusCounter() |
org.apache.hadoop.fs.FileSystem |
getFileSystem()
getFileSystem.
|
String |
getId() |
URI |
getURI()
getURI from hdfsConfiguration.
|
boolean |
isConnected()
isConnected.
|
void |
prepare(Object configurationObject) |
void |
write(StreamsDatum streamsDatum) |
public static final String STREAMS_ID
public boolean terminate
protected volatile Queue<StreamsDatum> persistQueue
protected HdfsWriterConfiguration hdfsConfiguration
public WebHdfsPersistWriter()
public WebHdfsPersistWriter(HdfsWriterConfiguration hdfsConfiguration)
public URI getURI() throws URISyntaxException
URISyntaxException
- URISyntaxExceptionpublic boolean isConnected()
public final org.apache.hadoop.fs.FileSystem getFileSystem()
public String getId()
getId
in interface StreamsOperation
public void write(StreamsDatum streamsDatum)
write
in interface StreamsPersistWriter
public void flush() throws IOException
flush
in interface Flushable
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
public void cleanUp()
cleanUp
in interface StreamsOperation
public DatumStatusCounter getDatumStatusCounter()
getDatumStatusCounter
in interface DatumStatusCountable
Copyright © 2018 The Apache Software Foundation. All rights reserved.