class Google::Cloud::Bigtable::SampleRowKey

# SampleRowKey

Sample row key with byte offset.

NOTE:

@example

require "google/cloud/bigtable"

bigtable = Google::Cloud::Bigtable.new

table = bigtable.table "my-instance", "my-table"

table.sample_row_keys.each do |r|
  p r
end

Attributes

key[R]

@return [String] Sample row key.

offset[R]

@return [Integer] Row offset in bytes.

Public Class Methods

from_grpc(grpc) click to toggle source

@private

Creates a new SampleRowKey instance from a Google::Cloud::Bigtable::V2::SampleRowKey. @param grpc [Google::Cloud::Bigtable::V2::SampleRowKeysResponse] @return [Google::Cloud::Bigtable::SampleRowKey]

# File lib/google/cloud/bigtable/sample_row_key.rb, line 79
def self.from_grpc grpc
  new grpc.row_key, grpc.offset_bytes
end
new(key, offset) click to toggle source

@private

Create SampleRowKey instance.

@param key [String] @param offset [Integer] Row offset in bytes.

# File lib/google/cloud/bigtable/sample_row_key.rb, line 67
def initialize key, offset
  @key = key
  @offset = offset
end