/** * * * <pre> * The filter to apply to the contents of the specified row(s). If unset, * reads the entirety of each row. * </pre> * * <code>.google.bigtable.v2.RowFilter filter = 3;</code> */ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { return getFilter(); }
@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); }
@Override public String toString() { ReadRowsRequest request = builder.build(); return MoreObjects.toStringHelper(this) .add("tableId", tableId) .add("keys", request.getRows().getRowKeysList()) .add("ranges", request.getRows().getRowRangesList()) .add("filter", request.getFilter()) .toString(); } }
@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(); 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; }
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; }
/** * <pre> * The filter to apply to the contents of the specified row(s). If unset, * reads the entirety of each row. * </pre> * * <code>.google.bigtable.v2.RowFilter filter = 3;</code> */ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { return getFilter(); }
/** * * * <pre> * The filter to apply to the contents of the specified row(s). If unset, * reads the entirety of each row. * </pre> * * <code>.google.bigtable.v2.RowFilter filter = 3;</code> */ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { return getFilter(); }
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_); } }
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; }
@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); }
@Override public String toString() { ReadRowsRequest request = builder.build(); return MoreObjects.toStringHelper(this) .add("tableId", tableId) .add("keys", request.getRows().getRowKeysList()) .add("ranges", request.getRows().getRowRangesList()) .add("filter", request.getFilter()) .toString(); } }
@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; }
/** * 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); }
@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; }
@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; }
ReadRowsRequest buildUpdatedRequest() { ReadRowsRequest.Builder newRequest = ReadRowsRequest.newBuilder() .setRows(filterRows()) .setTableName(originalRequest.getTableName()) .setAppProfileId(originalRequest.getAppProfileId()); if (originalRequest.hasFilter()) { newRequest.setFilter(originalRequest.getFilter()); } // If the row limit is set, update it. long numRowsLimit = originalRequest.getRowsLimit(); if (numRowsLimit > 0) { // Updates the {@code numRowsLimit} by removing the number of rows already read. numRowsLimit -= rowCount; checkArgument(numRowsLimit > 0, "The remaining number of rows must be greater than 0."); newRequest.setRowsLimit(numRowsLimit); } return newRequest.build(); }
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 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; }