@Override public TBase create() { return new FileFooter(); } });
public Object getFieldValue(_Fields field) { switch (field) { case VERSION: return getVersion(); case NUM_ROWS: return getNum_rows(); case TABLE_COLUMNS: return getTable_columns(); case SEGMENT_INFO: return getSegment_info(); case BLOCKLET_INDEX_LIST: return getBlocklet_index_list(); case BLOCKLET_INFO_LIST: return getBlocklet_info_list(); case BLOCKLET_INFO_LIST2: return getBlocklet_info_list2(); case DICTIONARY: return getDictionary(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof FileFooter) return this.equals((FileFooter)that); return false; }
new CarbonFooterReader(tableBlockInfo.getFilePath(), tableBlockInfo.getBlockOffset()); FileFooter footer = reader.readFooter(); dataFileFooter.setVersionId(ColumnarFormatVersion.valueOf((short) footer.getVersion())); dataFileFooter.setNumberOfRows(footer.getNum_rows()); dataFileFooter.setSegmentInfo(getSegmentInfo(footer.getSegment_info())); List<ColumnSchema> columnSchemaList = new ArrayList<ColumnSchema>(); List<org.apache.carbondata.format.ColumnSchema> table_columns = footer.getTable_columns(); for (int i = 0; i < table_columns.size(); i++) { columnSchemaList.add(thriftColumnSchemaToWrapperColumnSchema(table_columns.get(i))); footer.getBlocklet_index_list(); List<BlockletIndex> blockletIndexList = new ArrayList<BlockletIndex>(); for (int i = 0; i < leaf_node_indices_Thrift.size(); i++) { footer.getBlocklet_info_list2(); List<BlockletInfo> blockletInfoList = new ArrayList<BlockletInfo>(); for (int i = 0; i < leaf_node_infos_Thrift.size(); i++) {
new CarbonFooterReader(tableBlockInfo.getFilePath(), actualFooterOffset); FileFooter footer = reader.readFooter(); dataFileFooter.setVersionId(ColumnarFormatVersion.valueOf((short) footer.getVersion())); dataFileFooter.setNumberOfRows(footer.getNum_rows()); dataFileFooter.setSegmentInfo(getSegmentInfo(footer.getSegment_info())); List<ColumnSchema> columnSchemaList = new ArrayList<ColumnSchema>(); List<org.apache.carbondata.format.ColumnSchema> table_columns = footer.getTable_columns(); for (int i = 0; i < table_columns.size(); i++) { columnSchemaList.add(thriftColumnSchemaToWrapperColumnSchema(table_columns.get(i))); footer.getBlocklet_index_list(); List<BlockletIndex> blockletIndexList = new ArrayList<BlockletIndex>(); for (int i = 0; i < leaf_node_indices_Thrift.size(); i++) { footer.getBlocklet_info_list(); List<BlockletInfo> blockletInfoList = new ArrayList<BlockletInfo>(); for (int i = 0; i < leaf_node_infos_Thrift.size(); i++) {
@Override public List<ColumnSchema> getSchema(TableBlockInfo tableBlockInfo) throws IOException { FileReader fileReader = null; List<ColumnSchema> columnSchemaList = new ArrayList<ColumnSchema>(); try { long completeBlockLength = tableBlockInfo.getBlockLength(); long footerPointer = completeBlockLength - 8; fileReader = FileFactory.getFileHolder(FileFactory.getFileType(tableBlockInfo.getFilePath())); long actualFooterOffset = fileReader.readLong(tableBlockInfo.getFilePath(), footerPointer); CarbonFooterReader reader = new CarbonFooterReader(tableBlockInfo.getFilePath(), actualFooterOffset); FileFooter footer = reader.readFooter(); List<org.apache.carbondata.format.ColumnSchema> table_columns = footer.getTable_columns(); for (int i = 0; i < table_columns.size(); i++) { columnSchemaList.add(thriftColumnSchemaToWrapperColumnSchema(table_columns.get(i))); } } finally { if (null != fileReader) { fileReader.finish(); } } return columnSchemaList; } }
public FileFooter deepCopy() { return new FileFooter(this); }