public class TextFormatPlugin extends EasyFormatPlugin<TextFormatPlugin.TextFormatConfig>
Makes use of the scan framework and the result set loader mechanism to allow tight control of the size of produced batches (as well as to support provided schema.)
| Modifier and Type | Class and Description |
|---|---|
static class |
TextFormatPlugin.TextFormatConfig |
EasyFormatPlugin.EasyFormatConfig, EasyFormatPlugin.EasyFormatConfigBuilder| Modifier and Type | Field and Description |
|---|---|
static String |
COMMENT_CHAR_PROP |
static String |
DELIMITER_PROP |
static String |
HAS_HEADERS_PROP |
static String |
LINE_DELIM_PROP |
static int |
MAX_CHARS_PER_COLUMN |
static int |
MAXIMUM_NUMBER_COLUMNS |
static char |
NULL_CHAR |
static String |
PARSE_UNESCAPED_QUOTES_PROP |
static String |
QUOTE_ESCAPE_PROP |
static String |
QUOTE_PROP |
static String |
SKIP_FIRST_LINE_PROP |
static String |
TEXT_PREFIX |
static String |
TRIM_WHITESPACE_PROP |
static String |
WRITER_OPERATOR_TYPE |
formatConfig| Constructor and Description |
|---|
TextFormatPlugin(String name,
DrillbitContext context,
org.apache.hadoop.conf.Configuration fsConf,
StoragePluginConfig storageConfig) |
TextFormatPlugin(String name,
DrillbitContext context,
org.apache.hadoop.conf.Configuration fsConf,
StoragePluginConfig config,
TextFormatPlugin.TextFormatConfig formatPluginConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected FileScanFramework.FileScanBuilder |
frameworkBuilder(OptionManager options,
EasySubScan scan)
Create the plugin-specific framework that manages the scan.
|
AbstractGroupScan |
getGroupScan(String userName,
FileSelection selection,
List<SchemaPath> columns,
MetadataProviderManager metadataProviderManager) |
AbstractGroupScan |
getGroupScan(String userName,
FileSelection selection,
List<SchemaPath> columns,
OptionManager options,
MetadataProviderManager metadataProviderManager) |
org.apache.drill.exec.store.RecordWriter |
getRecordWriter(FragmentContext context,
EasyWriter writer) |
protected ScanStats |
getScanStats(PlannerSettings settings,
EasyGroupScan scan) |
easyConfig, getConfig, getContext, getFsConf, getGroupScan, getMatcher, getName, getOptimizerRules, getReaderBatch, getReaderOperatorType, getRecordReader, getStatisticsRecordWriter, getStorageConfig, getWriter, getWriterBatch, getWriterOperatorType, initScanBuilder, isBlockSplittable, isCompressible, isStatisticsRecordWriter, newBatchReader, readStatistics, supportsAutoPartitioning, supportsFileImplicitColumns, supportsLimitPushdown, supportsPushDown, supportsRead, supportsStatistics, supportsWrite, useEnhancedScan, writeStatisticsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGroupScanpublic static final int MAXIMUM_NUMBER_COLUMNS
public static final int MAX_CHARS_PER_COLUMN
public static final char NULL_CHAR
public static final String TEXT_PREFIX
public static final String HAS_HEADERS_PROP
public static final String SKIP_FIRST_LINE_PROP
public static final String DELIMITER_PROP
public static final String COMMENT_CHAR_PROP
public static final String QUOTE_PROP
public static final String QUOTE_ESCAPE_PROP
public static final String LINE_DELIM_PROP
public static final String TRIM_WHITESPACE_PROP
public static final String PARSE_UNESCAPED_QUOTES_PROP
public static final String WRITER_OPERATOR_TYPE
public TextFormatPlugin(String name, DrillbitContext context, org.apache.hadoop.conf.Configuration fsConf, StoragePluginConfig storageConfig)
public TextFormatPlugin(String name, DrillbitContext context, org.apache.hadoop.conf.Configuration fsConf, StoragePluginConfig config, TextFormatPlugin.TextFormatConfig formatPluginConfig)
public AbstractGroupScan getGroupScan(String userName, FileSelection selection, List<SchemaPath> columns, MetadataProviderManager metadataProviderManager) throws IOException
getGroupScan in interface FormatPlugingetGroupScan in class EasyFormatPlugin<TextFormatPlugin.TextFormatConfig>IOExceptionpublic AbstractGroupScan getGroupScan(String userName, FileSelection selection, List<SchemaPath> columns, OptionManager options, MetadataProviderManager metadataProviderManager) throws IOException
IOExceptionprotected FileScanFramework.FileScanBuilder frameworkBuilder(OptionManager options, EasySubScan scan) throws ExecutionSetupException
EasyFormatPluginframeworkBuilder in class EasyFormatPlugin<TextFormatPlugin.TextFormatConfig>scan - the physical operation definition for the scan operation. Contains
one or more files to read. (The Easy format plugin works only for files.)ExecutionSetupException - for all setup failurespublic org.apache.drill.exec.store.RecordWriter getRecordWriter(FragmentContext context, EasyWriter writer) throws IOException
getRecordWriter in class EasyFormatPlugin<TextFormatPlugin.TextFormatConfig>IOExceptionprotected ScanStats getScanStats(PlannerSettings settings, EasyGroupScan scan)
getScanStats in class EasyFormatPlugin<TextFormatPlugin.TextFormatConfig>Copyright © 2021 The Apache Software Foundation. All rights reserved.