@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.SampleRowKeysResponse)) { return super.equals(obj); } com.google.bigtable.v2.SampleRowKeysResponse other = (com.google.bigtable.v2.SampleRowKeysResponse) obj; boolean result = true; result = result && getRowKey().equals(other.getRowKey()); result = result && (getOffsetBytes() == other.getOffsetBytes()); result = result && unknownFields.equals(other.unknownFields); return result; }
private static List<KeyOffset> convert(List<SampleRowKeysResponse> rawResponse) { ImmutableList.Builder<KeyOffset> results = ImmutableList.builder(); for (SampleRowKeysResponse element : rawResponse) { results.add(KeyOffset.create(element.getRowKey(), element.getOffsetBytes())); } return results.build(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ROW_KEY_FIELD_NUMBER; hash = (53 * hash) + getRowKey().hashCode(); hash = (37 * hash) + OFFSET_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffsetBytes()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.SampleRowKeysResponse other) { if (other == com.google.bigtable.v2.SampleRowKeysResponse.getDefaultInstance()) return this; if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { setRowKey(other.getRowKey()); } if (other.getOffsetBytes() != 0L) { setOffsetBytes(other.getOffsetBytes()); } 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.SampleRowKeysResponse)) { return super.equals(obj); } com.google.bigtable.v2.SampleRowKeysResponse other = (com.google.bigtable.v2.SampleRowKeysResponse) obj; boolean result = true; result = result && getRowKey().equals(other.getRowKey()); result = result && (getOffsetBytes() == other.getOffsetBytes()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.SampleRowKeysResponse)) { return super.equals(obj); } com.google.bigtable.v2.SampleRowKeysResponse other = (com.google.bigtable.v2.SampleRowKeysResponse) obj; boolean result = true; result = result && getRowKey() .equals(other.getRowKey()); result = result && (getOffsetBytes() == other.getOffsetBytes()); return result; }
private static List<KeyOffset> convert(List<SampleRowKeysResponse> rawResponse) { ImmutableList.Builder<KeyOffset> results = ImmutableList.builder(); for (SampleRowKeysResponse element : rawResponse) { results.add(KeyOffset.create(element.getRowKey(), element.getOffsetBytes())); } return results.build(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ROW_KEY_FIELD_NUMBER; hash = (53 * hash) + getRowKey().hashCode(); hash = (37 * hash) + OFFSET_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffsetBytes()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ROW_KEY_FIELD_NUMBER; hash = (53 * hash) + getRowKey().hashCode(); hash = (37 * hash) + OFFSET_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getOffsetBytes()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@Override public List<KeyOffset> apply(@Nonnull List<SampleRowKeysResponse> rowKeysList) { if(rowKeysList == null || rowKeysList.isEmpty()){ return Collections.EMPTY_LIST; } ImmutableList.Builder<KeyOffset> keyOffsetBuilder = ImmutableList.builderWithExpectedSize(rowKeysList.size()); for(SampleRowKeysResponse rowKeys : rowKeysList){ keyOffsetBuilder.add(KeyOffset.create(rowKeys.getRowKey(), rowKeys.getOffsetBytes())); } return keyOffsetBuilder.build(); } }, MoreExecutors.directExecutor());
public Builder mergeFrom(com.google.bigtable.v2.SampleRowKeysResponse other) { if (other == com.google.bigtable.v2.SampleRowKeysResponse.getDefaultInstance()) return this; if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { setRowKey(other.getRowKey()); } if (other.getOffsetBytes() != 0L) { setOffsetBytes(other.getOffsetBytes()); } onChanged(); return this; }
public Builder mergeFrom(com.google.bigtable.v2.SampleRowKeysResponse other) { if (other == com.google.bigtable.v2.SampleRowKeysResponse.getDefaultInstance()) return this; if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { setRowKey(other.getRowKey()); } if (other.getOffsetBytes() != 0L) { setOffsetBytes(other.getOffsetBytes()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** {@inheritDoc} */ @Override public List<KeyOffset> sampleRowKeys(String tableId) { String fullTableName = NameUtil .formatTableName(requestContext.getProjectId(), requestContext.getInstanceId(), tableId); SampleRowKeysRequest requestProto = SampleRowKeysRequest.newBuilder() .setTableName(fullTableName) .build(); List<SampleRowKeysResponse> responseProto = delegate.sampleRowKeys(requestProto); ImmutableList.Builder<KeyOffset> keyOffsetBuilder = ImmutableList.builderWithExpectedSize(responseProto.size()); for(SampleRowKeysResponse rowKeys : responseProto){ keyOffsetBuilder.add(KeyOffset.create(rowKeys.getRowKey(), rowKeys.getOffsetBytes())); } return keyOffsetBuilder.build(); }
long currentOffset = response.getOffsetBytes(); if (!currentStartKey.isEmpty() && currentStartKey.equals(currentEndKey)) {
for (SampleRowKeysResponse response : sampleRowKeys) { ByteKey responseEndKey = makeByteKey(response.getRowKey()); long responseOffset = response.getOffsetBytes(); checkState( responseOffset >= lastOffset,