BruceKellan commented on code in PR #7445:
URL: https://github.com/apache/hudi/pull/7445#discussion_r1057150774
##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HoodieHiveSyncClient.java:
##########
@@ -248,6 +250,20 @@ public Option<String> getLastCommitTimeSynced(String
tableName) {
}
}
+ @Override
+ public Option<String> getMetastoreLocation(String tableName) {
+ try {
+ Table table = client.getTable(databaseName, tableName);
+ StorageDescriptor sd = table.getSd();
+ return Option.ofNullable(sd.getLocation());
+ } catch (NoSuchObjectException e) {
+ LOG.warn("the said table not found in hms " + tableId(databaseName,
tableName));
+ return Option.empty();
+ } catch (Exception e) {
+ throw new HoodieHiveSyncException("Failed to get the metastore location
from the table " + tableName, e);
+ }
+ }
Review Comment:
ok
--
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]