Java Code Examples for org.apache.hadoop.hive.metastore.api.TableMeta#setDbName()

The following examples show how to use org.apache.hadoop.hive.metastore.api.TableMeta#setDbName() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public static TableMeta convertTableMeta(com.amazonaws.services.glue.model.Table catalogTable, String dbName) {
  TableMeta tableMeta = new TableMeta();
  tableMeta.setDbName(dbName);
  tableMeta.setTableName(catalogTable.getName());
  tableMeta.setTableType(catalogTable.getTableType());
  if (catalogTable.getParameters().containsKey("comment")) {
    tableMeta.setComments(catalogTable.getParameters().get("comment"));
  }
  return tableMeta;
}
 
Example 2
@Test
public void transformOutboundTableMeta() throws Exception {
  TableMeta tableMeta = new TableMeta();
  tableMeta.setDbName(DB_NAME);
  TableMeta result = databaseMapping.transformOutboundTableMeta(tableMeta);
  assertThat(result, is(sameInstance(tableMeta)));
  assertThat(result.getDbName(), is(OUT_DB_NAME));
}
 
Example 3
@Override
public TableMeta transformOutboundTableMeta(TableMeta tableMeta) {
  tableMeta.setDbName(metaStoreMapping.transformOutboundDatabaseName(tableMeta.getDbName()));
  return tableMeta;
}