[ 
https://issues.apache.org/jira/browse/ORC-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978046#comment-16978046
 ] 

Owen O'Malley commented on ORC-570:
-----------------------------------

I'm sorry, but I don't understand what is going wrong in the current code base. 
It already postpones creating the FileSystem until it needs it.

In particular, the code looks like:
{code}
      if (orcTail == null) {
        tail = extractFileTail(getFileSystem(), path, options.getMaxLength());
        options.orcTail(tail);
      } else {
        checkOrcVersion(path, orcTail.getPostScript());
        tail = orcTail;
      }
{code}

where ReaderImpl.getFileSystem() is where the FileSystem object is created. The 
only other place where getFileSystem is called is when we are creating a 
RecordReaderImpl, where we need the FileSystem because we are about to read the 
data.

What am I missing?

> FS: ReaderOptions.filesystem should also accept a lazy Supplier 
> ----------------------------------------------------------------
>
>                 Key: ORC-570
>                 URL: https://issues.apache.org/jira/browse/ORC-570
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Gopal Vijayaraghavan
>            Assignee: Mustafa Iman
>            Priority: Major
>         Attachments: ORC-570.WIP.patch, ORC-570.patch
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> FileSystem initialization is not always necessary when ReaderOptions are 
> built out for files, particularly if an OrcTail is provided for the reader 
> from another process for the reader.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to