public BlockletInfo deepCopy() { return new BlockletInfo(this); }
List<BlockletInfo> __this__blocklet_info_list = new ArrayList<BlockletInfo>(other.blocklet_info_list.size()); for (BlockletInfo other_element : other.blocklet_info_list) { __this__blocklet_info_list.add(new BlockletInfo(other_element));
case 4: // BLOCKLET_INFO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.blocklet_info = new BlockletInfo(); struct.blocklet_info.read(iprot); struct.setBlocklet_infoIsSet(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); } }
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 _i144 = 0; _i144 < _list142.size; ++_i144) _elem143 = new BlockletInfo(); _elem143.read(iprot); struct.blocklet_info_list.add(_elem143);
@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 _i164 = 0; _i164 < _list162.size; ++_i164) _elem163 = new BlockletInfo(); _elem163.read(iprot); struct.blocklet_info_list.add(_elem163);