Hi

I try the following command to get the information of service content
  curl -u admin:admin -X GET -i
http://10.1.191.20:8080/api/v1/clusters/ambari5f/configurations?type=mapred-site&tag=version1

The expected result is

{

  "href" : "
http://10.1.191.20:8080/api/v1/clusters/ambari5f/configurations?type=mapred-site&tag=version1
",

  "items" : [

    {

      "href" : "
http://10.1.191.20:8080/api/v1/clusters/ambari5f/configurations?type=mapred-site&tag=version1
",

      "tag" : "version1",

      "type" : "mapred-site",

      "Config" : {

        "cluster_name" : "ambari5f"

      },

      "properties" : {

        "mapred.reduce.tasks.speculative.execution" : "false",

        "mapred.tasktracker.map.tasks.maximum" : "4",

        "mapred.hosts.exclude" : "/etc/hadoop/mapred.exclude",

        "mapreduce.tasktracker.group" : "hadoop",

.

.

.

But  the result I got lost the property section.

{

  "href" : "
http://10.1.191.20:8080/api/v1/clusters/ambari5f/configurations?type=mapred-site
",

  "items" : [

    {

      "href" : "
http://10.1.191.20:8080/api/v1/clusters/ambari5f/configurations?type=mapred-site&tag=version1
",

      "tag" : "version1",

      "type" : "mapred-site",

      "Config" : {

        "cluster_name" : "ambari5f"

      }

    }

  ]

}

[1]+  Done                    curl -u admin:admin -X GET -i
http://10.1.191.20:8080/api/v1/clusters/ambari5f/configurations?type=mapred-site



The problem seems only occurs when getting service content using curl to
get the information.

I try to use the browser to get the information of configuration , and  the
result is as expected.

Using the other command like the following will get the correct result, too.

curl -u admin:admin -X GET -i
http://10.1.191.20:8080/api/v1/clusters/ambari5f/services/HDFS/components/DATANODE

{

  "href" : "
http://10.1.191.20:8080/api/v1/clusters/ambari5f/services/HDFS/components/DATANODE
",

  "ServiceComponentInfo" : {

    "cluster_name" : "ambari5f",

    "component_name" : "DATANODE",

    "state" : "STARTED",

    "service_name" : "HDFS",

    "desired_configs" : { }

  },

  "host_components" : [

    {

      "href" : "
http://10.1.191.20:8080/api/v1/clusters/ambari5f/hosts/ambariserver.ambari/host_components/DATANODE
",

      "HostRoles" : {

        "cluster_name" : "ambari5f",

        "component_name" : "DATANODE",

        "host_name" : "ambariserver.ambari"

      }

    }

  ]

Reply via email to