@Generated public final class PartialResultSet extends com.google.protobuf.GeneratedMessage implements PartialResultSetOrBuilder
A partial result set from the streaming query API.
Cloud Bigtable clients buffer partial results received in this message until
a `resume_token` is received.
The pseudocode below describes how to buffer and parse a stream of
`PartialResultSet` messages.
Having:
- queue of row results waiting to be returned `queue`
- extensible buffer of bytes `buffer`
- a place to keep track of the most recent `resume_token`
for each PartialResultSet `p` received {
if p.reset {
ensure `queue` is empty
ensure `buffer` is empty
}
if p.estimated_batch_size != 0 {
(optional) ensure `buffer` is sized to at least `p.estimated_batch_size`
}
if `p.proto_rows_batch` is set {
append `p.proto_rows_batch.bytes` to `buffer`
}
if p.batch_checksum is set and `buffer` is not empty {
validate the checksum matches the contents of `buffer`
(see comments on `batch_checksum`)
parse `buffer` as `ProtoRows` message, clearing `buffer`
add parsed rows to end of `queue`
}
if p.resume_token is set {
release results in `queue`
save `p.resume_token` in `resume_token`
}
}
Protobuf type google.bigtable.v2.PartialResultSet| Modifier and Type | Class and Description |
|---|---|
static class |
PartialResultSet.Builder
A partial result set from the streaming query API.
|
static class |
PartialResultSet.PartialRowsCase |
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
BATCH_CHECKSUM_FIELD_NUMBER |
static int |
ESTIMATED_BATCH_SIZE_FIELD_NUMBER |
static int |
PROTO_ROWS_BATCH_FIELD_NUMBER |
static int |
RESET_FIELD_NUMBER |
static int |
RESUME_TOKEN_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getBatchChecksum()
CRC32C checksum of concatenated `partial_rows` data for the current batch.
|
static PartialResultSet |
getDefaultInstance() |
PartialResultSet |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
int |
getEstimatedBatchSize()
Estimated size of the buffer required to hold the next batch of results.
|
com.google.protobuf.Parser<PartialResultSet> |
getParserForType() |
PartialResultSet.PartialRowsCase |
getPartialRowsCase() |
ProtoRowsBatch |
getProtoRowsBatch()
Partial rows in serialized ProtoRows format.
|
ProtoRowsBatchOrBuilder |
getProtoRowsBatchOrBuilder()
Partial rows in serialized ProtoRows format.
|
boolean |
getReset()
If `true`, any data buffered since the last non-empty `resume_token` must
be discarded before the other parts of this message, if any, are handled.
|
com.google.protobuf.ByteString |
getResumeToken()
An opaque token sent by the server to allow query resumption and signal
that the buffered values constructed from received `partial_rows` can be
yielded to the caller.
|
int |
getSerializedSize() |
boolean |
hasBatchChecksum()
CRC32C checksum of concatenated `partial_rows` data for the current batch.
|
int |
hashCode() |
boolean |
hasProtoRowsBatch()
Partial rows in serialized ProtoRows format.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static PartialResultSet.Builder |
newBuilder() |
static PartialResultSet.Builder |
newBuilder(PartialResultSet prototype) |
PartialResultSet.Builder |
newBuilderForType() |
protected PartialResultSet.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static PartialResultSet |
parseDelimitedFrom(InputStream input) |
static PartialResultSet |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PartialResultSet |
parseFrom(byte[] data) |
static PartialResultSet |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PartialResultSet |
parseFrom(ByteBuffer data) |
static PartialResultSet |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PartialResultSet |
parseFrom(com.google.protobuf.ByteString data) |
static PartialResultSet |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PartialResultSet |
parseFrom(com.google.protobuf.CodedInputStream input) |
static PartialResultSet |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PartialResultSet |
parseFrom(InputStream input) |
static PartialResultSet |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<PartialResultSet> |
parser() |
PartialResultSet.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int PROTO_ROWS_BATCH_FIELD_NUMBER
public static final int BATCH_CHECKSUM_FIELD_NUMBER
public static final int RESUME_TOKEN_FIELD_NUMBER
public static final int RESET_FIELD_NUMBER
public static final int ESTIMATED_BATCH_SIZE_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic PartialResultSet.PartialRowsCase getPartialRowsCase()
getPartialRowsCase in interface PartialResultSetOrBuilderpublic boolean hasProtoRowsBatch()
Partial rows in serialized ProtoRows format.
.google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3;hasProtoRowsBatch in interface PartialResultSetOrBuilderpublic ProtoRowsBatch getProtoRowsBatch()
Partial rows in serialized ProtoRows format.
.google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3;getProtoRowsBatch in interface PartialResultSetOrBuilderpublic ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder()
Partial rows in serialized ProtoRows format.
.google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3;getProtoRowsBatchOrBuilder in interface PartialResultSetOrBuilderpublic boolean hasBatchChecksum()
CRC32C checksum of concatenated `partial_rows` data for the current batch. When present, the buffered data from `partial_rows` forms a complete parseable message of the appropriate type. The client should mark the end of a parseable message and prepare to receive a new one starting from the next `PartialResultSet` message. Clients must verify the checksum of the serialized batch before yielding it to the caller. This does NOT mean the values can be yielded to the callers since a `resume_token` is required to safely do so. If `resume_token` is non-empty and any data has been received since the last one, this field is guaranteed to be non-empty. In other words, clients may assume that a batch will never cross a `resume_token` boundary.
optional uint32 batch_checksum = 6;hasBatchChecksum in interface PartialResultSetOrBuilderpublic int getBatchChecksum()
CRC32C checksum of concatenated `partial_rows` data for the current batch. When present, the buffered data from `partial_rows` forms a complete parseable message of the appropriate type. The client should mark the end of a parseable message and prepare to receive a new one starting from the next `PartialResultSet` message. Clients must verify the checksum of the serialized batch before yielding it to the caller. This does NOT mean the values can be yielded to the callers since a `resume_token` is required to safely do so. If `resume_token` is non-empty and any data has been received since the last one, this field is guaranteed to be non-empty. In other words, clients may assume that a batch will never cross a `resume_token` boundary.
optional uint32 batch_checksum = 6;getBatchChecksum in interface PartialResultSetOrBuilderpublic com.google.protobuf.ByteString getResumeToken()
An opaque token sent by the server to allow query resumption and signal that the buffered values constructed from received `partial_rows` can be yielded to the caller. Clients can provide this token in a subsequent request to resume the result stream from the current point. When `resume_token` is non-empty, the buffered values received from `partial_rows` since the last non-empty `resume_token` can be yielded to the callers, provided that the client keeps the value of `resume_token` and uses it on subsequent retries. A `resume_token` may be sent without information in `partial_rows` to checkpoint the progress of a sparse query. Any previous `partial_rows` data should still be yielded in this case, and the new `resume_token` should be saved for future retries as normal. A `resume_token` will only be sent on a boundary where there is either no ongoing result batch, or `batch_checksum` is also populated. The server will also send a sentinel `resume_token` when last batch of `partial_rows` is sent. If the client retries the ExecuteQueryRequest with the sentinel `resume_token`, the server will emit it again without any data in `partial_rows`, then return OK.
bytes resume_token = 5;getResumeToken in interface PartialResultSetOrBuilderpublic boolean getReset()
If `true`, any data buffered since the last non-empty `resume_token` must be discarded before the other parts of this message, if any, are handled.
bool reset = 7;getReset in interface PartialResultSetOrBuilderpublic int getEstimatedBatchSize()
Estimated size of the buffer required to hold the next batch of results. This value will be sent with the first `partial_rows` of a batch. That is, on the first `partial_rows` received in a stream, on the first message after a `batch_checksum` message, and any time `reset` is true. The client can use this estimate to allocate a buffer for the next batch of results. This helps minimize the number of allocations required, though the buffer size may still need to be increased if the estimate is too low.
int32 estimated_batch_size = 4;getEstimatedBatchSize in interface PartialResultSetOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageIOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static PartialResultSet parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PartialResultSet parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PartialResultSet parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PartialResultSet parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PartialResultSet parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PartialResultSet parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PartialResultSet parseFrom(InputStream input) throws IOException
IOExceptionpublic static PartialResultSet parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PartialResultSet parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static PartialResultSet parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PartialResultSet parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static PartialResultSet parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic PartialResultSet.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static PartialResultSet.Builder newBuilder()
public static PartialResultSet.Builder newBuilder(PartialResultSet prototype)
public PartialResultSet.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected PartialResultSet.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static PartialResultSet getDefaultInstance()
public static com.google.protobuf.Parser<PartialResultSet> parser()
public com.google.protobuf.Parser<PartialResultSet> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic PartialResultSet getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2026 Google LLC. All rights reserved.