You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2019/11/18 22:25:57 UTC

[GitHub] [hive] prasanthj commented on a change in pull request #797: HIVE-21146 Enforce TransactionBatch size=1 for blob stores

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org