Class FileMetadataInfoCollector
java.lang.Object
org.apache.drill.exec.metastore.analyze.FileMetadataInfoCollector
- All Implemented Interfaces:
MetadataInfoCollector
Implementation of
MetadataInfoCollector for file-based tables.-
Constructor Summary
ConstructorsConstructorDescriptionFileMetadataInfoCollector(BasicTablesRequests basicRequests, TableInfo tableInfo, FormatSelection selection, PlannerSettings settings, Supplier<org.apache.calcite.rel.core.TableScan> tableScanSupplier, List<SchemaPath> interestingColumns, MetadataType metadataLevel, int segmentColumnsCount) -
Method Summary
Modifier and TypeMethodDescriptionReturns list of all metadata info instances which should be handled either producing analyze or when fetching from the Metastore.static FileSelectiongetExpandedFileSelection(FileSelection fileSelection) ReturnsFileSelectionfile selection based on specified file selection with expanded file statuses.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 ofFileStatusfile statuses obtained from specifiedFileSelectionfile selection.Returns list of all metadata info which corresponds to top-level segments and should be removed from the Metastore.org.apache.calcite.rel.core.TableScanReturnsTableScaninstance which will be used when produced incremental analyze.Returns list of row groups metadata info which should be fetched from the Metastore.com.google.common.collect.Multimap<Integer, MetadataInfo> Returns list of segments metadata info which should be fetched from the Metastore.booleanReturns true if table metadata is outdated.
-
Constructor Details
-
FileMetadataInfoCollector
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 - Throws:
IOException
-
-
Method Details
-
getRowGroupsInfo
Description copied from interface:MetadataInfoCollectorReturns list of row groups metadata info which should be fetched from the Metastore.- Specified by:
getRowGroupsInfoin interfaceMetadataInfoCollector- Returns:
- list of row groups metadata info
-
getFilesInfo
Description copied from interface:MetadataInfoCollectorReturns list of files metadata info which should be fetched from the Metastore.- Specified by:
getFilesInfoin interfaceMetadataInfoCollector- Returns:
- list of files metadata info
-
getSegmentsInfo
Description copied from interface:MetadataInfoCollectorReturns list of segments metadata info which should be fetched from the Metastore.- Specified by:
getSegmentsInfoin interfaceMetadataInfoCollector- Returns:
- list of segments metadata info
-
getAllMetaToHandle
Description copied from interface:MetadataInfoCollectorReturns list of all metadata info instances which should be handled either producing analyze or when fetching from the Metastore.- Specified by:
getAllMetaToHandlein interfaceMetadataInfoCollector- Returns:
- list of all metadata info
-
getMetadataToRemove
Description copied from interface:MetadataInfoCollectorReturns list of all metadata info which corresponds to top-level segments and should be removed from the Metastore.- Specified by:
getMetadataToRemovein interfaceMetadataInfoCollector- Returns:
- list of all metadata info which should be removed
-
getPrunedScan
public org.apache.calcite.rel.core.TableScan getPrunedScan()Description copied from interface:MetadataInfoCollectorReturnsTableScaninstance which will be used when produced incremental analyze. Table scan will contain minimal selection required for obtaining correct metadata.- Specified by:
getPrunedScanin interfaceMetadataInfoCollector- Returns:
TableScaninstance
-
isOutdated
public boolean isOutdated()Description copied from interface:MetadataInfoCollectorReturns true if table metadata is outdated.- Specified by:
isOutdatedin interfaceMetadataInfoCollector- Returns:
- true if table metadata is outdated
-
getFileStatuses
public static List<org.apache.hadoop.fs.FileStatus> getFileStatuses(FileSelection fileSelection, DrillFileSystem fs) throws IOException Returns list ofFileStatusfile statuses obtained from specifiedFileSelectionfile selection. Specified file selection may be expanded fully if it wasn't expanded before.- Parameters:
fileSelection- file selectionfs- file system- Returns:
- list of
FileStatusfile statuses - Throws:
IOException
-
getExpandedFileSelection
public static FileSelection getExpandedFileSelection(FileSelection fileSelection) throws IOException ReturnsFileSelectionfile selection based on specified file selection with expanded file statuses.- Parameters:
fileSelection- file selection- Returns:
- expanded file selection
- Throws:
IOException
-