org.apache.hadoop.hive.metastore.api.Table.setId()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(111)

本文整理了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

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);

相关文章

Table类方法