maheshk114 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_r281448738
##########
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:
what if for same partition value path is already there ..is it ok to ignore
it ? i think assert can be added for writeDir to be same
----------------------------------------------------------------
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]