@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; hash = (53 * hash) + getFamilyName().hashCode(); hash = (37 * hash) + COLUMN_QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getColumnQualifier().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(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.Mutation.SetCell)) { return super.equals(obj); } com.google.bigtable.v2.Mutation.SetCell other = (com.google.bigtable.v2.Mutation.SetCell) obj; boolean result = true; result = result && getFamilyName().equals(other.getFamilyName()); result = result && getColumnQualifier().equals(other.getColumnQualifier()); result = result && (getTimestampMicros() == other.getTimestampMicros()); result = result && getValue().equals(other.getValue()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Test public void setCellWithServerSideTimestamp() { Mutation mutation = Mutation.createUnsafe(); mutation.setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), Mutation.SERVER_SIDE_TIMESTAMP, ByteString.copyFromUtf8("fake-value")); List<com.google.bigtable.v2.Mutation> actual = mutation.getMutations(); assertThat(actual.get(0).getSetCell().getTimestampMicros()) .isEqualTo(Mutation.SERVER_SIDE_TIMESTAMP); }
if (setCell.getTimestampMicros() == -1) { timestampHbase = HConstants.LATEST_TIMESTAMP; } else { timestampHbase = BigtableConstants.HBASE_TIMEUNIT.convert(setCell.getTimestampMicros(), BigtableConstants.BIGTABLE_TIMEUNIT);
if (setCell.getTimestampMicros() == -1) { timestampHbase = HConstants.LATEST_TIMESTAMP; } else { timestampHbase = BigtableConstants.HBASE_TIMEUNIT.convert(setCell.getTimestampMicros(), BigtableConstants.BIGTABLE_TIMEUNIT);
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.Mutation.SetCell)) { return super.equals(obj); } com.google.bigtable.v2.Mutation.SetCell other = (com.google.bigtable.v2.Mutation.SetCell) obj; boolean result = true; result = result && getFamilyName() .equals(other.getFamilyName()); result = result && getColumnQualifier() .equals(other.getColumnQualifier()); result = result && (getTimestampMicros() == other.getTimestampMicros()); result = result && getValue() .equals(other.getValue()); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; hash = (53 * hash) + getFamilyName().hashCode(); hash = (37 * hash) + COLUMN_QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getColumnQualifier().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(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.Mutation.SetCell other) { if (other == com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance()) return this; if (!other.getFamilyName().isEmpty()) { familyName_ = other.familyName_; onChanged(); } if (other.getColumnQualifier() != com.google.protobuf.ByteString.EMPTY) { setColumnQualifier(other.getColumnQualifier()); } if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } onChanged(); return this; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; hash = (53 * hash) + getFamilyName().hashCode(); hash = (37 * hash) + COLUMN_QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getColumnQualifier().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(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.Mutation.SetCell other) { if (other == com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance()) return this; if (!other.getFamilyName().isEmpty()) { familyName_ = other.familyName_; onChanged(); } if (other.getColumnQualifier() != com.google.protobuf.ByteString.EMPTY) { setColumnQualifier(other.getColumnQualifier()); } if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.Mutation.SetCell)) { return super.equals(obj); } com.google.bigtable.v2.Mutation.SetCell other = (com.google.bigtable.v2.Mutation.SetCell) obj; boolean result = true; result = result && getFamilyName().equals(other.getFamilyName()); result = result && getColumnQualifier().equals(other.getColumnQualifier()); result = result && (getTimestampMicros() == other.getTimestampMicros()); result = result && getValue().equals(other.getValue()); result = result && unknownFields.equals(other.unknownFields); return result; }
private static final boolean allCellsHaveTimestamps(Iterable<Mutation> mutations) { for (Mutation mut : mutations) { if (mut.getSetCell().getTimestampMicros() <= 0) { return false; } } return true; }
public Builder mergeFrom(com.google.bigtable.v2.Mutation.SetCell other) { if (other == com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance()) return this; if (!other.getFamilyName().isEmpty()) { familyName_ = other.familyName_; onChanged(); } if (other.getColumnQualifier() != com.google.protobuf.ByteString.EMPTY) { setColumnQualifier(other.getColumnQualifier()); } if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }