morningman commented on code in PR #14134:
URL: https://github.com/apache/doris/pull/14134#discussion_r1020378782
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/PooledHiveMetaStoreClient.java:
##########
@@ -62,49 +64,56 @@ public List<String> getAllDatabases() {
try (CachedClient client = getClient()) {
return client.client.getAllDatabases();
} catch (Exception e) {
- throw new RuntimeException(e);
+ throw new HMSClientException("failed to get all database from hms
client", e);
}
}
public List<String> getAllTables(String dbName) {
try (CachedClient client = getClient()) {
return client.client.getAllTables(dbName);
} catch (Exception e) {
- throw new RuntimeException(e);
+ throw new HMSClientException("failed to get all tables for db %s",
e, dbName);
}
}
public boolean tableExists(String dbName, String tblName) {
try (CachedClient client = getClient()) {
return client.client.tableExists(dbName, tblName);
} catch (Exception e) {
- throw new RuntimeException(e);
+ throw new HMSClientException("failed to check if table %s in db %s
exists", e, tblName, dbName);
+ }
+ }
+
+ public List<String> listPartitionNames(String dbName, String tblName) {
+ try (CachedClient client = getClient()) {
+ return client.client.listPartitionNames(dbName, tblName,
MAX_LIST_PARTITION_NUM);
Review Comment:
Have no idea. We need to test this case
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]