本文整理了Java中org.apache.hadoop.hive.metastore.api.Table.setId()
方法的一些代码示例,展示了Table.setId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setId()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Table
类名称:Table
方法名:setId
暂无
代码示例来源:origin: apache/hive
pm.makePersistent(mcm);
tbl.setId(mtbl.getId());
代码示例来源:origin: apache/hive
t.setId(mtbl.getId());
t.setRewriteEnabled(mtbl.isRewriteEnabled());
t.setCatName(mtbl.getDatabase().getCatalogName());
代码示例来源:origin: apache/hive
@Test
public void testCreateTableSettingId() throws Exception {
String dbName = "createDb";
String tblName = "createTbl";
client.dropTable(dbName, tblName);
silentDropDatabase(dbName);
new DatabaseBuilder()
.setName(dbName)
.create(client, conf);
Table table = new TableBuilder()
.setDbName(dbName)
.setTableName(tblName)
.addCol("foo", "string")
.addCol("bar", "string")
.build(conf);
table.setId(1);
try {
client.createTable(table);
Assert.fail("An error should happen when setting the id"
+ " to create a table");
} catch (InvalidObjectException e) {
Assert.assertTrue(e.getMessage().contains("Id shouldn't be set"));
Assert.assertTrue(e.getMessage().contains(tblName));
}
}
代码示例来源:origin: apache/hive
unsetId();
} else {
setId((Long)value);
内容来源于网络,如有侵权,请联系作者删除!