sankarh commented on a change in pull request #615: HIVE-21671: Replicate 
Streaming ingestion with transactional batch size as 1.
URL: https://github.com/apache/hive/pull/615#discussion_r281784027
 
 

 ##########
 File path: 
streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java
 ##########
 @@ -686,6 +693,75 @@ private static IMetaStoreClient 
getMetaStoreClient(HiveConf conf, String metasto
     }
   }
 
+  private class WriteDirInfo {
+    List<String> partitionVals;
+    Path writeDir;
+
+    WriteDirInfo(List<String> partitionVals, Path writeDir) {
+      this.partitionVals = partitionVals;
+      this.writeDir = writeDir;
+    }
+
+    List<String> getPartitionVals() {
+      return this.partitionVals;
+    }
+
+    Path getWriteDir() {
+      return this.writeDir;
+    }
+  }
+
+  @Override
+  public void addWriteDirectoryInfo(List<String> partitionValues, Path 
writeDir) {
+    String key = (partitionValues == null) ? 
tableObject.getFullyQualifiedName()
+            : partitionValues.toString();
+    if (!writePaths.containsKey(key)) {
+      writePaths.put(key, new WriteDirInfo(partitionValues, writeDir));
 
 Review comment:
   It is not possible to have more than one delta directory for partition from 
same streaming txn. So, even if multiple bucket files created within same delta 
dir, this is guaranteed that writeDir is same. Will add assert.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to