@Override public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.columnName = iprot.readBinary(); struct.setColumnNameIsSet(true); } if (incoming.get(1)) { struct.cell = new TCell(); struct.cell.read(iprot); struct.setCellIsSet(true); } } }
@org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case VALUE: return getValue(); case TIMESTAMP: return getTimestamp(); } throw new java.lang.IllegalStateException(); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof TCell) return this.equals((TCell)that); return false; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case VALUE: return isSetValue(); case TIMESTAMP: return isSetTimestamp(); } throw new java.lang.IllegalStateException(); }
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case VALUE: if (value == null) { unsetValue(); } else { if (value instanceof byte[]) { setValue((byte[])value); } else { setValue((java.nio.ByteBuffer)value); } } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((java.lang.Long)value); } break; } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.value = iprot.readBinary(); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public TCell deepCopy() { return new TCell(this); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TCell struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.value = iprot.readBinary(); struct.setValueIsSet(true); } if (incoming.get(1)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } } }
@Override public void clear() { this.value = null; setTimestampIsSet(false); this.timestamp = 0; }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); if (isSetValue()) hashCode = hashCode * 8191 + value.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp); return hashCode; }
public byte[] getValue() { setValue(org.apache.thrift.TBaseHelper.rightSize(value)); return value == null ? null : value.array(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; 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); } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case VALUE: if (value == null) { unsetValue(); } else { setValue((ByteBuffer)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; } }
@Override public int compareTo(TCell other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } if (isSetTimestamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); if (lastComparison != 0) { return lastComparison; } } return 0; }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.value = iprot.readBinary(); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
/** * This utility method creates a list of Thrift TCell "struct" based on * an Hbase Cell object. The empty list is returned if the input is null. * * @param in * Hbase Cell object * @return Thrift TCell array */ static public List<TCell> cellFromHBase(Cell in) { List<TCell> list = new ArrayList<>(1); if (in != null) { list.add(new TCell(ByteBuffer.wrap(CellUtil.cloneValue(in)), in.getTimestamp())); } return list; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TCell struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.value = iprot.readBinary(); struct.setValueIsSet(true); } if (incoming.get(1)) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } } }
public TCell setTimestamp(long timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; }
public boolean equals(TCell that) { if (that == null) return false; if (this == that) return true; boolean this_present_value = true && this.isSetValue(); boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; if (!this.value.equals(that.value)) return false; } boolean this_present_timestamp = true; boolean that_present_timestamp = true; if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } return true; }