/** * This method will serialize the object of dictionary file * * @throws IOException if an I/O error occurs */ private void writeDictionaryFile() throws IOException { ColumnDictionaryChunk columnDictionaryChunk = new ColumnDictionaryChunk(); columnDictionaryChunk.setValues(oneDictionaryChunkList); writeThriftObject(columnDictionaryChunk); }
public Object getFieldValue(_Fields field) { switch (field) { case VALUES: return getValues(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ColumnDictionaryChunk) return this.equals((ColumnDictionaryChunk)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case VALUES: if (value == null) { unsetValues(); } else { setValues((List<ByteBuffer>)value); } break; } }
case 5: // DICTIONARY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.dictionary = new org.apache.carbondata.format.ColumnDictionaryChunk(); struct.dictionary.read(iprot); struct.setDictionaryIsSet(true); } else {
@Override public TBase create() { return new ColumnDictionaryChunk(); } });
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public boolean equals(ColumnDictionaryChunk that) { if (that == null) return false; boolean this_present_values = true && this.isSetValues(); boolean that_present_values = true && that.isSetValues(); if (this_present_values || that_present_values) { if (!(this_present_values && that_present_values)) return false; if (!this.values.equals(that.values)) return false; } return true; }
struct.setValuesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnDictionaryChunk struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.values != null) { oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); for (ByteBuffer _iter3 : struct.values) { oprot.writeBinary(_iter3); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ColumnDictionaryChunk struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.values = new ArrayList<ByteBuffer>(_list5.size); ByteBuffer _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = iprot.readBinary(); struct.values.add(_elem6); } } struct.setValuesIsSet(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); } } }
public ColumnDictionaryChunk deepCopy() { return new ColumnDictionaryChunk(this); }
if (struct.isSetDictionary()) { oprot.writeFieldBegin(DICTIONARY_FIELD_DESC); struct.dictionary.write(oprot); oprot.writeFieldEnd();
/** * Performs a deep copy on <i>other</i>. */ public ColumnDictionaryChunk(ColumnDictionaryChunk other) { if (other.isSetValues()) { List<ByteBuffer> __this__values = new ArrayList<ByteBuffer>(other.values); this.values = __this__values; } }
public void validate() throws org.apache.thrift.TException { // check for required fields // alas, we cannot check 'num_rows' because it's a primitive and you chose the non-beans generator. if (segment_info == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'segment_info' was not present! Struct: " + toString()); } if (blocklet_index_list == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'blocklet_index_list' was not present! Struct: " + toString()); } // check for sub-struct validity if (segment_info != null) { segment_info.validate(); } if (dictionary != null) { dictionary.validate(); } }
case 5: // DICTIONARY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.dictionary = new org.apache.carbondata.format.ColumnDictionaryChunk(); struct.dictionary.read(iprot); struct.setDictionaryIsSet(true); } else {
this.dictionary = new org.apache.carbondata.format.ColumnDictionaryChunk(other.dictionary);
/** * Constructor of ColumnDictionaryChunkIterator * * @param columnDictionaryChunks */ public ColumnDictionaryChunkIterator(List<ColumnDictionaryChunk> columnDictionaryChunks) { this.columnDictionaryChunks = columnDictionaryChunks; for (ColumnDictionaryChunk dictionaryChunk : columnDictionaryChunks) { this.size += dictionaryChunk.getValues().size(); } }