[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-13 Thread Omkar Vinit Joshi (JIRA)

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

Omkar Vinit Joshi commented on YARN-573:


+1 ..lgtm for branch 0.23

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Fix For: 3.0.0, 2.1.1-beta
>
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch, 
> YARN-573.branch-0.23-08132013.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-02 Thread Hudson (JIRA)

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

Hudson commented on YARN-573:
-

FAILURE: Integrated in Hadoop-Mapreduce-trunk #1506 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1506/])
Correct fix versions for MAPREDUCE-5428 and YARN-573. (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509475)
* /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
YARN-573. Shared data structures in Public Localizer and Private Localizer are 
not Thread safe. Contributed by Omkar Vinit Joshi (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509389)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java


> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Fix For: 3.0.0, 2.1.1-beta
>
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-02 Thread Hudson (JIRA)

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

Hudson commented on YARN-573:
-

FAILURE: Integrated in Hadoop-Hdfs-trunk #1479 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/1479/])
Correct fix versions for MAPREDUCE-5428 and YARN-573. (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509475)
* /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
YARN-573. Shared data structures in Public Localizer and Private Localizer are 
not Thread safe. Contributed by Omkar Vinit Joshi (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509389)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java


> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Fix For: 3.0.0, 2.1.1-beta
>
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-02 Thread Hudson (JIRA)

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

Hudson commented on YARN-573:
-

SUCCESS: Integrated in Hadoop-Yarn-trunk #289 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/289/])
Correct fix versions for MAPREDUCE-5428 and YARN-573. (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509475)
* /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
YARN-573. Shared data structures in Public Localizer and Private Localizer are 
not Thread safe. Contributed by Omkar Vinit Joshi (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509389)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java


> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Fix For: 3.0.0, 2.1.1-beta
>
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-01 Thread Hudson (JIRA)

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

Hudson commented on YARN-573:
-

SUCCESS: Integrated in Hadoop-trunk-Commit #4203 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/4203/])
Correct fix versions for MAPREDUCE-5428 and YARN-573. (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509475)
* /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt


> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Fix For: 3.0.0, 2.1.1-beta
>
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-01 Thread Hudson (JIRA)

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

Hudson commented on YARN-573:
-

SUCCESS: Integrated in Hadoop-trunk-Commit #4199 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/4199/])
YARN-573. Shared data structures in Public Localizer and Private Localizer are 
not Thread safe. Contributed by Omkar Vinit Joshi (jlowe: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1509389)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java


> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Fix For: 3.0.0, 2.1.0-beta
>
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-01 Thread Jason Lowe (JIRA)

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

Jason Lowe commented on YARN-573:
-

+1, lgtm as well.  Committing this.

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-08-01 Thread Sangjin Lee (JIRA)

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

Sangjin Lee commented on YARN-573:
--

The new patch looks good to me. Thanks!

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-31 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on YARN-573:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12595310/YARN-573-20130731.1.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/1631//testReport/
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/1631//console

This message is automatically generated.

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-31 Thread Omkar Vinit Joshi (JIRA)

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

Omkar Vinit Joshi commented on YARN-573:


Thanks [~jlowe] and [~sjlee0] for reviewing..

Fixed the comments..

[~sjlee0] yes ConcurrentLinkedQueue will solve this synchronization issue 
altogether. I am planning to restructure it a lot when we end up fixing 
YARN-574. Today update method is making 2 calls to findNextResources which 
ideally should be one. After that the whole code itself will get simplified a 
lot ..Also inside findNextResources we are repeatedly checking for the same set 
of resources (list) again and again until the resource gets downloaded.. which 
ideally should only be done onceyes but this is out of the scope for this 
jira...will definitely address it on another jira. (YARN-574) 

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch, YARN-573-20130731.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-31 Thread Sangjin Lee (JIRA)

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

Sangjin Lee commented on YARN-573:
--

+1 on wrapping the list with Collections.synchronizedList(). That would make 
the intent bit clearer. Then you can drop synchronization on the add() call 
(you'd still need to use explicit synchronization for the iteration as [~jlowe] 
pointed out).

An alternative (which may be slightly more concurrent) is to use 
ConcurrentLinkedQueue. You would drop back from List to Queue, but that's all 
you need anyway. Besides, you would no longer need to use synchronization.

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-31 Thread Jason Lowe (JIRA)

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

Jason Lowe commented on YARN-573:
-

bq. I thought about it earlier but we are using iterator internally and we are 
modifying list using that iterator which won't be thread safe. Let me know if 
we should use Collections.synchronizedList or should synchronize on list?

It's OK to iterate over a SynchronizedList as long as one explicitly 
synchronizes the list while iterating.  This is called out in the javadocs for 
SynchronizedList.  Synchronizing on the list will effectively block all other 
threads attempting to access the list until the iteration completes, because 
SynchronizedList methods end up using {{this}} as a mutex.

bq. Yes you are right we should change the constructor to use ConcurrentMap. I 
will fix it together with above question/comment.

I was not so much thinking the constructor should take a ConcurrentMap so much 
as thinking that particular constructor should simply be removed.  It's not 
called by anything else other than the simpler constructor form, and we can 
just have that constructor create the ConcurrentMap directly when it 
initializes the {{pending}} field.

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()). Also update method should be fixed. It too is 
> sharing pending list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-31 Thread Omkar Vinit Joshi (JIRA)

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

