prasanthj commented on a change in pull request #797: HIVE-21146 Enforce 
TransactionBatch size=1 for blob stores
URL: https://github.com/apache/hive/pull/797#discussion_r347642281
 
 

 ##########
 File path: 
streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java
 ##########
 @@ -520,6 +523,28 @@ private void validateTable() throws InvalidTable, 
ConnectionError {
       LOG.error(errMsg);
       throw new ConnectionError(errMsg);
     }
+
+    // batch size is only used for managed transactions, not for unmanaged 
single transactions
+    if (transactionBatchSize > 1) {
+      try (FileSystem fs = tableObject.getDataLocation().getFileSystem(conf)) {
+        if (BlobStorageUtils.isBlobStorageFileSystem(conf, fs)) {
+          // currently not all filesystems implement StreamCapabilities, while 
FSDataOutputStream does
+          Path path = new Path(tableObject.getDataLocation(), 
"tmp_stream_verify_" + UUID.randomUUID().toString());
 
 Review comment:
   I am not sure if putting files under table location is a good idea. Better 
place would be use the /tmp location but if that is not accessible for some 
reason atleast the files created under the table location should start with "." 
or "_" so that file listing ignores such files. 

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