Class TimePartitioning (2.43.1)

public abstract class TimePartitioning implements Serializable

Objects of this class allow to configure table partitioning based on time. By dividing a large table into smaller partitions, you can improve query performance and reduce the number of bytes billed by restricting the amount of data scanned. See Also: Partitioned Tables

Inheritance

java.lang.Object > TimePartitioning

Implements

Serializable

Static Methods

newBuilder(TimePartitioning.Type type)

public static TimePartitioning.Builder newBuilder(TimePartitioning.Type type)

Returns a TimePartitioning object given the time partitioning type.

Parameter
Name Description
type TimePartitioning.Type
Returns
Type Description
TimePartitioning.Builder

of(TimePartitioning.Type type)

public static TimePartitioning of(TimePartitioning.Type type)

Returns a TimePartitioning object given the time partitioning type. The partitions will not expire.

Parameter
Name Description
type TimePartitioning.Type
Returns
Type Description
TimePartitioning

of(TimePartitioning.Type type, long expirationMs)

public static TimePartitioning of(TimePartitioning.Type type, long expirationMs)

Returns a TimePartitioning object given the time partitioning type and the partition's expiration in milliseconds.

Parameters
Name Description
type TimePartitioning.Type

the time partitioning type.

expirationMs long

the number of milliseconds for which to keep the storage for a partition

Returns
Type Description
TimePartitioning

Methods

getExpirationMs()

public abstract Long getExpirationMs()

Returns the number of milliseconds for which to keep the storage for a partition. When expired, the storage for the partition is reclaimed. If null, the partion does not expire.

Returns
Type Description
Long

getField()

public abstract String getField()

If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partitioned by this field.

Returns
Type Description
String

getRequirePartitionFilter()

public abstract Boolean getRequirePartitionFilter()

If set to true, queries over this table require a partition filter (that can be used for partition elimination) to be specified.

Returns
Type Description
Boolean

getType()

public abstract TimePartitioning.Type getType()

Returns the time partitioning type.

Returns
Type Description
TimePartitioning.Type

toBuilder()

public abstract TimePartitioning.Builder toBuilder()
Returns
Type Description
TimePartitioning.Builder