public class RelationalTable extends java.lang.Object implements Table, SupportsPartitions
| Constructor and Description |
|---|
RelationalTable(Namespace namespace,
TableDTO tableDTO,
RESTClient restClient)
Creates a new RelationalTable.
|
| Modifier and Type | Method and Description |
|---|---|
Partition |
addPartition(Partition partition)
Adds a partition to the table.
|
Audit |
auditInfo() |
Column[] |
columns() |
java.lang.String |
comment() |
Distribution |
distribution() |
boolean |
dropPartition(java.lang.String partitionName)
Drops the partition with the given name.
|
protected static java.lang.String |
formatPartitionRequestPath(java.lang.String prefix,
java.lang.String partitionName)
Formats the partition request path.
|
static RelationalTable |
from(Namespace namespace,
TableDTO tableDTO,
RESTClient restClient)
Creates a new RelationalTable.
|
Partition |
getPartition(java.lang.String partitionName)
Returns the partition with the given name.
|
java.lang.String |
getPartitionRequestPath() |
Index[] |
index() |
java.lang.String[] |
listPartitionNames()
List all partition names of the table
|
Partition[] |
listPartitions()
List all partitions
|
java.lang.String |
name()
Returns the name of the table.
|
Namespace |
namespace()
Returns the namespace of the table.
|
Transform[] |
partitioning() |
java.util.Map<java.lang.String,java.lang.String> |
properties() |
SortOrder[] |
sortOrder() |
SupportsPartitions |
supportPartitions()
Returns the partitioning strategy of the table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpartitionExists, purgePartitionpublic RelationalTable(Namespace namespace, TableDTO tableDTO, RESTClient restClient)
namespace - The namespace of the table.tableDTO - The table data transfer object.restClient - The REST client.public static RelationalTable from(Namespace namespace, TableDTO tableDTO, RESTClient restClient)
namespace - The namespace of the table.tableDTO - The table data transfer object.restClient - The REST client.public Namespace namespace()
public java.lang.String name()
public Column[] columns()
public Transform[] partitioning()
partitioning in interface Tablepublic SortOrder[] sortOrder()
public Distribution distribution()
distribution in interface Table@Nullable public java.lang.String comment()
public java.util.Map<java.lang.String,java.lang.String> properties()
properties in interface Tablepublic Audit auditInfo()
public Index[] index()
public java.lang.String[] listPartitionNames()
SupportsPartitionslistPartitionNames in interface SupportsPartitionspublic java.lang.String getPartitionRequestPath()
public Partition[] listPartitions()
SupportsPartitionslistPartitions in interface SupportsPartitionspublic Partition getPartition(java.lang.String partitionName) throws NoSuchPartitionException
getPartition in interface SupportsPartitionspartitionName - the name of the partitionNoSuchPartitionException - if the partition does not exist, throws this exception.public Partition addPartition(Partition partition) throws PartitionAlreadyExistsException
addPartition in interface SupportsPartitionspartition - The partition to add.PartitionAlreadyExistsException - If the partition already exists, throws this exception.public boolean dropPartition(java.lang.String partitionName)
dropPartition in interface SupportsPartitionspartitionName - The identifier of the partition.public SupportsPartitions supportPartitions() throws java.lang.UnsupportedOperationException
supportPartitions in interface Tablejava.lang.UnsupportedOperationException - If the table does not support partition operations.protected static java.lang.String formatPartitionRequestPath(java.lang.String prefix,
java.lang.String partitionName)
prefix - The prefix of the path.partitionName - The name of the partition.