Modifier and Type | Method and Description |
---|---|
void |
create(String projectName,
String tableName,
TableSchema schema)
创建表
|
void |
create(String projectName,
String tableName,
TableSchema schema,
boolean ifNotExists)
创建表
|
void |
create(String projectName,
String tableName,
TableSchema schema,
boolean ifNotExists,
Long shardNum,
Long hubLifecycle)
创建表
|
void |
create(String projectName,
String tableName,
TableSchema schema,
String comment,
boolean ifNotExists)
创建表
|
void |
create(String projectName,
String tableName,
TableSchema schema,
String comment,
boolean ifNotExists,
Long shardNum,
Long hubLifecycle)
创建表
|
void |
create(String tableName,
TableSchema schema)
创建表
|
void |
create(String tableName,
TableSchema schema,
boolean ifNotExists)
创建表
|
void |
createTableWithLifeCycle(String projectName,
String tableName,
TableSchema schema,
String comment,
boolean ifNotExists,
Long lifeCycle)
创建表
|
void |
delete(String tableName)
删除表
|
void |
delete(String tableName,
boolean ifExists)
删除表
|
void |
delete(String projectName,
String tableName)
删除表
|
void |
delete(String projectName,
String tableName,
boolean ifExists)
删除表
|
boolean |
exists(String tableName)
判断指定表是否存在
|
boolean |
exists(String projectName,
String tableName)
判断指定表是否存在
|
Table |
get(String tableName)
获得指定表信息
|
Table |
get(String projectName,
String tableName)
获得指定表信息
|
Iterable<Table> |
iterable()
获取默认
Project 的所有表信息迭代器 iterable |
Iterable<Table> |
iterable(String projectName)
获取表信息迭代器 iterable
|
Iterable<Table> |
iterable(String projectName,
TableFilter filter)
获得表信息迭代器 iterable
|
Iterable<Table> |
iterable(TableFilter filter)
获取默认Project的表信息迭代器 iterable
|
Iterator<Table> |
iterator()
获取默认
Project 的所有表信息迭代器 |
Iterator<Table> |
iterator(String projectName)
获取表信息迭代器
|
Iterator<Table> |
iterator(String projectName,
TableFilter filter)
获得表信息迭代器
|
Iterator<Table> |
iterator(TableFilter filter)
获取默认Project的表信息迭代器
|
List<Table> |
loadTables(Collection<String> tableNames)
批量加载表信息
|
List<Table> |
loadTables(String projectName,
Collection<String> tableNames)
批量加载表信息
|
List<Table> |
reloadTables(Collection<Table> tables)
批量加载表信息
|
List<Table> |
reloadTables(Iterator<Table> tables)
批量加载表信息
rest api 对请求数量有限制, 目前一次操作最多可请求 100 张表信息; 返回的表数据,与操作权限有关. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public boolean exists(String tableName) throws OdpsException
tableName
- 表名OdpsException
public boolean exists(String projectName, String tableName) throws OdpsException
projectName
- 所在Project
名称tableName
- 表名OdpsException
public Iterator<Table> iterator(TableFilter filter)
filter
- 过滤条件Table
迭代器public Iterator<Table> iterator(String projectName, TableFilter filter)
public Iterable<Table> iterable(TableFilter filter)
filter
- 过滤条件Table
迭代器public Iterable<Table> iterable(String projectName, TableFilter filter)
public void create(String tableName, TableSchema schema) throws OdpsException
tableName
- 表名schema
- 表结构 TableSchema
OdpsException
public void create(String tableName, TableSchema schema, boolean ifNotExists) throws OdpsException
tableName
- 表名schema
- 表结构 TableSchema
ifNotExists
- 在创建表时,如果为 false 而存在同名表,则返回出错;若为 true,则无论是否存在同名表,即使原表结构与要创建的目标表结构不一致,均返回成功。已存在的同名表的元信息不会被改动。OdpsException
public void create(String projectName, String tableName, TableSchema schema, boolean ifNotExists, Long shardNum, Long hubLifecycle) throws OdpsException
projectName
- 目标表所在Project
名称tableName
- 表名schema
- 表结构 TableSchema
ifNotExists
- 在创建表时,如果为 false 而存在同名表,则返回出错;若为 true,则无论是否存在同名表,即使原表结构与要创建的目标表结构不一致,均返回成功。已存在的同名表的元信息不会被改动。shardNum
- 表中shard数量,小于0表示未设置hubLifecycle
- Hub表生命周期,小于0表示未设置OdpsException
public void create(String projectName, String tableName, TableSchema schema) throws OdpsException
projectName
- 目标表所在Project
名称tableName
- 所要创建的Table
名称schema
- 表结构 TableSchema
OdpsException
public void create(String projectName, String tableName, TableSchema schema, boolean ifNotExists) throws OdpsException
projectName
- 目标表所在Project
名称tableName
- 所要创建的Table
名称schema
- 表结构 TableSchema
ifNotExists
- 在创建表时,如果为 false 而存在同名表,则返回出错;若为 true,则无论是否存在同名表,即使原表结构与要创建的目标表结构不一致,均返回成功。已存在的同名表的元信息不会被改动。OdpsException
public void create(String projectName, String tableName, TableSchema schema, String comment, boolean ifNotExists, Long shardNum, Long hubLifecycle) throws OdpsException
projectName
- 目标表所在Project
名称tableName
- 所要创建的Table
名称schema
- 表结构 TableSchema
comment
- 表注释, 其中不能带有单引号ifNotExists
- 在创建表时,如果为 false 而存在同名表,则返回出错;若为 true,则无论是否存在同名表,即使原表结构与要创建的目标表结构不一致,均返回成功。已存在的同名表的元信息不会被改动。shardNum
- 表中shard数量,小于0表示未设置hubLifecycle
- Hub表生命周期,小于0表示未设置OdpsException
public void create(String projectName, String tableName, TableSchema schema, String comment, boolean ifNotExists) throws OdpsException
projectName
- 目标表所在Project
名称tableName
- 所要创建的Table
名称schema
- 表结构 TableSchema
comment
- 表注释, 其中不能带有单引号ifNotExists
- OdpsException
public void createTableWithLifeCycle(String projectName, String tableName, TableSchema schema, String comment, boolean ifNotExists, Long lifeCycle) throws OdpsException
projectName
- 目标表所在Project
名称tableName
- 所要创建的Table
名称schema
- 表结构 TableSchema
comment
- 表注释, 其中不能带有单引号ifNotExists
- lifeCycle
- 表生命周期OdpsException
public void delete(String tableName) throws OdpsException
tableName
- 表名OdpsException
public void delete(String tableName, boolean ifExists) throws OdpsException
tableName
- 表名ifExists
- 如果为 false 表不存在,则返回异常;若为 true,无论表是否存在,皆返回成功。OdpsException
public void delete(String projectName, String tableName) throws OdpsException
projectName
- 表所在Project
tableName
- 表名OdpsException
public void delete(String projectName, String tableName, boolean ifExists) throws OdpsException
projectName
- 表所在Project
tableName
- 表名ifExists
- 如果为 false 表不存在,则返回异常;若为 true,无论表是否存在,皆返回成功。OdpsException
public List<Table> loadTables(Collection<String> tableNames) throws OdpsException
tableNames
- 表名Table
列表OdpsException
public List<Table> loadTables(String projectName, Collection<String> tableNames) throws OdpsException
projectName
- 指定Project
名称tableNames
- 表名Table
列表OdpsException
public List<Table> reloadTables(Collection<Table> tables) throws OdpsException
tables
- 请求表的容器Table
列表OdpsException
public List<Table> reloadTables(Iterator<Table> tables) throws OdpsException
tables
- 请求表的迭代器Table
列表OdpsException
Copyright © 2020 Alibaba Cloud Computing. All rights reserved.