You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Swapan Shridhar (JIRA)" <ji...@apache.org> on 2017/11/22 18:30:01 UTC

[jira] [Comment Edited] (AMBARI-22498) Remove trailing lines (if any) from llapstatus command before converting the o/p to JSON.

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

Swapan Shridhar edited comment on AMBARI-22498 at 11/22/17 6:29 PM:
--------------------------------------------------------------------

commit

{code:title=trunk}
commit 9d3eeaaa9eca4cda1b3c675da9341516d9d19706
Author: Swapan Shridhar <ss...@hortonworks.com>
Date:   Wed Nov 22 10:24:38 2017 -0800

    AMBARI-22498. Remove trailing lines (if any) from llapstatus command before converting the o/p to JSON.
{code}


branch-2.6:

{code:title=branch-2.6}
commit 677e27e658b1fe6e272789ce97ecfbaa5ad0d0ca
Author: Swapan Shridhar <ss...@hortonworks.com>
Date:   Wed Nov 22 10:24:38 2017 -0800

    AMBARI-22498. Remove trailing lines (if any) from llapstatus command before converting the o/p to JSON.
{code}



was (Author: swapanshridhar):
commit

{code:title=trunk}
commit 9d3eeaaa9eca4cda1b3c675da9341516d9d19706
Author: Swapan Shridhar <ss...@hortonworks.com>
Date:   Wed Nov 22 10:24:38 2017 -0800

    AMBARI-22498. Remove trailing lines (if any) from llapstatus command before converting the o/p to JSON.
{code}


branch-2.6:

{code:title:branch-2.6}
commit 677e27e658b1fe6e272789ce97ecfbaa5ad0d0ca
Author: Swapan Shridhar <ss...@hortonworks.com>
Date:   Wed Nov 22 10:24:38 2017 -0800

    AMBARI-22498. Remove trailing lines (if any) from llapstatus command before converting the o/p to JSON.
{code}


> Remove trailing lines (if any) from llapstatus command before converting the o/p to JSON.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMBARI-22498
>                 URL: https://issues.apache.org/jira/browse/AMBARI-22498
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.5.0
>            Reporter: Swapan Shridhar
>            Assignee: Swapan Shridhar
>             Fix For: 2.6.1
>
>         Attachments: AMBARI-22498.patch
>
>
> Existing code was removing extra lines from the beginning which may come because of MOTD.
> Similar issue can happen if there are extra lines as the end, which if passed in for converting to JSON will fail.
> {code:title=EXAMPLE of extra lines at beginning and end sandwiching the JSOn structure which needs to be parsed}
> ######## Hortonworks #############
> This is MOTD message, added for testing in qe infra
> {
>   "amInfo" : {
>     "appName" : "llap",
>     "appType" : "org-apache-slider",
>     "appId" : "application_1455662455106_10882",
>     "containerId" : "container_e14_1455662455106_10882_01_000001",
>     "hostname" : "HOST_REPLACED",
>     "amWebUrl" : "http://HOST_REPLACED:1025/"
>   },
>   "state" : "RUNNING_ALL",
>   "originalConfigurationPath" : "hdfs://HOST_REPLACED:8020/user/USER_REPLACED/.slider/cluster/llap/snapshot",
>   "generatedConfigurationPath" : "hdfs://HOST_REPLACED:8020/user/USER_REPLACED/.slider/cluster/llap/generated",
>   "desiredInstances" : 3,
>   "liveInstances" : 3,
>   "appStartTime" : 1459625802169,
>   "llapInstances" : [ {
>     "hostname" : "HOST_REPLACED",
>     "containerId" : "container_e14_1455662455106_10882_01_000003",
>     "statusUrl" : "http://HOST_REPLACED:15002/status",
>     "webUrl" : "http://HOST_REPLACED:15002",
>     "rpcPort" : 15001,
>     "mgmtPort" : 15004,
>     "shufflePort" : 15551
>   }, {
>     "hostname" : "HOST_REPLACED",
>     "containerId" : "container_e14_1455662455106_10882_01_000002",
>     "statusUrl" : "http://HOST_REPLACED:15002/status",
>     "webUrl" : "http://HOST_REPLACED:15002",
>     "rpcPort" : 15001,
>     "mgmtPort" : 15004,
>     "shufflePort" : 15551
>   }, {
>     "hostname" : "HOST_REPLACED",
>     "containerId" : "container_e14_1455662455106_10882_01_000004",
>     "statusUrl" : "http://HOST_REPLACED:15002/status",
>     "webUrl" : "http://HOST_REPLACED:15002",
>     "rpcPort" : 15001,
>     "mgmtPort" : 15004,
>     "shufflePort" : 15551
>   } ]
> }
> # THIS IS A DUMMY TRAILING MESSAGE 1
> # THIS IS A DUMMY TRAILING MESSAGE 2
> {code}
> Fix: Added code to remove the trailing lines as well. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)