You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/11/27 20:39:55 UTC

[GitHub] gianm closed pull request #6538: Issue# 6537 - Proposed fix for "Unable to rename" exceptions

gianm closed pull request #6538: Issue# 6537 - Proposed fix for "Unable to rename" exceptions
URL: https://github.com/apache/incubator-druid/pull/6538
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java b/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java
index 25f695a1cad..3dca48deed8 100644
--- a/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java
+++ b/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java
@@ -417,8 +417,9 @@ public static DataSegment serializeOutIndex(
           @Override
           public long push() throws IOException
           {
-            try (OutputStream outputStream = outputFS.create(
-                tmpPath,
+               
+           try (OutputStream outputStream = outputFS.create(
+                finalIndexZipFilePath,
                 true,
                 DEFAULT_FS_BUFFER_SIZE,
                 progressable
@@ -435,7 +436,7 @@ public long push() throws IOException
         RetryPolicies.exponentialBackoffRetry(NUM_RETRIES, SECONDS_BETWEEN_RETRIES, TimeUnit.SECONDS)
     );
     zipPusher.push();
-    log.info("Zipped %,d bytes to [%s]", size.get(), tmpPath.toUri());
+    log.info("Zipped %,d bytes to [%s]", size.get(), finalIndexZipFilePath.toUri());
 
     final URI indexOutURI = finalIndexZipFilePath.toUri();
     final DataSegment finalSegment = segmentTemplate
@@ -443,14 +444,6 @@ public long push() throws IOException
         .withSize(size.get())
         .withBinaryVersion(SegmentUtils.getVersionFromDir(mergedBase));
 
-    if (!renameIndexFiles(outputFS, tmpPath, finalIndexZipFilePath)) {
-      throw new IOE(
-          "Unable to rename [%s] to [%s]",
-          tmpPath.toUri().toString(),
-          finalIndexZipFilePath.toUri().toString()
-      );
-    }
-
     writeSegmentDescriptor(
         outputFS,
         finalSegment,


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org