You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Chris Nauroth (JIRA)" <ji...@apache.org> on 2017/04/10 21:44:41 UTC

[jira] [Commented] (HADOOP-13726) Enforce that FileSystem initializes only a single instance of the requested FileSystem.

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

Chris Nauroth commented on HADOOP-13726:
----------------------------------------

Thank you, [~manju_hadoop]!  Your last comment looks to me like a good way to go.  Please feel free to attach a patch file as described in the [HowToContribute|https://wiki.apache.org/hadoop/HowToContribute] wiki page.

bq. ...if the thread which succeeded in getting the lock throws an exception during FileSystem initialization, then all other threads waiting for the result will get ExecutionException and wouldnot retry serially...

It's good that you remapped the {{ExecutionException}} back to {{IOException}} in your example.  Typical callers are equipped to handle an {{IOException}}.  I think this is acceptable, as there has never been any stated contract around {{FileSystem#get}} retrying internally.  Calling code that wants to be resilient against transient failure already must have retry logic of its own.

> Enforce that FileSystem initializes only a single instance of the requested FileSystem.
> ---------------------------------------------------------------------------------------
>
>                 Key: HADOOP-13726
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13726
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Chris Nauroth
>            Assignee: Manjunath Anand
>
> The {{FileSystem}} cache is intended to guarantee reuse of instances by multiple call sites or multiple threads.  The current implementation does provide this guarantee, but there is a brief race condition window during which multiple threads could perform redundant initialization.  If the file system implementation has expensive initialization logic, then this is wasteful.  This issue proposes to eliminate that race condition and guarantee initialization of only a single instance.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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