[ https://issues.apache.org/jira/browse/AMBARI-17306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Swapan Shridhar updated AMBARI-17306: ------------------------------------- Attachment: AMBARI-17306.patch > Filter out MOTD logging from 'llapstatus' command in order to get the output > which is JSON parsable. > ---------------------------------------------------------------------------------------------------- > > Key: AMBARI-17306 > URL: https://issues.apache.org/jira/browse/AMBARI-17306 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.4.0 > Reporter: Swapan Shridhar > Assignee: Swapan Shridhar > Fix For: 2.4.0 > > Attachments: AMBARI-17306.patch > > > Example of expected response which can be JSON parsed: > *CASE A:* > {code} > { > "amInfo" : { > "appName" : "llap0", > "appType" : "org-apache-slider", > "appId" : "application_1466036628595_0010", > "containerId" : "container_1466036628595_0010_01_000001", > "hostname" : "hostname", > "amWebUrl" : "http://hostname:60865/" > }, > "state" : "LAUNCHING", > "originalConfigurationPath" : > "hdfs://hostname:8020/user/hive/.slider/cluster/llap0/snapshot", > "generatedConfigurationPath" : > "hdfs://hostname:8020/user/hive/.slider/cluster/llap0/generated", > "desiredInstances" : 1, > "liveInstances" : 0, > "appStartTime" : 1466123287309 > } > {code} > The same output with MOTD message: > {code} > This is MOTD message > This is MOTD message1 > { > "amInfo" : { > "appName" : "llap0", > "appType" : "org-apache-slider", > "appId" : "application_1466036628595_0010", > "containerId" : "container_1466036628595_0010_01_000001", > "hostname" : "hostname", > "amWebUrl" : "http://hostname:60865/" > }, > "state" : "LAUNCHING", > "originalConfigurationPath" : > "hdfs://hostname:8020/user/hive/.slider/cluster/llap0/snapshot", > "generatedConfigurationPath" : > "hdfs://hostname:8020/user/hive/.slider/cluster/llap0/generated", > "desiredInstances" : 1, > "liveInstances" : 0, > "appStartTime" : 1466123287309 > } > {code} > Other scenario can be (eg: APP_NOTFOUND): > *CASE B:* > {code} > This is MOTD message > This is MOTD message1 > { > "state" : "APP_NOT_FOUND" > } > {code} > - We need to filter out extra lines initially added on top of JSON parseable > string. -- This message was sent by Atlassian JIRA (v6.3.4#6332)