You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/30 16:02:09 UTC

[GitHub] [iceberg] rizaon commented on a diff in pull request #4518: core: Provide mechanism to cache manifest file content

rizaon commented on code in PR #4518:
URL: https://github.com/apache/iceberg/pull/4518#discussion_r958669856


##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -300,4 +328,14 @@ private static ManifestFile copyManifestInternal(
 
     return writer.toManifestFile();
   }
+
+  private static InputFile newInputFile(FileIO io, String path, long length) {
+    InputFile inputFile = io.newInputFile(path, length);

Review Comment:
   `inputFile` is not used as cache key, but rather as a fallback within `CachingInputFile` class (field `wrappedInputFile `) if `path` does not exist in `ContentCache` yet.
   
   I understand that `HadoopInputFile.fromLocation()` will create a new `FileSystem` upon initialization. Maybe I can tweak the code to lazily instantiate `wrappedInputFile` by passing `io`, `path`, and `length` instead as constructor parameters of `CachingInputFile`?



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org