public TCell deepCopy() { return new TCell(this); }
/** * 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; }
/** * This utility method creates a list of Thrift TCell "struct" based on * an Hbase Cell array. The empty list is returned if the input is null. * @param in Hbase Cell array * @return Thrift TCell array */ static public List<TCell> cellFromHBase(Cell[] in) { List<TCell> list = null; if (in != null) { list = new ArrayList<>(in.length); for (int i = 0; i < in.length; i++) { list.add(new TCell(ByteBuffer.wrap(CellUtil.cloneValue(in[i])), in[i].getTimestamp())); } } else { list = new ArrayList<>(0); } return list; }
/** * Performs a deep copy on <i>other</i>. */ public TColumn(TColumn other) { if (other.isSetColumnName()) { this.columnName = org.apache.thrift.TBaseHelper.copyBinary(other.columnName); } if (other.isSetCell()) { this.cell = new TCell(other.cell); } }
/** * Performs a deep copy on <i>other</i>. */ public TRowResult(TRowResult other) { if (other.isSetRow()) { this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); } if (other.isSetColumns()) { java.util.Map<java.nio.ByteBuffer,TCell> __this__columns = new java.util.HashMap<java.nio.ByteBuffer,TCell>(other.columns.size()); for (java.util.Map.Entry<java.nio.ByteBuffer, TCell> other_element : other.columns.entrySet()) { java.nio.ByteBuffer other_element_key = other_element.getKey(); TCell other_element_value = other_element.getValue(); java.nio.ByteBuffer __this__columns_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key); TCell __this__columns_copy_value = new TCell(other_element_value); __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); } this.columns = __this__columns; } if (other.isSetSortedColumns()) { java.util.List<TColumn> __this__sortedColumns = new java.util.ArrayList<TColumn>(other.sortedColumns.size()); for (TColumn other_element : other.sortedColumns) { __this__sortedColumns.add(new TColumn(other_element)); } this.sortedColumns = __this__sortedColumns; } }
@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); } } }
case 2: // CELL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cell = new TCell(); struct.cell.read(iprot); struct.setCellIsSet(true);
ByteBuffer.wrap(CellUtil.makeColumn(CellUtil.cloneFamily(kv), CellUtil.cloneQualifier(kv))), new TCell(ByteBuffer.wrap(CellUtil.cloneValue(kv)), kv.getTimestamp()))); ByteBuffer.wrap(CellUtil.makeColumn(CellUtil.cloneFamily(kv), CellUtil.cloneQualifier(kv))), new TCell(ByteBuffer.wrap(CellUtil.cloneValue(kv)), kv.getTimestamp()));
_val10 = new TCell(); _val10.read(iprot); struct.columns.put(_key9, _val10);
_val21 = new TCell(); _val21.read(iprot); struct.columns.put(_key20, _val21);
public TCell deepCopy() { return new TCell(this); }
public TCell deepCopy() { return new TCell(this); }
TRowResult tResult = tRowResult.get(0); TCell expectedColumnValue = new TCell(asByteBuffer("val1"), now);
/** * Performs a deep copy on <i>other</i>. */ public TColumn(TColumn other) { if (other.isSetColumnName()) { this.columnName = other.columnName; } if (other.isSetCell()) { this.cell = new TCell(other.cell); } }
/** * Performs a deep copy on <i>other</i>. */ public TColumn(TColumn other) { if (other.isSetColumnName()) { this.columnName = other.columnName; } if (other.isSetCell()) { this.cell = new TCell(other.cell); } }
/** * Performs a deep copy on <i>other</i>. */ public TRowResult(TRowResult other) { if (other.isSetRow()) { this.row = other.row; } if (other.isSetColumns()) { Map<ByteBuffer,TCell> __this__columns = new HashMap<ByteBuffer,TCell>(other.columns.size()); for (Map.Entry<ByteBuffer, TCell> other_element : other.columns.entrySet()) { ByteBuffer other_element_key = other_element.getKey(); TCell other_element_value = other_element.getValue(); ByteBuffer __this__columns_copy_key = other_element_key; TCell __this__columns_copy_value = new TCell(other_element_value); __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); } this.columns = __this__columns; } if (other.isSetSortedColumns()) { List<TColumn> __this__sortedColumns = new ArrayList<TColumn>(other.sortedColumns.size()); for (TColumn other_element : other.sortedColumns) { __this__sortedColumns.add(new TColumn(other_element)); } this.sortedColumns = __this__sortedColumns; } }
/** * Performs a deep copy on <i>other</i>. */ public TRowResult(TRowResult other) { if (other.isSetRow()) { this.row = other.row; } if (other.isSetColumns()) { Map<ByteBuffer,TCell> __this__columns = new HashMap<ByteBuffer,TCell>(other.columns.size()); for (Map.Entry<ByteBuffer, TCell> other_element : other.columns.entrySet()) { ByteBuffer other_element_key = other_element.getKey(); TCell other_element_value = other_element.getValue(); ByteBuffer __this__columns_copy_key = other_element_key; TCell __this__columns_copy_value = new TCell(other_element_value); __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); } this.columns = __this__columns; } if (other.isSetSortedColumns()) { List<TColumn> __this__sortedColumns = new ArrayList<TColumn>(other.sortedColumns.size()); for (TColumn other_element : other.sortedColumns) { __this__sortedColumns.add(new TColumn(other_element)); } this.sortedColumns = __this__sortedColumns; } }
case 2: // CELL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cell = new TCell(); struct.cell.read(iprot); struct.setCellIsSet(true);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; 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); } } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; 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); } } }