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
IOExceptionpublic List<MetadataInfo> getRowGroupsInfo()
MetadataInfoCollectorgetRowGroupsInfo in interface MetadataInfoCollectorpublic List<MetadataInfo> getFilesInfo()
MetadataInfoCollectorgetFilesInfo in interface MetadataInfoCollectorpublic org.apache.drill.shaded.guava.com.google.common.collect.Multimap<Integer,MetadataInfo> getSegmentsInfo()
MetadataInfoCollectorgetSegmentsInfo in interface MetadataInfoCollectorpublic List<MetadataInfo> getAllMetaToHandle()
MetadataInfoCollectorgetAllMetaToHandle in interface MetadataInfoCollectorpublic List<MetadataInfo> getMetadataToRemove()
MetadataInfoCollectorgetMetadataToRemove in interface MetadataInfoCollectorpublic org.apache.calcite.rel.core.TableScan getPrunedScan()
MetadataInfoCollectorTableScan instance which will be used when produced incremental analyze.
Table scan will contain minimal selection required for obtaining correct metadata.getPrunedScan in interface MetadataInfoCollectorTableScan instancepublic boolean isOutdated()
MetadataInfoCollectorisOutdated in interface MetadataInfoCollectorpublic 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 statusesIOExceptionpublic static FileSelection getExpandedFileSelection(FileSelection fileSelection) throws IOException
FileSelection file selection based on specified file selection with expanded file statuses.fileSelection - file selectionIOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.