mchades commented on code in PR #9460:
URL: https://github.com/apache/gravitino/pull/9460#discussion_r2612831409
##########
catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveCatalogOperations.java:
##########
@@ -788,38 +595,30 @@ public Table createTable(
HiveTable hiveTable =
HiveTable.builder()
.withName(tableIdent.name())
- .withSchemaName(schemaIdent.name())
- .withClientPool(clientPool)
+ .withCatalogName(catalogName)
+ .withDatabaseName(schemaIdent.name())
.withComment(comment)
.withColumns(columns)
.withProperties(properties)
.withDistribution(distribution)
.withSortOrders(sortOrders)
- .withProxyPlugin(proxyPlugin)
.withAuditInfo(
AuditInfo.builder()
-
.withCreator(UserGroupInformation.getCurrentUser().getUserName())
+ .withCreator(PrincipalUtils.getCurrentUserName())
.withCreateTime(Instant.now())
.build())
.withPartitioning(partitioning)
.build();
clientPool.run(
c -> {
-
c.createTable(hiveTable.toHiveTable(propertiesMetadata.tablePropertiesMetadata()));
+ c.createTable(hiveTable);
return null;
});
LOG.info("Created Hive table {} in Hive Metastore", tableIdent.name());
- return hiveTable;
+ return new HiveTableHandle(hiveTable, clientPool);
- } catch (AlreadyExistsException e) {
- throw new TableAlreadyExistsException(e, "Table already exists: %s",
tableIdent.name());
- } catch (TException | InterruptedException e) {
- throw new RuntimeException(
- "Failed to create Hive table " + tableIdent.name() + " in Hive
Metastore", e);
- } catch (RuntimeException e) {
- throw e;
- } catch (Exception e) {
+ } catch (InterruptedException e) {
Review Comment:
why change `catch (Exception e)` to `catch (InterruptedException e)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]