public class FileMetadataInfoCollector extends Object implements MetadataInfoCollector
MetadataInfoCollector
for file-based tables.Constructor and Description |
---|
FileMetadataInfoCollector(BasicTablesRequests basicRequests,
TableInfo tableInfo,
FormatSelection selection,
PlannerSettings settings,
Supplier<org.apache.calcite.rel.core.TableScan> tableScanSupplier,
List<SchemaPath> interestingColumns,
MetadataType metadataLevel,
int segmentColumnsCount) |
Modifier and Type | Method and Description |
---|---|
List<MetadataInfo> |
getAllMetaToHandle()
Returns list of all metadata info instances which should be handled
either producing analyze or when fetching from the Metastore.
|
static FileSelection |
getExpandedFileSelection(FileSelection fileSelection)
Returns
FileSelection file selection based on specified file selection with expanded file statuses. |
List<MetadataInfo> |
getFilesInfo()
Returns list of files metadata info which should be fetched from the Metastore.
|
static List<org.apache.hadoop.fs.FileStatus> |
getFileStatuses(FileSelection fileSelection,
DrillFileSystem fs)
Returns list of
FileStatus file statuses obtained from specified FileSelection file selection. |
List<MetadataInfo> |
getMetadataToRemove()
Returns list of all metadata info which corresponds to top-level segments and should be removed from the Metastore.
|
org.apache.calcite.rel.core.TableScan |
getPrunedScan()
Returns
TableScan instance which will be used when produced incremental analyze. |
List<MetadataInfo> |
getRowGroupsInfo()
Returns list of row groups metadata info which should be fetched from the Metastore.
|
org.apache.drill.shaded.guava.com.google.common.collect.Multimap<Integer,MetadataInfo> |
getSegmentsInfo()
Returns list of segments metadata info which should be fetched from the Metastore.
|
boolean |
isOutdated()
Returns true if table metadata is outdated.
|
public FileMetadataInfoCollector(BasicTablesRequests basicRequests, TableInfo tableInfo, FormatSelection selection, PlannerSettings settings, Supplier<org.apache.calcite.rel.core.TableScan> tableScanSupplier, List<SchemaPath> interestingColumns, MetadataType metadataLevel, int segmentColumnsCount) throws IOException
IOException
public List<MetadataInfo> getRowGroupsInfo()
MetadataInfoCollector
getRowGroupsInfo
in interface MetadataInfoCollector
public List<MetadataInfo> getFilesInfo()
MetadataInfoCollector
getFilesInfo
in interface MetadataInfoCollector
public org.apache.drill.shaded.guava.com.google.common.collect.Multimap<Integer,MetadataInfo> getSegmentsInfo()
MetadataInfoCollector
getSegmentsInfo
in interface MetadataInfoCollector
public List<MetadataInfo> getAllMetaToHandle()
MetadataInfoCollector
getAllMetaToHandle
in interface MetadataInfoCollector
public List<MetadataInfo> getMetadataToRemove()
MetadataInfoCollector
getMetadataToRemove
in interface MetadataInfoCollector
public org.apache.calcite.rel.core.TableScan getPrunedScan()
MetadataInfoCollector
TableScan
instance which will be used when produced incremental analyze.
Table scan will contain minimal selection required for obtaining correct metadata.getPrunedScan
in interface MetadataInfoCollector
TableScan
instancepublic boolean isOutdated()
MetadataInfoCollector
isOutdated
in interface MetadataInfoCollector
public static List<org.apache.hadoop.fs.FileStatus> getFileStatuses(FileSelection fileSelection, DrillFileSystem fs) throws IOException
FileStatus
file statuses obtained from specified FileSelection
file selection.
Specified file selection may be expanded fully if it wasn't expanded before.fileSelection
- file selectionfs
- file systemFileStatus
file statusesIOException
public static FileSelection getExpandedFileSelection(FileSelection fileSelection) throws IOException
FileSelection
file selection based on specified file selection with expanded file statuses.fileSelection
- file selectionIOException
Copyright © 1970 The Apache Software Foundation. All rights reserved.