public class DefaultDataWriter extends Object implements DataWriter
DataWriter.| Constructor and Description |
|---|
DefaultDataWriter(WorkerContext context,
DatasetContext dsContext) |
| Modifier and Type | Method and Description |
|---|---|
StreamBatchWriter |
createBatchWriter(String stream,
String contentType) |
<T extends Dataset> |
getDataset(String name) |
<T extends Dataset> |
getDataset(String name,
Map<String,String> arguments) |
void |
write(String stream,
ByteBuffer data) |
void |
write(String stream,
StreamEventData data) |
void |
write(String stream,
String data) |
void |
write(String stream,
String data,
Map<String,String> headers) |
void |
writeFile(String stream,
File file,
String contentType) |
public DefaultDataWriter(WorkerContext context, DatasetContext dsContext)
public <T extends Dataset> T getDataset(String name) throws DatasetInstantiationException
getDataset in interface DatasetContextDatasetInstantiationExceptionpublic <T extends Dataset> T getDataset(String name, Map<String,String> arguments) throws DatasetInstantiationException
getDataset in interface DatasetContextDatasetInstantiationExceptionpublic void write(String stream, String data) throws IOException
write in interface StreamWriterIOExceptionpublic void write(String stream, String data, Map<String,String> headers) throws IOException
write in interface StreamWriterIOExceptionpublic void write(String stream, ByteBuffer data) throws IOException
write in interface StreamWriterIOExceptionpublic void write(String stream, StreamEventData data) throws IOException
write in interface StreamWriterIOExceptionpublic void writeFile(String stream, File file, String contentType) throws IOException
writeFile in interface StreamWriterIOExceptionpublic StreamBatchWriter createBatchWriter(String stream, String contentType) throws IOException
createBatchWriter in interface StreamWriterIOExceptionCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.