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() .
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
Source File: CatalogToHiveConverter.java From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 | 5 votes |
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
Source File: DatabaseMappingImplTest.java From waggle-dance with Apache License 2.0 | 5 votes |
@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
Source File: DatabaseMappingImpl.java From waggle-dance with Apache License 2.0 | 4 votes |
@Override public TableMeta transformOutboundTableMeta(TableMeta tableMeta) { tableMeta.setDbName(metaStoreMapping.transformOutboundDatabaseName(tableMeta.getDbName())); return tableMeta; }