/** * Get the blocklet datamap factory to get the detail information of blocklets * * @param table * @return */ private BlockletDetailsFetcher getBlockletDetailsFetcher(CarbonTable table) { TableDataMap blockletMap = getDataMap(table, BlockletDataMapFactory.DATA_MAP_SCHEMA); return (BlockletDetailsFetcher) blockletMap.getDataMapFactory(); }
/** * Clear the invalid segments from all the datamaps of the table * @param carbonTable * @param segments */ public void clearInvalidSegments(CarbonTable carbonTable, List<Segment> segments) throws IOException { getDefaultDataMap(carbonTable).clear(segments); List<TableDataMap> allDataMap = getAllDataMap(carbonTable); for (TableDataMap dataMap: allDataMap) { dataMap.clear(segments); } }
public List<ExtendedBlocklet> prune(DataMapDistributable distributable, List<PartitionSpec> partitionsToPrune) throws IOException { List<DataMap> dataMaps = dataMap.getTableDataMaps(distributable); return dataMap.prune(dataMaps, distributable, expression, partitionsToPrune); }
/** * Method to clear the data maps */ public void clearDataMaps() throws IOException { DataMapStoreManager.getInstance().clearDataMaps(absoluteTableIdentifier); }
private static DataMapSchema getDataMapSchema(String dataMapName) throws IOException, NoSuchDataMapException { return DataMapStoreManager.getInstance().getDataMapSchema(dataMapName); }
public String getSegmentId() { if (segment != null) { return segment.getSegmentNo(); } else { return null; } }
/** * Converts to segment object * @param segmentId * @return */ public static Segment toSegment(String segmentId) { // SegmentId can be combination of segmentNo and segmentFileName. return toSegment(segmentId, null); }
/** * registered in the store manager. * The datamap is created using datamap name, datamap factory class and table identifier. */ // TODO: make it private public TableDataMap createAndRegisterDataMap(CarbonTable table, DataMapSchema dataMapSchema) throws MalformedDataMapCommandException { DataMapFactory dataMapFactory = getDataMapFactoryClass(table, dataMapSchema); return registerDataMap(table, dataMapSchema, dataMapFactory); }
/** * This method set DataMapJob if configured * * @param conf * @throws IOException */ public static void setDataMapJobIfConfigured(Configuration conf) throws IOException { String className = "org.apache.carbondata.spark.rdd.SparkDataMapJob"; DataMapUtil.setDataMapJob(conf, DataMapUtil.createDataMapJob(className)); }
public DataMapSchema getDataMapSchema() { return dataMap.getDataMapSchema(); }
@Override public List<ExtendedBlocklet> prune(List<Segment> segments, List<PartitionSpec> partitionsToPrune) throws IOException { return dataMap.prune(segments, expression, partitionsToPrune); }
/** * Return a chosen FG datamap based on input filter. See {@link DataMapChooser} */ public DataMapExprWrapper chooseFGDataMap(FilterResolverIntf resolverIntf) { return chooseDataMap(DataMapLevel.FG, resolverIntf); }
/** * It gives the default datamap of the table. Default datamap of any table is BlockletDataMap * * @param table * @return */ public TableDataMap getDefaultDataMap(CarbonTable table) { return getDataMap(table, BlockletDataMapFactory.DATA_MAP_SCHEMA); }
@Override public int hashCode() { int result = order; result = 31 * result + (dataMap != null ? dataMap.hashCode() : 0); return result; } }
@Override public String[] getLocations() throws IOException, InterruptedException { return distributable.getLocations(); } }
@Override public long getLength() throws IOException, InterruptedException { return distributable.getLength(); }
/** * @return load Id */ public String getSegmentId() { if (segment != null) { return segment.getSegmentNo(); } else { return null; } }
/** * @param segmentId */ public void setSegmentId(String segmentId) { if (segmentId != null) { this.segment = Segment.toSegment(segmentId); } }
/** * Return a chosen CG datamap based on input filter. See {@link DataMapChooser} */ public DataMapExprWrapper chooseCGDataMap(FilterResolverIntf resolverIntf) { return chooseDataMap(DataMapLevel.CG, resolverIntf); }
/** * @return the segmentId */ public String getSegmentId() { if (segment == null) { return null; } else { return segment.getSegmentNo(); } }