/** * @param owner * @see org.apache.hadoop.hive.metastore.api.Table#setOwner(java.lang.String) */ public void setOwner(String owner) { tTable.setOwner(owner); }
newTbl1.setOwner("role1"); newTbl1.setOwnerType(PrincipalType.ROLE);
/** * @param owner * @see org.apache.hadoop.hive.metastore.api.Table#setOwner(java.lang.String) */ public void setOwner(String owner) { tTable.setOwner(owner); }
tbl.setOwner(tblOwner); tbl.setOwnerType(PrincipalType.ROLE); objectStore.alterTable(DEFAULT_CATALOG_NAME, dbName, tblName, tbl, null);
public static org.apache.hadoop.hive.metastore.api.Table toMetastoreApiTable(Table table, PrincipalPrivileges privileges) { org.apache.hadoop.hive.metastore.api.Table result = new org.apache.hadoop.hive.metastore.api.Table(); result.setDbName(table.getDatabaseName()); result.setTableName(table.getTableName()); result.setOwner(table.getOwner()); result.setTableType(table.getTableType()); result.setParameters(table.getParameters()); result.setPartitionKeys(table.getPartitionColumns().stream().map(ThriftMetastoreUtil::toMetastoreApiFieldSchema).collect(toList())); result.setSd(makeStorageDescriptor(table.getTableName(), table.getDataColumns(), table.getStorage())); result.setPrivileges(toMetastoreApiPrincipalPrivilegeSet(table.getOwner(), privileges)); result.setViewOriginalText(table.getViewOriginalText().orElse(null)); result.setViewExpandedText(table.getViewExpandedText().orElse(null)); return result; }
unsetOwner(); } else { setOwner((String)value);
table.setOwner(hiveTable.getOwner().get());
t.setDbName(databaseName); t.setTableName(tableName); t.setOwner(SessionState.getUserFromAuthenticator());
t.setDbName(databaseName); t.setTableName(tableName); t.setOwner(SessionState.getUserFromAuthenticator());
try { newTable.setOwner(owner == null? getConf().getUser() : owner);
table.setTableName(tableName); table.setDbName(dbName); table.setOwner("me"); table.setSd(newStorageDescriptor(getLocation(tableName, null), sortCols)); List<FieldSchema> partKeys = new ArrayList<FieldSchema>(1);
Table build() { StorageDescriptor sd = new StorageDescriptor(); if (columns == null) { sd.setCols(Collections.emptyList()); } else { sd.setCols(columns); } SerDeInfo serdeInfo = new SerDeInfo(); serdeInfo.setSerializationLib(serde); serdeInfo.setName(tableName); sd.setSerdeInfo(serdeInfo); sd.setInputFormat(inputFormat); sd.setOutputFormat(outputFormat); if (location != null) { sd.setLocation(location); } Table table = new Table(); table.setDbName(dbName); table.setTableName(tableName); table.setSd(sd); table.setParameters(parameters); table.setOwner(owner); if (partitionKeys != null) { table.setPartitionKeys(partitionKeys); } table.setTableType(tableType.toString()); return table; } }
/** * @param owner * @see org.apache.hadoop.hive.metastore.api.Table#setOwner(java.lang.String) */ public void setOwner(String owner) { tTable.setOwner(owner); }
/** * @param owner * @see org.apache.hadoop.hive.metastore.api.Table#setOwner(java.lang.String) */ public void setOwner(String owner) { tTable.setOwner(owner); }
table.setOwner(hiveTable.getOwner().get());
table.setOwner(hiveTable.getOwner().get());
public static org.apache.hadoop.hive.metastore.api.Table toMetastoreApiTable(Table table, PrincipalPrivileges privileges) { org.apache.hadoop.hive.metastore.api.Table result = new org.apache.hadoop.hive.metastore.api.Table(); result.setDbName(table.getDatabaseName()); result.setTableName(table.getTableName()); result.setOwner(table.getOwner()); result.setTableType(table.getTableType()); result.setParameters(table.getParameters()); result.setPartitionKeys(table.getPartitionColumns().stream().map(ThriftMetastoreUtil::toMetastoreApiFieldSchema).collect(toList())); result.setSd(makeStorageDescriptor(table.getTableName(), table.getDataColumns(), table.getStorage())); result.setPrivileges(toMetastoreApiPrincipalPrivilegeSet(privileges)); result.setViewOriginalText(table.getViewOriginalText().orElse(null)); result.setViewExpandedText(table.getViewExpandedText().orElse(null)); return result; }
try { newTable.setOwner(owner == null? getConf().getUser() : owner);
try { newTable.setOwner(owner == null? getConf().getUser() : owner);
table.setDbName(schemaName); table.setTableName(tableName); table.setOwner(tableOwner); table.setTableType(TableType.MANAGED_TABLE.toString()); table.setParameters(ImmutableMap.of());