@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.Cell)) { return super.equals(obj); } com.google.bigtable.v2.Cell other = (com.google.bigtable.v2.Cell) obj; boolean result = true; result = result && (getTimestampMicros() == other.getTimestampMicros()); result = result && getValue().equals(other.getValue()); result = result && getLabelsList().equals(other.getLabelsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TIMESTAMP_MICROS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestampMicros()); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); if (getLabelsCount() > 0) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + getLabelsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The value stored in the cell. * May contain any byte string, including the empty string, up to 100MiB in * length. * </pre> * * <code>bytes value = 2;</code> */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; }
public Builder mergeFrom(com.google.bigtable.v2.Cell other) { if (other == com.google.bigtable.v2.Cell.getDefaultInstance()) return this; if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } if (!other.labels_.isEmpty()) { if (labels_.isEmpty()) { labels_ = other.labels_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureLabelsIsMutable(); labels_.addAll(other.labels_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
if (cell.getLabelsCount() > 0) { continue; long hbaseTimestamp = TimestampConverter.bigtable2hbase(cell.getTimestampMicros()); RowCell keyValue = new RowCell( rowKey, columnQualifier, hbaseTimestamp, ByteStringer.extract(cell.getValue()));
@Override public BigtableRow apply(Row row) { ByteBuffer key = ByteBuffer.wrap(toByteArray(row.getKey())); List<BigtableCell> cells = new ArrayList<>(); for (Family family : row.getFamiliesList()) { String familyName = family.getName(); for (Column column : family.getColumnsList()) { ByteBuffer qualifier = ByteBuffer.wrap(toByteArray(column.getQualifier())); for (Cell cell : column.getCellsList()) { long timestamp = cell.getTimestampMicros(); ByteBuffer value = ByteBuffer.wrap(toByteArray(cell.getValue())); cells.add(new BigtableCell(familyName, qualifier, timestamp, value)); } } } return new BigtableRow(key, cells); } }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (timestampMicros_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, timestampMicros_); } if (!value_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, value_); } { int dataSize = 0; for (int i = 0; i < labels_.size(); i++) { dataSize += computeStringSizeNoTag(labels_.getRaw(i)); } size += dataSize; size += 1 * getLabelsList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public com.google.bigtable.v2.Cell buildPartial() { com.google.bigtable.v2.Cell result = new com.google.bigtable.v2.Cell(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.timestampMicros_ = timestampMicros_; result.value_ = value_; if (((bitField0_ & 0x00000004) == 0x00000004)) { labels_ = labels_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.labels_ = labels_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom(com.google.bigtable.v2.Cell other) { if (other == com.google.bigtable.v2.Cell.getDefaultInstance()) return this; if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } if (!other.labels_.isEmpty()) { if (labels_.isEmpty()) { labels_ = other.labels_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureLabelsIsMutable(); labels_.addAll(other.labels_); } onChanged(); } onChanged(); return this; }
if (cell.getLabelsCount() > 0) { continue; long hbaseTimestamp = TimestampConverter.bigtable2hbase(cell.getTimestampMicros()); RowCell keyValue = new RowCell( rowKey, columnQualifier, hbaseTimestamp, ByteStringer.extract(cell.getValue()));
/** * <pre> * The value stored in the cell. * May contain any byte string, including the empty string, up to 100MiB in * length. * </pre> * * <code>bytes value = 2;</code> */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (timestampMicros_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, timestampMicros_); } if (!value_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, value_); } { int dataSize = 0; for (int i = 0; i < labels_.size(); i++) { dataSize += computeStringSizeNoTag(labels_.getRaw(i)); } size += dataSize; size += 1 * getLabelsList().size(); } memoizedSize = size; return size; }
public com.google.bigtable.v2.Cell buildPartial() { com.google.bigtable.v2.Cell result = new com.google.bigtable.v2.Cell(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.timestampMicros_ = timestampMicros_; result.value_ = value_; if (((bitField0_ & 0x00000004) == 0x00000004)) { labels_ = labels_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.labels_ = labels_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
private Row convertResponse(ReadModifyWriteRowResponse response) { ImmutableList.Builder<RowCell> cells = ImmutableList.builder(); for (Family family : response.getRow().getFamiliesList()) { for (Column column : family.getColumnsList()) { for (Cell cell : column.getCellsList()) { cells.add( RowCell.create( family.getName(), column.getQualifier(), cell.getTimestampMicros(), cell.getLabelsList(), cell.getValue())); } } } return Row.create(response.getRow().getKey(), cells.build()); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TIMESTAMP_MICROS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestampMicros()); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); if (getLabelsCount() > 0) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + getLabelsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.Cell other) { if (other == com.google.bigtable.v2.Cell.getDefaultInstance()) return this; if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } if (!other.labels_.isEmpty()) { if (labels_.isEmpty()) { labels_ = other.labels_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureLabelsIsMutable(); labels_.addAll(other.labels_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The value stored in the cell. * May contain any byte string, including the empty string, up to 100MiB in * length. * </pre> * * <code>bytes value = 2;</code> */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; }