public class AvroPojoDatasetStoreWriter<T> extends AbstractDatasetStoreWriter<T,T>
DataStoreWriter
for writing Datasets using the Avro format.Constructor and Description |
---|
AvroPojoDatasetStoreWriter(java.lang.Class<T> entityClass,
DatasetRepositoryFactory datasetRepositoryFactory)
Instantiates a new
DataStoreWriter for writing Avro records to a org.kitesdk.data.Dataset . |
AvroPojoDatasetStoreWriter(java.lang.Class<T> entityClass,
DatasetRepositoryFactory datasetRepositoryFactory,
DatasetDefinition datasetDefinition)
Instantiates a new
DataStoreWriter for writing Avro records to a org.kitesdk.data.Dataset . |
Modifier and Type | Method and Description |
---|---|
protected T |
convertEntity(T entity)
Convert entity to be written into a entity used
by a writer.
|
protected org.kitesdk.data.DatasetWriter<T> |
createWriter()
Creates a
DatasetWriter . |
void |
write(T entity)
Write an entity.
|
close, flush, getDatasetDefinition, getDatasetRepositoryFactory, getEntityClass, handleTimeout
doStart, doStop, onInit, resetIdleTimeout, setCloseTimeout, setIdleTimeout
afterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stop
public AvroPojoDatasetStoreWriter(java.lang.Class<T> entityClass, DatasetRepositoryFactory datasetRepositoryFactory)
DataStoreWriter
for writing Avro records to a org.kitesdk.data.Dataset
.entityClass
- the Class
that the writer will write to the DatasetdatasetRepositoryFactory
- the DatasetRepositoryFactory
to be used for the writerpublic AvroPojoDatasetStoreWriter(java.lang.Class<T> entityClass, DatasetRepositoryFactory datasetRepositoryFactory, DatasetDefinition datasetDefinition)
DataStoreWriter
for writing Avro records to a org.kitesdk.data.Dataset
.entityClass
- the Class
that the writer will write to the DatasetdatasetRepositoryFactory
- the DatasetRepositoryFactory
to be used for the writerdatasetDefinition
- the DatasetDefinition
to be used for the writerpublic void write(T entity) throws java.io.IOException
DataWriter
write
in interface DataWriter<T>
write
in class AbstractDatasetStoreWriter<T,T>
entity
- the entity to writejava.io.IOException
- if an I/O error occursprotected org.kitesdk.data.DatasetWriter<T> createWriter()
AbstractDatasetStoreWriter
DatasetWriter
.createWriter
in class AbstractDatasetStoreWriter<T,T>
protected T convertEntity(T entity)
AbstractDatasetStoreWriter
convertEntity
in class AbstractDatasetStoreWriter<T,T>
entity
- the entity