deniskuzZ commented on PR #5890:
URL: https://github.com/apache/hive/pull/5890#issuecomment-3000155392
@dengzhhu653, alterPartitions API supports batching
````
public List<Partition> alterPartitions(MTable table, List<String> partNames,
List<Partition> newParts, String
queryWriteIdList) throws MetaException {
List<Object[]> rows = Batchable.runBatched(batchSize, partNames, new
Batchable<String, Object[]>() {
}
````
so i don't get why we need to wrap 2 times?
````
Batchable.runBatched(partitionBatchSize, parts, new
Batchable<Partition, Void>() {
@Override
public List<Void> run(List<Partition> input) throws Exception {
msdb.alterPartitions(catalogName, newDbName, newTblName,
input.stream().map(Partition::getValues).collect(Collectors.toList()),
input, newt.getWriteId(), writeIdList);
return Collections.emptyList();
}
});
````
--
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]