Omkar Vinit Joshi commented on YARN-573:


[~jlowe] Thanks for reviewing..
bq. LocalizerRunner.pending is accessed without synchronization in the update() 
method. Maybe it would be simpler to just use a SynchronizedList wrapper? That 
would make it a bit more robust in light of maintenance changes in the future 
as well.
Yeah my bad.. missed update call... that should be fixed...regarding using 
synchronized list; I thought about it earlier but we are using iterator 
internally and we are modifying list using that iterator which won't be thread 
safe. Let me know if we should use Collections.synchronizedList or should 
synchronize on list? Correct me if I am wrong anywhere.

bq. Nit: The PublicLocalizer constructor that takes a Map isn't really used, 
and as we know pending can't be just any Map for it to work properly. I'd be 
tempted to remove that constructor, but it's not a necessary change.
Yes you are right we should change the constructor to use ConcurrentMap. I will 
fix it together with above question/comment.

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-31 Thread Jason Lowe (JIRA)

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

Jason Lowe commented on YARN-573:
-

Thanks for picking this up, Omkar.  A couple of comments:

* LocalizerRunner.pending is accessed without synchronization in the update() 
method.  Maybe it would be simpler to just use a SynchronizedList wrapper?  
That would make it a bit more robust in light of maintenance changes in the 
future as well.
* Nit: The PublicLocalizer constructor that takes a Map isn't really used, and 
as we know {{pending}} can't be just any Map for it to work properly.  I'd be 
tempted to remove that constructor, but it's not a necessary change.

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-30 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on YARN-573:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12595114/YARN-573-20130730.1.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/1621//testReport/
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/1621//console

This message is automatically generated.

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-30 Thread Omkar Vinit Joshi (JIRA)

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

Omkar Vinit Joshi commented on YARN-573:


can't think of a test case for this.. 

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
> Attachments: YARN-573-20130730.1.patch
>
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-30 Thread Omkar Vinit Joshi (JIRA)

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

Omkar Vinit Joshi commented on YARN-573:


Yes this has to be fixed.. It is causing NM to go downwill fix it ..

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-07-25 Thread Raghu C Doppalapudi (JIRA)

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

Raghu C Doppalapudi commented on YARN-573:
--

we recently noticed nodemanager crashing with following stack trace.


2013-07-24 11:00:26,582 FATAL event.AsyncDispatcher - Error in dispatcher thread
java.util.concurrent.RejectedExecutionException
at 
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768)
at 
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
at 
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
at 
java.util.concurrent.ExecutorCompletionService.submit(ExecutorCompletionService.java:152)
at 
org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService$PublicLocalizer.addResource(ResourceLocalizationService.java:621)
at 
org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService$LocalizerTracker.handle(ResourceLocalizationService.java:516)
at 
org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService$LocalizerTracker.handle(ResourceLocalizationService.java:458)
at 
org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:128)
at 
org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:77)
at java.lang.Thread.run(Thread.java:662)
2013-07-24 11:00:26,582 INFO  event.AsyncDispatcher - Exiting, bbye..
2013-07-24 11:00:26,583 INFO  service.AbstractService - Service:Dispatcher is 
stopped.
2013-07-24 11:00:26,585 INFO  mortbay.log - Stopped 
SelectChannelConnector@0.0.0.0:8042
2013-07-24 11:00:26,686 INFO  service.AbstractService - 
Service:org.apache.hadoop.yarn.server.nodemanager.webapp.WebServer is stopped.


> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>Priority: Critical
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-04-15 Thread Omkar Vinit Joshi (JIRA)

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

Omkar Vinit Joshi commented on YARN-573:


We need to fix one more problem present in Private localization.


* Current behavior : LocalizerRunner is started when container makes first 
request for the resource. It internally starts ContainerLocalizer which starts 
localizing. However as soon as pending becomes empty ContainerLocalizer is 
asked to kill itself ( LocalizerAction.DIE - check update method). Now if the 
resource localization request comes little later than this then the request 
will never be handled ( localized) as ContainerLocalizer is never restarted. At 
present this is not occurring because first we are localizing resources one at 
a time and events are sent really very fast to ContainerLocalizer.
* Expected behavior : So as soon as ContainerLocalizer is done localizing all 
the resources (pending becomes empty); LocalizerRunner will remove itself from 
the available localizers before asking ContainerLocalizer to kill itself.
 

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-04-13 Thread Chris Douglas (JIRA)

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

Chris Douglas commented on YARN-573:


Pardon?

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-573) Shared data structures in Public Localizer and Private Localizer are not Thread safe.

2013-04-12 Thread Vinod Kumar Vavilapalli (JIRA)

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

Vinod Kumar Vavilapalli commented on YARN-573:
--

So, some of my "TODO: Synchronization" comments are indeed valid, aye Chris? ;)

> Shared data structures in Public Localizer and Private Localizer are not 
> Thread safe.
> -
>
> Key: YARN-573
> URL: https://issues.apache.org/jira/browse/YARN-573
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Omkar Vinit Joshi
>Assignee: Omkar Vinit Joshi
>
> PublicLocalizer
> 1) pending accessed by addResource (part of event handling) and run method 
> (as a part of PublicLocalizer.run() ).
> PrivateLocalizer
> 1) pending accessed by addResource (part of event handling) and 
> findNextResource (i.remove()).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira