public class PartitionSpec extends Object
| Constructor and Description |
|---|
PartitionSpec()
构造此类的对象
|
PartitionSpec(String spec)
通过字符串构造此类对象
|
| Modifier and Type | Method and Description |
|---|---|
String |
get(String key)
获得指定分区字段值
|
boolean |
isEmpty()
是否指定了分区字段
|
Set<String> |
keys()
获取所有分区字段
|
void |
set(String key,
String value)
设置分区字段值
|
String |
toString()
Convert a
PartitionSpec object to String. |
String |
toString(boolean quote,
boolean useSlashDelimiter)
Convert a
PartitionSpec object to String. |
public PartitionSpec()
public PartitionSpec(String spec)
spec - 分区定义字符串,分区列之间可以用逗号 (",") 或斜线 ("/") 分隔. 例如: "pt1=foo/pt2=1" 或 "pt1=foo,pt2=1"public boolean isEmpty()
public String toString()
PartitionSpec object to String. Partition column values are quoted
with single quotation marks. Partition column name and value pairs are separated with comma.public String toString(boolean quote, boolean useSlashDelimiter)
PartitionSpec object to String. The delimiter of partition column
name and value pairs can be comma (",") or slash ("/").quote - quote the partition column valueuseSlashDelimiter - use comma as delimiterCopyright © 2021 Alibaba Cloud Computing. All rights reserved.