T
- the type of entity to writepublic class ParquetDatasetStoreWriter<T> extends AbstractDatasetStoreWriter<T,org.apache.avro.generic.GenericRecord>
DataStoreWriter
for writing Datasets using the Parquet format.Modifier and Type | Field and Description |
---|---|
protected org.apache.avro.Schema |
schema |
Constructor and Description |
---|
ParquetDatasetStoreWriter(java.lang.Class<T> entityClass,
DatasetRepositoryFactory datasetRepositoryFactory)
Instantiates a new
DataStoreWriter for writing Parquet records to a org.kitesdk.data.Dataset . |
ParquetDatasetStoreWriter(java.lang.Class<T> entityClass,
DatasetRepositoryFactory datasetRepositoryFactory,
DatasetDefinition datasetDefinition)
Instantiates a new
DataStoreWriter for writing Parquet records to a org.kitesdk.data.Dataset . |
Modifier and Type | Method and Description |
---|---|
protected org.apache.avro.generic.GenericRecord |
convertEntity(T entity)
Convert entity to be written into a entity used
by a writer.
|
protected org.kitesdk.data.DatasetWriter<org.apache.avro.generic.GenericRecord> |
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 ParquetDatasetStoreWriter(java.lang.Class<T> entityClass, DatasetRepositoryFactory datasetRepositoryFactory)
DataStoreWriter
for writing Parquet 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 ParquetDatasetStoreWriter(java.lang.Class<T> entityClass, DatasetRepositoryFactory datasetRepositoryFactory, DatasetDefinition datasetDefinition)
DataStoreWriter
for writing Parquet 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,org.apache.avro.generic.GenericRecord>
entity
- the entity to writejava.io.IOException
- if an I/O error occursprotected org.kitesdk.data.DatasetWriter<org.apache.avro.generic.GenericRecord> createWriter()
AbstractDatasetStoreWriter
DatasetWriter
.createWriter
in class AbstractDatasetStoreWriter<T,org.apache.avro.generic.GenericRecord>
protected org.apache.avro.generic.GenericRecord convertEntity(T entity)
AbstractDatasetStoreWriter
convertEntity
in class AbstractDatasetStoreWriter<T,org.apache.avro.generic.GenericRecord>
entity
- the entity