ZihanLi58 commented on a change in pull request #3278:
URL: https://github.com/apache/gobblin/pull/3278#discussion_r632074534
##########
File path:
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/writer/HiveMetadataWriter.java
##########
@@ -95,20 +95,21 @@ public HiveMetadataWriter(State state) throws IOException {
@Override
public void flush(String dbName, String tableName) throws IOException {
String tableKey = tableNameJoiner.join(dbName, tableName);
- log.info("start to flush table: " + tableKey);
- HashMap<List<String>, ListenableFuture<Void>> executionMap =
- this.currentExecutionMap.computeIfAbsent(tableKey, s -> new
HashMap<>());
- //iterator all execution to get the result to make sure they all succeeded
- for (HashMap.Entry<List<String>, ListenableFuture<Void>> execution :
executionMap.entrySet()) {
- try {
- execution.getValue().get(timeOutSeconds, TimeUnit.SECONDS);
- } catch (InterruptedException | ExecutionException | TimeoutException e)
{
- log.error("Error when getting the result of registration for table" +
tableKey);
- throw new RuntimeException(e);
+ if(this.currentExecutionMap.containsKey(tableKey)) {
+ log.info("start to flush table: " + tableKey);
+ HashMap<List<String>, ListenableFuture<Void>> executionMap =
this.currentExecutionMap.get(tableKey);
Review comment:
It's the partition value. Since we want to support multi partition here,
it's a list. But most of the time, it only contains one element.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]