/** * Get the index file name of the blocklet data map * * @return */ public String getTableTaskInfo(int index) { DataMapRow unsafeRow = taskSummaryDMStore.getDataMapRow(getTaskSummarySchema(), 0); try { return new String(unsafeRow.getByteArray(index), CarbonCommonConstants.DEFAULT_CHARSET); } catch (UnsupportedEncodingException e) { // should never happen! throw new IllegalArgumentException("UTF8 encoding is not supported", e); } }
private String[] getFileDetails() { try { String[] fileDetails = new String[3]; DataMapRow unsafeRow = taskSummaryDMStore.getDataMapRow(getTaskSummarySchema(), 0); fileDetails[0] = new String(unsafeRow.getByteArray(SUMMARY_INDEX_PATH), CarbonCommonConstants.DEFAULT_CHARSET); fileDetails[1] = new String(unsafeRow.getByteArray(SUMMARY_INDEX_FILE_NAME), CarbonCommonConstants.DEFAULT_CHARSET); fileDetails[2] = new String(unsafeRow.getByteArray(SUMMARY_SEGMENTID), CarbonCommonConstants.DEFAULT_CHARSET); return fileDetails; } catch (Exception e) { throw new RuntimeException(e); } }
private byte[] getBlockletRowCountForEachBlock() { // taskSummary DM store will have only one row CarbonRowSchema[] taskSummarySchema = getTaskSummarySchema(); return taskSummaryDMStore .getDataMapRow(taskSummarySchema, taskSummaryDMStore.getRowCount() - 1) .getByteArray(taskSummarySchema.length - 1); }
@Override public ExtendedBlocklet getDetailedBlocklet(String blockletId) { if (isLegacyStore) { return super.getDetailedBlocklet(blockletId); } int absoluteBlockletId = Integer.parseInt(blockletId); DataMapRow safeRow = memoryDMStore.getDataMapRow(getFileFooterEntrySchema(), absoluteBlockletId) .convertToSafeRow(); short relativeBlockletId = safeRow.getShort(BLOCKLET_ID_INDEX); String filePath = getFilePath(); return createBlocklet(safeRow, getFileNameWithFilePath(safeRow, filePath), relativeBlockletId, false); }
memoryDMStore.getDataMapRow(getFileFooterEntrySchema(), rowIndex).convertToSafeRow(); String filePath = getFilePath(); return createBlocklet(safeRow, getFileNameWithFilePath(safeRow, filePath), relativeBlockletId,
@Override public boolean isScanRequired(FilterResolverIntf filterExp) { FilterExecuter filterExecuter = FilterUtil .getFilterExecuterTree(filterExp, getSegmentProperties(), null, getMinMaxCacheColumns()); DataMapRow unsafeRow = taskSummaryDMStore .getDataMapRow(getTaskSummarySchema(), taskSummaryDMStore.getRowCount() - 1); boolean isScanRequired = FilterExpressionProcessor .isScanRequired(filterExecuter, getMinMaxValue(unsafeRow, TASK_MAX_VALUES_INDEX), getMinMaxValue(unsafeRow, TASK_MIN_VALUES_INDEX), getMinMaxFlag(unsafeRow, TASK_MIN_MAX_FLAG)); if (isScanRequired) { return true; } return false; }
if (filterExp == null) { for (int i = 0; i < numEntries; i++) { DataMapRow safeRow = memoryDMStore.getDataMapRow(schema, i).convertToSafeRow(); blocklets.add(createBlocklet(safeRow, getFileNameWithFilePath(safeRow, filePath), getBlockletId(safeRow), false)); DataMapRow safeRow = memoryDMStore.getDataMapRow(schema, entryIndex).convertToSafeRow(); boolean[] minMaxFlag = getMinMaxFlag(safeRow, BLOCK_MIN_MAX_FLAG); String fileName = getFileNameWithFilePath(safeRow, filePath);