public BlockletIndex deepCopy() { return new BlockletIndex(this); }
List<BlockletIndex> __this__blocklet_index_list = new ArrayList<BlockletIndex>(other.blocklet_index_list.size()); for (BlockletIndex other_element : other.blocklet_index_list) { __this__blocklet_index_list.add(new BlockletIndex(other_element));
List<BlockletIndex> __this__blocklet_index_list = new ArrayList<BlockletIndex>(other.blocklet_index_list.size()); for (BlockletIndex other_element : other.blocklet_index_list) { __this__blocklet_index_list.add(new BlockletIndex(other_element));
/** * Performs a deep copy on <i>other</i>. */ public BlockIndex(BlockIndex other) { __isset_bitfield = other.__isset_bitfield; this.num_rows = other.num_rows; if (other.isSetFile_name()) { this.file_name = other.file_name; } this.offset = other.offset; if (other.isSetBlock_index()) { this.block_index = new org.apache.carbondata.format.BlockletIndex(other.block_index); } if (other.isSetBlocklet_info()) { this.blocklet_info = new org.apache.carbondata.format.BlockletInfo3(other.blocklet_info); } this.file_size = other.file_size; }
case 3: // BLOCKLET_INDEX if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.blocklet_index = new BlockletIndex(); struct.blocklet_index.read(iprot); struct.setBlocklet_indexIsSet(true);
case 4: // BLOCK_INDEX if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.block_index = new org.apache.carbondata.format.BlockletIndex(); struct.block_index.read(iprot); struct.setBlock_indexIsSet(true);
/** * Performs a deep copy on <i>other</i>. */ public BlockletHeader(BlockletHeader other) { __isset_bitfield = other.__isset_bitfield; this.blocklet_length = other.blocklet_length; if (other.isSetMutation()) { this.mutation = other.mutation; } if (other.isSetBlocklet_index()) { this.blocklet_index = new BlockletIndex(other.blocklet_index); } if (other.isSetBlocklet_info()) { this.blocklet_info = new BlockletInfo(other.blocklet_info); } if (other.isSetDictionary()) { this.dictionary = new org.apache.carbondata.format.ColumnDictionaryChunk(other.dictionary); } }
for (int _i170 = 0; _i170 < _list168.size; ++_i170) _elem169 = new BlockletIndex(); _elem169.read(iprot); struct.blocklet_index_list.add(_elem169);
void apppendBlocklet(DataOutputStream outputStream) throws IOException { outputStream.write(CarbonStreamOutputFormat.CARBON_SYNC_MARKER); BlockletInfo blockletInfo = new BlockletInfo(); blockletInfo.setNum_rows(getRowIndex() + 1); BlockletHeader blockletHeader = new BlockletHeader(); blockletHeader.setBlocklet_length(getCount()); blockletHeader.setMutation(MutationType.INSERT); blockletHeader.setBlocklet_info(blockletInfo); // add blocklet level min/max blockletMinMaxIndex = generateBlockletMinMax(); if (blockletInfo.getNum_rows() > 1) { BlockletIndex blockletIndex = new BlockletIndex(); blockletIndex.setMin_max_index(CarbonMetadataUtil.convertMinMaxIndex(blockletMinMaxIndex)); blockletHeader.setBlocklet_index(blockletIndex); } byte[] headerBytes = CarbonUtil.getByteArray(blockletHeader); outputStream.writeInt(headerBytes.length); outputStream.write(headerBytes); byte[] compressed = compressor.compressByte(getBytes(), getCount()); outputStream.writeInt(compressed.length); outputStream.write(compressed); }
for (int _i141 = 0; _i141 < _list139.size; ++_i141) _elem140 = new BlockletIndex(); _elem140.read(iprot); struct.blocklet_index_list.add(_elem140);
for (int _i186 = 0; _i186 < _list184.size; ++_i186) _elem185 = new BlockletIndex(); _elem185.read(iprot); struct.blocklet_index_list.add(_elem185);
public static BlockletIndex getBlockletIndex( org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex info) { BlockletMinMaxIndex blockletMinMaxIndex = convertMinMaxIndex(info.getMinMaxIndex()); BlockletBTreeIndex blockletBTreeIndex = new BlockletBTreeIndex(); blockletBTreeIndex.setStart_key(info.getBtreeIndex().getStartKey()); blockletBTreeIndex.setEnd_key(info.getBtreeIndex().getEndKey()); BlockletIndex blockletIndex = new BlockletIndex(); blockletIndex.setMin_max_index(blockletMinMaxIndex); blockletIndex.setB_tree_index(blockletBTreeIndex); return blockletIndex; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BlockIndex struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.num_rows = iprot.readI64(); struct.setNum_rowsIsSet(true); struct.file_name = iprot.readString(); struct.setFile_nameIsSet(true); struct.offset = iprot.readI64(); struct.setOffsetIsSet(true); struct.block_index = new org.apache.carbondata.format.BlockletIndex(); struct.block_index.read(iprot); struct.setBlock_indexIsSet(true); BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.blocklet_info = new org.apache.carbondata.format.BlockletInfo3(); struct.blocklet_info.read(iprot); struct.setBlocklet_infoIsSet(true); } if (incoming.get(1)) { struct.file_size = iprot.readI64(); struct.setFile_sizeIsSet(true); } } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BlockletHeader struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.blocklet_length = iprot.readI32(); struct.setBlocklet_lengthIsSet(true); struct.mutation = org.apache.carbondata.format.MutationType.findByValue(iprot.readI32()); struct.setMutationIsSet(true); struct.blocklet_info = new BlockletInfo(); struct.blocklet_info.read(iprot); struct.setBlocklet_infoIsSet(true); BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.blocklet_index = new BlockletIndex(); struct.blocklet_index.read(iprot); struct.setBlocklet_indexIsSet(true); } if (incoming.get(1)) { struct.dictionary = new org.apache.carbondata.format.ColumnDictionaryChunk(); struct.dictionary.read(iprot); struct.setDictionaryIsSet(true); } } }
for (int _i161 = 0; _i161 < _list159.size; ++_i161) _elem160 = new BlockletIndex(); _elem160.read(iprot); struct.blocklet_index_list.add(_elem160);
blockIndex.setOffset(-1); BlockletIndex blockletIndex = new BlockletIndex(); blockIndex.setBlock_index(blockletIndex); StreamFileIndex streamFileIndex = indexMap.get(blockIndex.getFile_name());
.serializeEndKey(); blockletBTreeIndex.setEnd_key(endKey); BlockletIndex blockletIndex = new BlockletIndex(); blockletIndex.setMin_max_index(blockletMinMaxIndex); blockletIndex.setB_tree_index(blockletBTreeIndex);