@Override public void createTable(Table tbl) throws InvalidObjectException, MetaException { objectStore.createTable(tbl); }
try { openTransaction(); createTable(tbl);
@Override public void createTable(Table tbl) throws InvalidObjectException, MetaException { if (callerVerifier != null) { CallerArguments args = new CallerArguments(tbl.getDbName()); args.tblName = tbl.getTableName(); Boolean success = callerVerifier.apply(args); if ((success != null) && !success) { throw new MetaException("InjectableBehaviourObjectStore: Invalid Create Table operation on DB: " + args.dbName + " table: " + args.tblName); } } super.createTable(tbl); }
@Test public void testGetTableMetaFetchGroup() throws MetaException, InvalidObjectException, InvalidOperationException { objectStore = createObjectStore(); Database db = new Database(DB1, "description", "locurl", null); db.setCatalogName("hive"); objectStore.createDatabase(db); objectStore.createTable(makeTable(DB1, TBL1)); List<TableMeta> tableMeta = objectStore.getTableMeta("hive", "*", "*", Collections.emptyList()); Assert.assertEquals("Number of items for tableMeta is incorrect", 1, tableMeta.size()); Assert.assertEquals("Table name incorrect", TBL1, tableMeta.get(0).getTableName()); Assert.assertEquals("Db name incorrect", DB1, tableMeta.get(0).getDbName()); }
new Table(TABLE1, DB1, "owner", 1, 2, 3, sd, Arrays.asList(partitionKey1, partitionKey2), tableParams, null, null, "MANAGED_TABLE"); objectStore.createTable(tbl1); HashMap<String, String> partitionParams = new HashMap<>(); partitionParams.put("PARTITION_LEVEL_PRIVILEGE", "true");
ptnCols.add(ptnCol1); Table tbl = createTestTbl(dbName, tblName, tblOwner, cols, ptnCols); objectStore.createTable(tbl); tbl = objectStore.getTable(DEFAULT_CATALOG_NAME, dbName, tblName);
new Table(TABLE1, DB1, "owner", 1, 2, 3, sd, Arrays.asList(partitionKey1, partitionKey2), tableParams, null, null, "MANAGED_TABLE"); objectStore.createTable(tbl1); HashMap<String, String> partitionParams = new HashMap<>(); partitionParams.put("PARTITION_LEVEL_PRIVILEGE", "true");
Table table = new Table(tableName, dbName, "me", (int) now, (int) now, 0, sd, partCols, Collections.emptyMap(), null, null, null); store.createTable(table);
Table tbl1 = new Table(TABLE1, DB1, "owner", 1, 2, 3, sd1, null, params, null, null, "MANAGED_TABLE"); objectStore.createTable(tbl1); Assert.assertEquals("Owner type of table was not altered", newTbl1.getOwnerType(), alteredTable.getOwnerType()); objectStore.createTable(tbl1); tables = objectStore.getAllTables(DEFAULT_CATALOG_NAME, DB1); Assert.assertEquals(2, tables.size());
List<FieldSchema> ptnCols = new ArrayList<FieldSchema>(); Table tbl = createTestTbl(dbName, tblName, tblOwner, cols, ptnCols); objectStore.createTable(tbl); tbl = objectStore.getTable(DEFAULT_CATALOG_NAME, dbName, tblName); Table tbl2 = new Table(tbl); tbl2.setTableName(tblName2); objectStore.createTable(tbl2); tbl2 = objectStore.getTable(DEFAULT_CATALOG_NAME, dbName, tblName2);
ptnCols.add(ptnCol1); Table tbl = createTestTbl(dbName, tblName, tblOwner, cols, ptnCols); objectStore.createTable(tbl); tbl = objectStore.getTable(DEFAULT_CATALOG_NAME, dbName, tblName);
.addCol("test_sort_col", "int", "test sort col comment") .build(conf); objectStore.createTable(tbl1);
try { openTransaction(); createTable(tbl);