Search in sources :

Example 1 with FineGrainDataMap

use of org.apache.carbondata.core.datamap.dev.fgdatamap.FineGrainDataMap in project carbondata by apache.

the class LuceneFineGrainDataMapFactory method getDataMaps.

/**
 * Get the datamap for segmentid
 */
@Override
public List<FineGrainDataMap> getDataMaps(Segment segment) throws IOException {
    List<FineGrainDataMap> lstDataMap = new ArrayList<>();
    FineGrainDataMap dataMap = new LuceneFineGrainDataMap(analyzer);
    try {
        dataMap.init(new DataMapModel(LuceneDataMapWriter.genDataMapStorePath(tableIdentifier.getTablePath(), segment.getSegmentNo(), dataMapName)));
    } catch (MemoryException e) {
        LOGGER.error("failed to get lucene datamap , detail is {}" + e.getMessage());
        return lstDataMap;
    }
    lstDataMap.add(dataMap);
    return lstDataMap;
}
Also used : FineGrainDataMap(org.apache.carbondata.core.datamap.dev.fgdatamap.FineGrainDataMap) MemoryException(org.apache.carbondata.core.memory.MemoryException) DataMapModel(org.apache.carbondata.core.datamap.dev.DataMapModel) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 DataMapModel (org.apache.carbondata.core.datamap.dev.DataMapModel)1 FineGrainDataMap (org.apache.carbondata.core.datamap.dev.fgdatamap.FineGrainDataMap)1 MemoryException (org.apache.carbondata.core.memory.MemoryException)1