Class: Google::Apis::SpannerV1::PartitionOptions

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/spanner_v1/classes.rb,
generated/google/apis/spanner_v1/representations.rb,
generated/google/apis/spanner_v1/representations.rb

Overview

Options for a PartitionQueryRequest and PartitionReadRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PartitionOptions

Returns a new instance of PartitionOptions



1734
1735
1736
# File 'generated/google/apis/spanner_v1/classes.rb', line 1734

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#max_partitionsFixnum

Note: This hint is currently ignored by PartitionQuery and PartitionRead requests. The desired maximum number of partitions to return. For example, this may be set to the number of workers available. The default for this option is currently 10,000. The maximum value is currently 200,000. This is only a hint. The actual number of partitions returned may be smaller or larger than this maximum count request. Corresponds to the JSON property maxPartitions

Returns:

  • (Fixnum)


1723
1724
1725
# File 'generated/google/apis/spanner_v1/classes.rb', line 1723

def max_partitions
  @max_partitions
end

#partition_size_bytesFixnum

Note: This hint is currently ignored by PartitionQuery and PartitionRead requests. The desired data size for each partition generated. The default for this option is currently 1 GiB. This is only a hint. The actual size of each partition may be smaller or larger than this size request. Corresponds to the JSON property partitionSizeBytes

Returns:

  • (Fixnum)


1732
1733
1734
# File 'generated/google/apis/spanner_v1/classes.rb', line 1732

def partition_size_bytes
  @partition_size_bytes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1739
1740
1741
1742
# File 'generated/google/apis/spanner_v1/classes.rb', line 1739

def update!(**args)
  @max_partitions = args[:max_partitions] if args.key?(:max_partitions)
  @partition_size_bytes = args[:partition_size_bytes] if args.key?(:partition_size_bytes)
end