@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 Builder newBuilderForType() { return newBuilder(); }
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 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; }
/** * * * <pre> * Sorted streamed sequence of sample row keys in the table. The table might * have contents before the first row key in the list and after the last one, * but a key containing the empty string indicates "end of table" and will be * the last response given, if present. * Note that row keys in this list may not have ever been written to or read * from, and users should therefore not make any assumptions about the row key * structure that are specific to their use case. * </pre> * * <code>bytes row_key = 1;</code> */ public Builder clearRowKey() { rowKey_ = getDefaultInstance().getRowKey(); onChanged(); return this; }
/** * <p>adaptResponse.</p> * * @param responses a {@link java.util.List} object. * @return a {@link java.util.List} object. */ public List<HRegionLocation> adaptResponse(List<SampleRowKeysResponse> responses) { List<HRegionLocation> regions = new ArrayList<>(); // Starting by the first possible row, iterate over the sorted sampled row keys and create regions. byte[] startKey = HConstants.EMPTY_START_ROW; for (SampleRowKeysResponse response : responses) { byte[] endKey = response.getRowKey().toByteArray(); // Avoid empty regions. if (Bytes.equals(startKey, endKey)) { continue; } regions.add(createRegionLocation(startKey, endKey)); startKey = endKey; } // Create one last region if the last region doesn't reach the end or there are no regions. byte[] endKey = HConstants.EMPTY_END_ROW; if (regions.isEmpty() || !Bytes.equals(startKey, endKey)) { regions.add(createRegionLocation(startKey, endKey)); } return regions; }
@java.lang.Override public com.google.bigtable.v2.SampleRowKeysResponse getDefaultInstanceForType() { return com.google.bigtable.v2.SampleRowKeysResponse.getDefaultInstance(); }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public com.google.bigtable.v2.SampleRowKeysResponse buildPartial() { com.google.bigtable.v2.SampleRowKeysResponse result = new com.google.bigtable.v2.SampleRowKeysResponse(this); result.rowKey_ = rowKey_; result.offsetBytes_ = offsetBytes_; onBuilt(); return result; }
@java.lang.Override public com.google.bigtable.v2.SampleRowKeysResponse build() { com.google.bigtable.v2.SampleRowKeysResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
@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; }
/** * <pre> * Sorted streamed sequence of sample row keys in the table. The table might * have contents before the first row key in the list and after the last one, * but a key containing the empty string indicates "end of table" and will be * the last response given, if present. * Note that row keys in this list may not have ever been written to or read * from, and users should therefore not make any assumptions about the row key * structure that are specific to their use case. * </pre> * * <code>bytes row_key = 1;</code> */ public Builder clearRowKey() { rowKey_ = getDefaultInstance().getRowKey(); onChanged(); return this; }
/** * <p>adaptResponse.</p> * * @param responses a {@link java.util.List} object. * @return a {@link java.util.List} object. */ public List<HRegionLocation> adaptResponse(List<SampleRowKeysResponse> responses) { List<HRegionLocation> regions = new ArrayList<>(); // Starting by the first possible row, iterate over the sorted sampled row keys and create regions. byte[] startKey = HConstants.EMPTY_START_ROW; for (SampleRowKeysResponse response : responses) { byte[] endKey = response.getRowKey().toByteArray(); // Avoid empty regions. if (Bytes.equals(startKey, endKey)) { continue; } regions.add(createRegionLocation(startKey, endKey)); startKey = endKey; } // Create one last region if the last region doesn't reach the end or there are no regions. byte[] endKey = HConstants.EMPTY_END_ROW; if (regions.isEmpty() || !Bytes.equals(startKey, endKey)) { regions.add(createRegionLocation(startKey, endKey)); } return regions; }
.setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.bigtable.v2.SampleRowKeysResponse.getDefaultInstance())) .setSchemaDescriptor(new BigtableMethodDescriptorSupplier("SampleRowKeys")) .build();
public static Builder newBuilder(com.google.bigtable.v2.SampleRowKeysResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public com.google.bigtable.v2.SampleRowKeysResponse buildPartial() { com.google.bigtable.v2.SampleRowKeysResponse result = new com.google.bigtable.v2.SampleRowKeysResponse(this); result.rowKey_ = rowKey_; result.offsetBytes_ = offsetBytes_; onBuilt(); return result; }
public com.google.bigtable.v2.SampleRowKeysResponse build() { com.google.bigtable.v2.SampleRowKeysResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }