public abstract class EasyFormatPlugin<T extends FormatPluginConfig> extends Object implements FormatPlugin
| Modifier and Type | Field and Description |
|---|---|
protected T |
formatConfig |
| Modifier | Constructor and Description |
|---|---|
protected |
EasyFormatPlugin(String name,
DrillbitContext context,
org.apache.hadoop.conf.Configuration fsConf,
StoragePluginConfig storageConfig,
T formatConfig,
boolean readable,
boolean writable,
boolean blockSplittable,
boolean compressible,
List<String> extensions,
String defaultName) |
| Modifier and Type | Method and Description |
|---|---|
T |
getConfig() |
DrillbitContext |
getContext() |
org.apache.hadoop.conf.Configuration |
getFsConf() |
AbstractGroupScan |
getGroupScan(String userName,
FileSelection selection,
List<SchemaPath> columns) |
FormatMatcher |
getMatcher() |
String |
getName() |
Set<StoragePluginOptimizerRule> |
getOptimizerRules() |
abstract int |
getReaderOperatorType() |
abstract RecordReader |
getRecordReader(FragmentContext context,
DrillFileSystem dfs,
FileWork fileWork,
List<SchemaPath> columns,
String userName) |
abstract RecordWriter |
getRecordWriter(FragmentContext context,
EasyWriter writer) |
protected ScanStats |
getScanStats(PlannerSettings settings,
EasyGroupScan scan) |
StoragePluginConfig |
getStorageConfig() |
AbstractWriter |
getWriter(PhysicalOperator child,
String location,
List<String> partitionColumns) |
CloseableRecordBatch |
getWriterBatch(FragmentContext context,
RecordBatch incoming,
EasyWriter writer) |
abstract int |
getWriterOperatorType() |
boolean |
isBlockSplittable()
Whether or not you can split the format based on blocks within file boundaries.
|
boolean |
isCompressible()
Method indicates whether or not this format could also be in a compression container (for example: csv.gz versus csv).
|
boolean |
supportsAutoPartitioning()
Indicates whether this FormatPlugin supports auto-partitioning for CTAS statements
|
abstract boolean |
supportsPushDown() |
boolean |
supportsRead() |
boolean |
supportsWrite() |
protected final T extends FormatPluginConfig formatConfig
protected EasyFormatPlugin(String name, DrillbitContext context, org.apache.hadoop.conf.Configuration fsConf, StoragePluginConfig storageConfig, T formatConfig, boolean readable, boolean writable, boolean blockSplittable, boolean compressible, List<String> extensions, String defaultName)
public org.apache.hadoop.conf.Configuration getFsConf()
getFsConf in interface FormatPluginpublic DrillbitContext getContext()
getContext in interface FormatPluginpublic String getName()
getName in interface FormatPluginpublic abstract boolean supportsPushDown()
public boolean isBlockSplittable()
public boolean isCompressible()
true if it is compressiblepublic abstract RecordReader getRecordReader(FragmentContext context, DrillFileSystem dfs, FileWork fileWork, List<SchemaPath> columns, String userName) throws ExecutionSetupException
ExecutionSetupExceptionpublic abstract RecordWriter getRecordWriter(FragmentContext context, EasyWriter writer) throws IOException
IOExceptionpublic CloseableRecordBatch getWriterBatch(FragmentContext context, RecordBatch incoming, EasyWriter writer) throws ExecutionSetupException
ExecutionSetupExceptionprotected ScanStats getScanStats(PlannerSettings settings, EasyGroupScan scan)
public AbstractWriter getWriter(PhysicalOperator child, String location, List<String> partitionColumns) throws IOException
getWriter in interface FormatPluginIOExceptionpublic AbstractGroupScan getGroupScan(String userName, FileSelection selection, List<SchemaPath> columns) throws IOException
getGroupScan in interface FormatPluginIOExceptionpublic T getConfig()
getConfig in interface FormatPluginpublic StoragePluginConfig getStorageConfig()
getStorageConfig in interface FormatPluginpublic boolean supportsRead()
supportsRead in interface FormatPluginpublic boolean supportsWrite()
supportsWrite in interface FormatPluginpublic boolean supportsAutoPartitioning()
FormatPluginsupportsAutoPartitioning in interface FormatPluginpublic FormatMatcher getMatcher()
getMatcher in interface FormatPluginpublic Set<StoragePluginOptimizerRule> getOptimizerRules()
getOptimizerRules in interface FormatPluginpublic abstract int getReaderOperatorType()
public abstract int getWriterOperatorType()
Copyright © 2017 The Apache Software Foundation. All rights reserved.