public class Partition extends LazyLoad
Modifier and Type | Method and Description |
---|---|
void |
addSimpleTag(String category,
String key,
String value)
Attach a simple tag to a partition.
|
void |
addSimpleTag(String category,
String key,
String value,
List<String> columnNames)
Attach a simple tag to a partition or some of its columns.
|
void |
addTag(Tag tag)
Attach a
Tag to a partition. |
void |
addTag(Tag tag,
List<String> columnNames)
Attach a
Tag to a partition. |
Table.ClusterInfo |
getClusterInfo()
返回 cluster range partition 的 cluster 信息
|
Date |
getCreatedTime()
获取分区的创建时间
|
long |
getFileNum()
获取分区数据的文件数
|
Date |
getLastDataAccessTime()
获取分区数据的最后访问时间
|
Date |
getLastDataModifiedTime()
获取分区数据的最后修改时间
|
Date |
getLastMetaModifiedTime()
获取分区的Meta修改时间
|
long |
getLifeCycle()
获取表的生命周期
|
PartitionSpec |
getPartitionSpec()
获得
PartitionSpec 对象 |
long |
getPhysicalSize()
获得分区数据的物理大小,单位Byte
|
long |
getRecordNum()
获取分区数据的Record数,若无准确数据,则返回-1
|
String |
getReserved()
返回扩展信息的保留字段
json 字符串
|
Map<String,Map<String,String>> |
getSimpleTags()
Get simple tags attached to this partition.
|
Map<String,Map<String,String>> |
getSimpleTags(String columnName)
Get simple tags attached to a column of this partition.
|
long |
getSize()
获取分区内部存储的大小,单位Byte
|
List<Tag> |
getTags()
Get
Tag (s) attached to this partition. |
List<Tag> |
getTags(String columnName)
Get
Tag (s) attached to a column of this partition. |
boolean |
isArchived()
查看表是否进行了归档
|
boolean |
isExstore() |
void |
reload()
重新加载属性值
|
void |
removeSimpleTag(String category,
String key,
String value)
Remove a simple tag.
|
void |
removeSimpleTag(String category,
String key,
String value,
List<String> columnNames)
Remove a simple tag from columns.
|
void |
removeTag(Tag tag)
Remove a
Tag . |
void |
removeTag(Tag tag,
List<String> columnNames)
Remove a
Tag from columns. |
public PartitionSpec getPartitionSpec()
PartitionSpec
对象PartitionSpec
对象public Date getCreatedTime()
public Date getLastMetaModifiedTime()
public Date getLastDataModifiedTime()
public Date getLastDataAccessTime()
public long getRecordNum()
public boolean isArchived()
public boolean isExstore()
public long getLifeCycle()
public long getPhysicalSize()
public long getFileNum()
public long getSize()
public String getReserved()
public Table.ClusterInfo getClusterInfo()
public List<Tag> getTags(String columnName)
Tag
(s) attached to a column of this partition.Tag
public Map<String,Map<String,String>> getSimpleTags()
public Map<String,Map<String,String>> getSimpleTags(String columnName)
columnName
- column name.public void addTag(Tag tag) throws OdpsException
Tag
to a partition. The partition and tag should be in a same project.tag
- tag to attachOdpsException
public void addTag(Tag tag, List<String> columnNames) throws OdpsException
Tag
to a partition. The partition and tag should be in a same project.tag
- tag to attachcolumnNames
- column names, could be null.OdpsException
public void addSimpleTag(String category, String key, String value) throws OdpsException
category
- simple tag category, could be nul.key
- simple tag key, cannot be null.value
- simple tag value, cannot be null.OdpsException
public void addSimpleTag(String category, String key, String value, List<String> columnNames) throws OdpsException
category
- simple tag category, could be nul.key
- simple tag key, cannot be null.value
- simple tag value, cannot be null.columnNames
- column names, should not include any partition column, could be null.OdpsException
public void removeTag(Tag tag) throws OdpsException
Tag
.tag
- tag to remove.OdpsException
public void removeTag(Tag tag, List<String> columnNames) throws OdpsException
Tag
from columns.tag
- tag to remove.columnNames
- column names, should not include any partition column, could be null.OdpsException
public void removeSimpleTag(String category, String key, String value) throws OdpsException
category
- category.key
- key.value
- value.OdpsException
public void removeSimpleTag(String category, String key, String value, List<String> columnNames) throws OdpsException
category
- category.key
- key.value
- value.columnNames
- column names, should not include any partition column, could be null.OdpsException
public void reload() throws OdpsException
LazyLoad
reload
in class LazyLoad
OdpsException
Copyright © 2023 Alibaba Cloud Computing. All rights reserved.