TableUsage

class borneo.TableUsage(start_time_ms, seconds_in_period, read_units, write_units, storage_gb, read_throttle_count, write_throttle_count, storage_throttle_count, max_shard_usage_percent)[source]

Bases: object

TableUsage represents a single usage record, or slice, that includes information about read and write throughput consumed during that period as well as the current information regarding storage capacity. In addition the count of throttling exceptions for the period is reported.

Methods Summary

get_max_shard_usage_percent()

Returns the percentage of allowed storage usage for the shard with the highest usage percentage across all table shards.

get_read_throttle_count()

Returns the number of read throttling exceptions on this table in the time period.

get_read_units()

Returns the number of read units consumed during this period.

get_seconds_in_period()

Returns the number of seconds in this usage record.

get_start_time()

Returns the start time for this usage record in milliseconds since the Epoch.

get_start_time_string()

Returns the start time as an ISO 8601 formatted string.

get_storage_gb()

Returns the amount of storage consumed by the table.

get_storage_throttle_count()

Returns the number of storage throttling exceptions on this table in the time period.

get_write_throttle_count()

Returns the number of write throttling exceptions on this table in the time period.

get_write_units()

Returns the number of write units consumed during this period.

Methods Documentation

get_max_shard_usage_percent()[source]

Returns the percentage of allowed storage usage for the shard with the highest usage percentage across all table shards. This can be used as a gauge of toal storage available as well as a hint for key distribution. :returns: the percentage :rtype: int :versionadded:: 5.4.0

get_read_throttle_count()[source]

Returns the number of read throttling exceptions on this table in the time period.

Returns:

the number of throttling exceptions.

Return type:

int

get_read_units()[source]

Returns the number of read units consumed during this period.

Returns:

the read units.

Return type:

int

get_seconds_in_period()[source]

Returns the number of seconds in this usage record.

Returns:

the number of seconds.

Return type:

int

get_start_time()[source]

Returns the start time for this usage record in milliseconds since the Epoch.

Returns:

the start time.

Return type:

int

get_start_time_string()[source]

Returns the start time as an ISO 8601 formatted string. If the start timestamp is not set, None is returned.

Returns:

the start time, or None if not set.

Return type:

str or None

get_storage_gb()[source]

Returns the amount of storage consumed by the table. This information may be out of date as it is not maintained in real time.

Returns:

the size in gigabytes.

Return type:

int

get_storage_throttle_count()[source]

Returns the number of storage throttling exceptions on this table in the time period.

Returns:

the number of throttling exceptions.

Return type:

int

get_write_throttle_count()[source]

Returns the number of write throttling exceptions on this table in the time period.

Returns:

the number of throttling exceptions.

Return type:

int

get_write_units()[source]

Returns the number of write units consumed during this period.

Returns:

the write units.

Return type:

int