You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Bikas Saha (JIRA)" <ji...@apache.org> on 2012/09/12 19:55:07 UTC

[jira] [Created] (YARN-103) Add a yarn AM - RM client module

Bikas Saha created YARN-103:
-------------------------------

             Summary: Add a yarn AM - RM client module
                 Key: YARN-103
                 URL: https://issues.apache.org/jira/browse/YARN-103
             Project: Hadoop YARN
          Issue Type: Improvement
            Reporter: Bikas Saha
            Assignee: Bikas Saha


Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471345#comment-13471345 ] 

Bikas Saha commented on YARN-103:
---------------------------------

Per your comments in MAPREDUCE-4671, I have attached another version of the 4th patch that uses a Wrapper class for ResourceRequest instead of not deleting objects. You can compare both and see which one seems more palatable. Based on that MAPREDUCE-4671 can be updated if needed.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch, YARN-103.4.wrapper.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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] [Updated] (YARN-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated YARN-103:
----------------------------

    Attachment: YARN-103.4.wrapper.patch
    
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch, YARN-103.4.wrapper.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Vinod Kumar Vavilapalli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454289#comment-13454289 ] 

Vinod Kumar Vavilapalli commented on YARN-103:
----------------------------------------------

+1, this is really helpful if we can get the APIs right.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Bo Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455108#comment-13455108 ] 

Bo Wang commented on YARN-103:
------------------------------

+1, this one can take over a lot of burden of writing AMs.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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] [Updated] (YARN-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated YARN-103:
----------------------------

    Attachment: YARN-103.4.patch
    
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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] [Updated] (YARN-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated YARN-103:
----------------------------

    Attachment: YARN-103.3.patch

Added exception handling on allocate. Added tests to verify sending 0 container requests when resources are not needed anymore.
Added tests to verify behavior during exception on allocate.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Siddharth Seth (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467208#comment-13467208 ] 

Siddharth Seth commented on YARN-103:
-------------------------------------

This is looking good with the synchronization fixes and error handling. The MR-3902 branch has some similar changes in RMContainerRequester. I'll try plugging this in there.
A few comments.
- {{makeContainerRequest}} was called {{addContainerRequest}} in RMContainerRequestor. Why rename it. To me, addContainerRequest makes more sense since the AMRMClient maintains an aggregate of requests.
- The javadoc for removeContainerRequest is a little misleading. "This will not remove previous requests after allocate has been called for those requests". removeContainerRequests just decrements the specific request from the main request table - and sends out whatever has changed in the next allocate call.
- getClusterAvailableResources / getClusterNodeCount - Instead of documenting that these should be called after an 'allocate' call - should this be enforced, maybe via an exception ? (Independent of this jira, does it make sense to include additional information in the Register call - i.e. numClusterNodes, avaialbleResources / other parts of the allocate payload)
- Similarly, instead of documenting that allocate cannot be called concurrently - this can be enforced.
- In the unit test, would prefer avoiding MiniMRCluster where possible. This one should be possible using the already existing {{MockRM}} or by mocking the RM. (branch MR-3902:TestRMContainerRequestor already does this, and tests a failure scenario for this patch)
Minor Stuff
- Avoid RecordFactory usage. Replaced by Records.newRecord() or BuilderUtils.*
- The modification to ask in case of a failure could be a simple {{ask.addAll}} instead of the exists check.

                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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] [Updated] (YARN-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated YARN-103:
----------------------------

    Attachment: YARN-103.5.patch
    
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch, YARN-103.4.wrapper.patch, YARN-103.5.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454317#comment-13454317 ] 

Bikas Saha commented on YARN-103:
---------------------------------

AMRMClient has wrappers for all AMRM protocol methods. In addition it provides API to release containers, add and remove container requests.
TestAMRMClient added that also ends up testing YarnClient.
Changed ApplicationMaster in DistributedShell to use AMRMClientImpl.
Changed memory setting of AM in DistributedShell because there were occasional failures with the old setting. AM container was sometimes being terminated at startup because its VM usage was going slightly above quota.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473049#comment-13473049 ] 

Bikas Saha commented on YARN-103:
---------------------------------

This version of the client is for advanced apps like MR where it lets them avoid duplication of client boiler plate code + some basic request table inversion logic.
I am open to removing getNumClusterNodes/getAvailableResource helper functions since the values are available via AllocateResponse. I had put them their because I didnt like that one of them came from AMResponse and the other from AllocateResponse.
A smarter client will do things like make sure the protocol semantics are being automatically followed. E.g. in will automatically make sure that the conditions you mention above dont happen. Also, it will automatically heartbeat with the RM so that the AM does not have to worry about it. It can even have basic container to task assignment logic. I have a smart client waiting in the wings that builds on top of this one :P
The test only expects the RM to schedule some containers to it and ack release containers. So that should be relatively scheduler agnostic. Once we separate functional tests from unit tests then we could start a single mini cluster for a set of tests and amortize the costs. I have added a junit test timeout to limit the downside of getting stuck due to a bug.
A custom comparator for ask would have been enough. I have changed that. The previous patch is the kind of code that comes out of a stuffy nose and head :P
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch, YARN-103.4.wrapper.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458235#comment-13458235 ] 

Bikas Saha commented on YARN-103:
---------------------------------

Cancelling patch since this needs more work.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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] [Updated] (YARN-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated YARN-103:
----------------------------

    Attachment: YARN-103.1.patch
    
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471344#comment-13471344 ] 

Bikas Saha commented on YARN-103:
---------------------------------

- Changed to addResourceRequest.
- Changed javadoc.
- This client is the barebones implementation and hence has no smarts. The checks can be implemented/may not be necessary in smarter versions of the client. Additionally, like you say, some information may be better exposed at different API's.
- I actually want to test against the MiniMRCluster instead of an expected behavior via a mockRM. I want the client test to fail if the RM  behavior changes. So yes this is more of a functional test than a unit test.
- Used BuilderUtils where available
- I prefer not to do addAll because the current code explains the logic better and is resilient to the way comparators for the set object work.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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] [Updated] (YARN-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated YARN-103:
----------------------------

    Attachment: YARN-103.2.patch

Fix a bug with not clearing remoteRequestTable and add test for that.
Fix synchronization. I had meant to guard against concurrent access to shared collections and had taken the lazy route of synchronizing the whole method. Fixed.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505664#comment-13505664 ] 

Hadoop QA commented on YARN-103:
--------------------------------

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

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

    {color:green}+1 tests included{color}.  The patch appears to include 2 new or modified test files.

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

    {color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 1 warning messages.

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

    {color:red}-1 findbugs{color}.  The patch appears to introduce 4 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-applications/hadoop-yarn-applications-distributedshell hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client.

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

Test results: https://builds.apache.org/job/PreCommit-YARN-Build/185//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-YARN-Build/185//artifact/trunk/patchprocess/newPatchFindbugsWarningshadoop-yarn-client.html
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/185//console

This message is automatically generated.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch, YARN-103.4.wrapper.patch, YARN-103.5.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486111#comment-13486111 ] 

Bikas Saha commented on YARN-103:
---------------------------------

Ping
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch, YARN-103.4.wrapper.patch, YARN-103.5.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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-103) Add a yarn AM - RM client module

Posted by "Siddharth Seth (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/YARN-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472863#comment-13472863 ] 

Siddharth Seth commented on YARN-103:
-------------------------------------

bq. This client is the barebones implementation and hence has no smarts. The checks can be implemented/may not be necessary in smarter versions of the client. Additionally, like you say, some information may be better exposed at different API's.
Why have an additional smarter client on top of this one in YARN ? Individual apps may choose to have their own - MR for RPC specific error handling, etc. We could even considering getting rid of getNumClusterNodes / getAvailableResources since they're available via AllocateResponse.
Would like others to take a look at the entire API specification before committing this.
bq. I actually want to test against the MiniMRCluster instead of an expected behavior via a mockRM. I want the client test to fail if the RM behavior changes. So yes this is more of a functional test than a unit test.
RM behaviour depends upon the underlying scheduler. For a simple case like this, the behaviour is likely to be the same across schedulers - but the test runs against the default - which is the CS right now. We don't differentiate between functional / unit tests at the moment - which makes the test runtimes reasonably high. (MiniClusetr tests take several seconds versus fractions of a second for mocks).
In the current functional test - there's a sleep-poll cycle which could get stuck.
bq. Per your comments in MAPREDUCE-4671, I have attached another version of the 4th patch that uses a Wrapper class for ResourceRequest instead of not deleting objects. You can compare both and see which one seems more palatable. Based on that MAPREDUCE-4671 can be updated if needed.
A custom comparator may be sufficient - o.a.h.y.s.r.Application already uses this. Alternately, using the wrapper only for the 'ask' table may be simpler ?

Looks like the patches accidentally include some hdfs changes.
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, YARN-103.4.patch, YARN-103.4.wrapper.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent proliferation of code being duplicated everywhere. Provide helper functions to perform reverse mapping of container requests to RM allocation resource request table format.

--
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