| 限定符和类型 | 方法和说明 |
|---|---|
void |
create(String projectName,
String tableName,
TableSchema schema)
创建表
|
void |
create(String projectName,
String tableName,
TableSchema schema,
boolean ifNotExists)
创建表
|
void |
create(String tableName,
TableSchema schema)
创建表
|
void |
create(String tableName,
TableSchema schema,
boolean ifNotExists)
创建表
|
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)
获得指定表信息
|
Iterator<Table> |
iterator()
获取默认
Project的所有表信息迭代器 |
Iterator<Table> |
iterator(String projectName)
获取表信息迭代器
|
Iterator<Table> |
iterator(String projectName,
TableFilter filter)
获得表信息迭代器
|
Iterator<Table> |
iterator(TableFilter filter)
获取默认Project的表信息迭代器
|
public boolean exists(String tableName) throws OdpsException
tableName - 表名OdpsExceptionpublic boolean exists(String projectName, String tableName) throws OdpsException
projectName - 所在Project名称tableName - 表名OdpsExceptionpublic Iterator<Table> iterator(TableFilter filter)
filter - 过滤条件Table迭代器public Iterator<Table> iterator(String projectName, TableFilter filter)
public void create(String tableName, TableSchema schema) throws OdpsException
tableName - 表名schema - 表结构 TableSchemaOdpsExceptionpublic void create(String tableName, TableSchema schema, boolean ifNotExists) throws OdpsException
tableName - 表名schema - 表结构 TableSchemaifNotExists - 在创建表时,如果为 false 而存在同名表,则返回出错;若为 true,则无论是否存在同名表,即使原表结构与要创建的目标表结构不一致,均返回成功。已存在的同名表的元信息不会被改动。OdpsExceptionpublic void create(String projectName, String tableName, TableSchema schema) throws OdpsException
projectName - 目标表所在Project名称tableName - 所要创建的Table名称schema - 表结构 TableSchemaOdpsExceptionpublic void create(String projectName, String tableName, TableSchema schema, boolean ifNotExists) throws OdpsException
projectName - 目标表所在Project名称tableName - 所要创建的Table名称schema - 表结构 TableSchemaifNotExists - 在创建表时,如果为 false 而存在同名表,则返回出错;若为 true,则无论是否存在同名表,即使原表结构与要创建的目标表结构不一致,均返回成功。已存在的同名表的元信息不会被改动。OdpsExceptionpublic void delete(String tableName) throws OdpsException
tableName - 表名OdpsExceptionpublic void delete(String tableName, boolean ifExists) throws OdpsException
tableName - 表名ifExists - 如果为 false 表不存在,则返回异常;若为 true,无论表是否存在,皆返回成功。OdpsExceptionpublic void delete(String projectName, String tableName) throws OdpsException
projectName - 表所在ProjecttableName - 表名OdpsExceptionpublic void delete(String projectName, String tableName, boolean ifExists) throws OdpsException
projectName - 表所在ProjecttableName - 表名ifExists - 如果为 false 表不存在,则返回异常;若为 true,无论表是否存在,皆返回成功。OdpsExceptionCopyright © 2015 Alibaba Cloud Computing. All rights reserved.