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 StreamsOperationpublic void write(StreamsDatum streamsDatum)
write in interface StreamsPersistWriterpublic void flush()
throws IOException
flush in interface FlushableIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void prepare(Object configurationObject)
prepare in interface StreamsOperationpublic void cleanUp()
cleanUp in interface StreamsOperationpublic DatumStatusCounter getDatumStatusCounter()
getDatumStatusCounter in interface DatumStatusCountableCopyright © 2018 The Apache Software Foundation. All rights reserved.