/** * * * <pre> * The row keys and/or ranges to read. If not specified, reads from all rows. * </pre> * * <code>.google.bigtable.v2.RowSet rows = 2;</code> */ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { return getRows(); }
RowSet remaining = RowSetUtil.split(originalRequest.getRows(), lastKey).getRight();
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); if (hasRows()) { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRows().hashCode(); } if (hasFilter()) { hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); } hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowsLimit()); 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.ReadRowsRequest)) { return super.equals(obj); } com.google.bigtable.v2.ReadRowsRequest other = (com.google.bigtable.v2.ReadRowsRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && (hasRows() == other.hasRows()); if (hasRows()) { result = result && getRows().equals(other.getRows()); } result = result && (hasFilter() == other.hasFilter()); if (hasFilter()) { result = result && getFilter().equals(other.getFilter()); } result = result && (getRowsLimit() == other.getRowsLimit()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); } if (rows_ != null) { output.writeMessage(2, getRows()); } if (filter_ != null) { output.writeMessage(3, getFilter()); } if (rowsLimit_ != 0L) { output.writeInt64(4, rowsLimit_); } if (!getAppProfileIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, appProfileId_); } unknownFields.writeTo(output); }
public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other == com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); } if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; onChanged(); } if (other.hasRows()) { mergeRows(other.getRows()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); } if (rows_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRows()); } if (filter_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFilter()); } if (rowsLimit_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, rowsLimit_); } if (!getAppProfileIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, appProfileId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); if (hasRows()) { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRows().hashCode(); } if (hasFilter()) { hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); } hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getRowsLimit()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <pre> * The row keys and/or ranges to read. If not specified, reads from all rows. * </pre> * * <code>.google.bigtable.v2.RowSet rows = 2;</code> */ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { return getRows(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); if (hasRows()) { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRows().hashCode(); } if (hasFilter()) { hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); } hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowsLimit()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The row keys and/or ranges to read. If not specified, reads from all rows. * </pre> * * <code>.google.bigtable.v2.RowSet rows = 2;</code> */ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { return getRows(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.ReadRowsRequest)) { return super.equals(obj); } com.google.bigtable.v2.ReadRowsRequest other = (com.google.bigtable.v2.ReadRowsRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && (hasRows() == other.hasRows()); if (hasRows()) { result = result && getRows().equals(other.getRows()); } result = result && (hasFilter() == other.hasFilter()); if (hasFilter()) { result = result && getFilter().equals(other.getFilter()); } result = result && (getRowsLimit() == other.getRowsLimit()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other == com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); } if (other.hasRows()) { mergeRows(other.getRows()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } onChanged(); return this; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); } if (rows_ != null) { output.writeMessage(2, getRows()); } if (filter_ != null) { output.writeMessage(3, getFilter()); } if (rowsLimit_ != 0L) { output.writeInt64(4, rowsLimit_); } }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); } if (rows_ != null) { output.writeMessage(2, getRows()); } if (filter_ != null) { output.writeMessage(3, getFilter()); } if (rowsLimit_ != 0L) { output.writeInt64(4, rowsLimit_); } if (!getAppProfileIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, appProfileId_); } unknownFields.writeTo(output); }
public static boolean isGet(ReadRowsRequest request) { RowSet rowSet = request.getRows(); return rowSet != null && rowSet.getRowRangesCount() == 0 && rowSet.getRowKeysCount() == 1; } }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); } if (rows_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getRows()); } if (filter_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getFilter()); } if (rowsLimit_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, rowsLimit_); } memoizedSize = size; return size; }
/** * Adds the key in the request to a batch read. The future will be resolved when the batch response * is received. * * @param request a {@link com.google.bigtable.v2.ReadRowsRequest} with a single row key. * @return a {@link com.google.common.util.concurrent.ListenableFuture} that will be populated * with the {@link FlatRow} that corresponds to the request */ public ListenableFuture<FlatRow> add(ReadRowsRequest request) { Preconditions.checkNotNull(request); Preconditions.checkArgument(request.getRows().getRowKeysCount() == 1); ByteString rowKey = request.getRows().getRowKeysList().get(0); Preconditions.checkArgument(!rowKey.equals(ByteString.EMPTY)); final RowFilter filter = request.getFilter(); Batch batch = batches.get(filter); if (batch == null) { batch = new Batch(filter); batches.put(filter, batch); } return batch.addKey(rowKey); }