CalvinKirs commented on code in PR #67186:
URL: https://github.com/apache/doris/pull/67186#discussion_r3901439813
##########
fe/fe-connector/fe-connector-hms/src/main/java/org/apache/doris/connector/hms/ThriftHmsClient.java:
##########
@@ -240,13 +242,69 @@ static short toThriftMaxParts(int maxParts) {
@Override
public List<HmsPartitionInfo> getPartitions(String dbName,
String tableName, List<String> partNames) {
- return execute(client -> {
- List<Partition> partitions =
- client.getPartitionsByNames(dbName, tableName, partNames);
- return partitions.stream()
- .map(ThriftHmsClient::convertPartition)
- .collect(Collectors.toList());
- });
+ return getPartitionsWithStats(dbName, tableName,
partNames).getPartitions();
+ }
+
+ @Override
+ public List<HmsPartitionInfo> getExistingPartitions(
+ String dbName, String tableName, List<String> partNames) {
+ return getExistingPartitionsWithStats(dbName, tableName,
partNames).getPartitions();
+ }
+
+ @Override
+ public HmsPartitionBatchResult getExistingPartitionsWithStats(
+ String dbName, String tableName, List<String> partNames) {
+ HmsPartitionRequest request = partitionRequest(dbName, tableName,
partNames);
+ if (clientPool != null) {
+ return
newPartitionBatchExecutor(this::getPartitionsByNames).executeExistingWithStats(request);
+ }
+ try (UnpooledPartitionTransport transport = new
UnpooledPartitionTransport()) {
Review Comment:
Fixed in 43bed7de746. The two pool-size-zero partition APIs now share one
unpooled execution helper. When all batch RPCs have completed and only the
final client close fails, it rethrows an HmsClientException with the close
failure as its cause and the completed HmsPartitionBatchStats attached;
execution failures remain unchanged. ThriftHmsClientWriteAcidTest covers both
exact and omission-tolerant APIs, while the existing synchronous and batch
HiveScanBatchModeTest failure cases cover profile publication of attached stats.
--
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]