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

Sean Busbey commented on ACCUMULO-3383:
---------------------------------------

My guess is the method doesn't get called often enough for optimizing the 
procName retrieval to matter since {{AccumuloReloadingVFSClassLoader}} caches 
the result. Since the generated name is only unique per process, I think that 
implies no one else can be setting up another.

Patch looks good overall. Couple of feedback points

* A test that verifies that generated names don't collide when generated by 
different processes would be nice.
* We rely on computeTopCacheDir to handle clean up as well. Any risk that the 
~4 external variables we rely could change over time? Worth caching the 
directory used for the close() call?

> AccumuloVFSClassloader creates conflicting local cache directory names when 
> vfs.cache.dir property is set.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-3383
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3383
>             Project: Accumulo
>          Issue Type: Bug
>          Components: start
>    Affects Versions: 1.6.1, 1.7.0, 2.0.0
>            Reporter: Drew Farris
>            Assignee: Drew Farris
>            Priority: Minor
>             Fix For: 1.6.2
>
>         Attachments: ACCUMULO-3383.patch
>
>
> When the vfs.cache.dir property is not set, the AccumuloVFSClassloader will 
> use java.io.tmpdir as a base directory for the local cache of jars and then 
> generate a unique directory name using a combination of the processid, 
> hostname and userid executing the JVM.
> When the vfs.cache.dir property is set, that value is used as the base 
> directory and  an attempt to generate a unique directory is made using an 
> AtomicInteger. This isn't suitable because for non-long lived processes, this 
> will always be 1 - and there's a good chance that directory already exists 
> and is owned by another user, and not writable to by the user in question. 
> This leads to a failure of the invoked accumulo component to start.
> Modify the behavior of the unique directory creation when vfs.cache.dir is 
> set so that it employs the same mechanism for unique directory naming that is 
> used when it is not set.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to