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 2022/12/09 21:48:06 UTC

[GitHub] [druid] gianm commented on a diff in pull request #13394: Zero-copy local deep storage.

gianm commented on code in PR #13394:
URL: https://github.com/apache/druid/pull/13394#discussion_r1044865405


##########
server/src/main/java/org/apache/druid/segment/loading/LocalDataSegmentPusher.java:
##########
@@ -106,27 +130,61 @@ public DataSegment pushToPath(File dataSegmentFile, DataSegment segment, String
         throw new IOE("Failed to rename [%s] to [%s]", tmpIndexFile, indexFileTarget);
       }
 
-      return dataSegment;
+      return baseSegment.withLoadSpec(makeLoadSpec(new File(outDir, INDEX_ZIP_FILENAME).toURI()))
+                        .withSize(size);
     }
     finally {
-      FileUtils.deleteDirectory(tmpOutDir);
+      FileUtils.deleteDirectory(tmpSegmentDir);
     }
   }
 
-  @Override
-  public Map<String, Object> makeLoadSpec(URI finalIndexZipFilePath)
+  private DataSegment pushNoZip(final File inDir, final File outDir, final DataSegment baseSegment) throws IOException

Review Comment:
   Yep, that is exactly how hard links work.



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

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org