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

Hadoop QA commented on YARN-2678:
---------------------------------

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

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

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

      {color:red}-1 javac{color}.  The applied patch generated 1268 javac 
compiler warnings (more than the trunk's current 1266 warnings).

    {color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 5 
warning messages.
        See 
https://builds.apache.org/job/PreCommit-YARN-Build/5542//artifact/patchprocess/diffJavadocWarnings.txt
 for details.

    {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 2.0.3) 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-registry.

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

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/5542//testReport/
Javac warnings: 
https://builds.apache.org/job/PreCommit-YARN-Build/5542//artifact/patchprocess/diffJavacWarnings.txt
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/5542//console

This message is automatically generated.

> Recommended improvements to Yarn Registry
> -----------------------------------------
>
>                 Key: YARN-2678
>                 URL: https://issues.apache.org/jira/browse/YARN-2678
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: api, resourcemanager
>    Affects Versions: 2.6.0
>            Reporter: Gour Saha
>            Assignee: Steve Loughran
>         Attachments: HADOOP-2678-002.patch, YARN-2678-001.patch, 
> YARN-2678-003.patch, yarnregistry.pdf
>
>
> In the process of binding to Slider AM from Slider agent python code here are 
> some of the items I stumbled upon and would recommend as improvements.
> This is how the Slider's registry looks today -
> {noformat}
> jsonservicerec{
>   "description" : "Slider Application Master",
>   "external" : [ {
>     "api" : "org.apache.slider.appmaster",
>     "addressType" : "host/port",
>     "protocolType" : "hadoop/protobuf",
>     "addresses" : [ [ "c6408.ambari.apache.org", "34837" ] ]
>   }, {
>     "api" : "org.apache.http.UI",
>     "addressType" : "uri",
>     "protocolType" : "webui",
>     "addresses" : [ [ "http://c6408.ambari.apache.org:43314"; ] ]
>   }, {
>     "api" : "org.apache.slider.management",
>     "addressType" : "uri",
>     "protocolType" : "REST",
>     "addresses" : [ [ 
> "http://c6408.ambari.apache.org:43314/ws/v1/slider/mgmt"; ] ]
>   }, {
>     "api" : "org.apache.slider.publisher",
>     "addressType" : "uri",
>     "protocolType" : "REST",
>     "addresses" : [ [ 
> "http://c6408.ambari.apache.org:43314/ws/v1/slider/publisher"; ] ]
>   }, {
>     "api" : "org.apache.slider.registry",
>     "addressType" : "uri",
>     "protocolType" : "REST",
>     "addresses" : [ [ 
> "http://c6408.ambari.apache.org:43314/ws/v1/slider/registry"; ] ]
>   }, {
>     "api" : "org.apache.slider.publisher.configurations",
>     "addressType" : "uri",
>     "protocolType" : "REST",
>     "addresses" : [ [ 
> "http://c6408.ambari.apache.org:43314/ws/v1/slider/publisher/slider"; ] ]
>   } ],
>   "internal" : [ {
>     "api" : "org.apache.slider.agents.secure",
>     "addressType" : "uri",
>     "protocolType" : "REST",
>     "addresses" : [ [ 
> "https://c6408.ambari.apache.org:46958/ws/v1/slider/agents"; ] ]
>   }, {
>     "api" : "org.apache.slider.agents.oneway",
>     "addressType" : "uri",
>     "protocolType" : "REST",
>     "addresses" : [ [ 
> "https://c6408.ambari.apache.org:57513/ws/v1/slider/agents"; ] ]
>   } ],
>   "yarn:persistence" : "application",
>   "yarn:id" : "application_1412974695267_0015"
> }
> {noformat}
> Recommendations:
> 1. I would suggest to either remove the string 
> {color:red}jsonservicerec{color} or if it is desirable to have a non-null 
> data at all times then loop the string into the json structure as a top-level 
> attribute to ensure that the registry data is always a valid json document. 
> 2. The {color:red}addresses{color} attribute is currently a list of list. I 
> would recommend to convert it to a list of dictionary objects. In the 
> dictionary object it would be nice to have the host and port portions of 
> objects of addressType "uri" as separate key-value pairs to avoid parsing on 
> the client side. The URI should also be retained as a key say "uri" to avoid 
> clients trying to generate it by concatenating host, port, resource-path, 
> etc. Here is a proposed structure -
> {noformat}
> {
>   ...
>   "internal" : [ {
>     "api" : "org.apache.slider.agents.secure",
>     "addressType" : "uri",
>     "protocolType" : "REST",
>     "addresses" : [ 
>        { "uri" : "https://c6408.ambari.apache.org:46958/ws/v1/slider/agents";,
>          "host" : "c6408.ambari.apache.org",
>          "port": "46958"
>        }
>     ]
>   } 
>   ],
> }
> {noformat}



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

Reply via email to