public class JSONFormatPlugin extends EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
Modifier and Type | Class and Description |
---|---|
static class |
JSONFormatPlugin.JSONFormatConfig |
EasyFormatPlugin.EasyFormatConfig, EasyFormatPlugin.EasyFormatConfigBuilder
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NAME |
static String |
OPERATOR_TYPE |
formatConfig
Constructor and Description |
---|
JSONFormatPlugin(String name,
DrillbitContext context,
org.apache.hadoop.conf.Configuration fsConf,
StoragePluginConfig storageConfig) |
JSONFormatPlugin(String name,
DrillbitContext context,
org.apache.hadoop.conf.Configuration fsConf,
StoragePluginConfig config,
JSONFormatPlugin.JSONFormatConfig formatPluginConfig) |
Modifier and Type | Method and Description |
---|---|
String |
getReaderOperatorType() |
RecordReader |
getRecordReader(FragmentContext context,
DrillFileSystem dfs,
FileWork fileWork,
List<SchemaPath> columns,
String userName)
Return a record reader for the specific file format, when using the original
ScanBatch scanner. |
RecordWriter |
getRecordWriter(FragmentContext context,
EasyWriter writer) |
StatisticsRecordWriter |
getStatisticsRecordWriter(FragmentContext context,
EasyWriter writer) |
String |
getWriterOperatorType() |
boolean |
isStatisticsRecordWriter(FragmentContext context,
EasyWriter writer) |
DrillStatsTable.TableStatistics |
readStatistics(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path statsTablePath) |
boolean |
supportsPushDown()
Does this plugin support projection push down? That is, can the reader
itself handle the tasks of projecting table columns, creating null
columns for missing table columns, and so on?
|
boolean |
supportsStatistics() |
void |
writeStatistics(DrillStatsTable.TableStatistics statistics,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path statsTablePath) |
easyConfig, frameworkBuilder, getConfig, getContext, getFsConf, getGroupScan, getGroupScan, getMatcher, getName, getOptimizerRules, getReaderBatch, getScanStats, getStorageConfig, getWriter, getWriterBatch, initScanBuilder, isBlockSplittable, isCompressible, newBatchReader, supportsAutoPartitioning, supportsFileImplicitColumns, supportsLimitPushdown, supportsRead, supportsWrite, useEnhancedScan
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGroupScan, getGroupScan, getOptimizerRules
public static final String DEFAULT_NAME
public static final String OPERATOR_TYPE
public JSONFormatPlugin(String name, DrillbitContext context, org.apache.hadoop.conf.Configuration fsConf, StoragePluginConfig storageConfig)
public JSONFormatPlugin(String name, DrillbitContext context, org.apache.hadoop.conf.Configuration fsConf, StoragePluginConfig config, JSONFormatPlugin.JSONFormatConfig formatPluginConfig)
public RecordReader getRecordReader(FragmentContext context, DrillFileSystem dfs, FileWork fileWork, List<SchemaPath> columns, String userName)
EasyFormatPlugin
ScanBatch
scanner.getRecordReader
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
context
- fragment contextdfs
- Drill file systemfileWork
- metadata about the file to be scannedcolumns
- list of projected columns (or may just contain the wildcard)userName
- the name of the user running the querypublic boolean isStatisticsRecordWriter(FragmentContext context, EasyWriter writer)
isStatisticsRecordWriter
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
public StatisticsRecordWriter getStatisticsRecordWriter(FragmentContext context, EasyWriter writer) throws IOException
getStatisticsRecordWriter
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
IOException
public RecordWriter getRecordWriter(FragmentContext context, EasyWriter writer) throws IOException
getRecordWriter
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
IOException
public boolean supportsStatistics()
supportsStatistics
in interface FormatPlugin
supportsStatistics
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
public DrillStatsTable.TableStatistics readStatistics(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path statsTablePath) throws IOException
readStatistics
in interface FormatPlugin
readStatistics
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
IOException
public void writeStatistics(DrillStatsTable.TableStatistics statistics, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path statsTablePath) throws IOException
writeStatistics
in interface FormatPlugin
writeStatistics
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
IOException
public String getReaderOperatorType()
getReaderOperatorType
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
public String getWriterOperatorType()
getWriterOperatorType
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
public boolean supportsPushDown()
EasyFormatPlugin
supportsPushDown
in class EasyFormatPlugin<JSONFormatPlugin.JSONFormatConfig>
true
if the plugin supports projection push-down,
false
if Drill should do the task by adding a project operatorCopyright © 1970 The Apache Software Foundation. All rights reserved.