更改Hive View Cluster Configuration以检查Custom using API

时间:2018-05-09 22:25:36

标签: hive hortonworks-data-platform ambari

我有以下API来更新Hive View Cluster Configuration:

curl --user admin:admin -i -H 'X-Requested-By: ambari' -X PUT http://localhost:8080/api/v1/views/HIVE/versions/1.5.0/instances/AUTO_HIVE_INSTANCE --data '{
  "ViewInstanceInfo" : {
    "description" : "This view instance is auto created when the Hive service is added to a cluster.",
    "instance_name" : "AUTO_HIVE_INSTANCE",
    "label" : "Hive View",
    "view_name" : "HIVE",
    "version" : "1.5.0",
    "visible" : true,
    "properties" : {
      "hdfs.auth_to_local" : null,
      "hdfs.umask-mode" : "022",
      "hive.jdbc.url" : "jdbc:hive2://localhost:10000/",
      "hive.ldap.configured" : "false",
      "hive.metastore.warehouse.dir" : "/apps/hive/warehouse",
      "hive.session.params" : "transportMode=binary;hive.server2.proxy.user=${username};user=admin;password=password;",
      "jobs.dir" : "/user/admin/hive/jobs",
      "scripts.dir" : "/user/admin/hive/scripts",
      "scripts.settings.defaults-file" : "/user/admin/.${instanceName}.defaultSettings",
      "webhdfs.auth" : "",
      "webhdfs.url" : "webhdfs://localhost:50070",
      "webhdfs.username" : "admin",
      "yarn.ats.url" : "http://localhost:8188",
      "yarn.resourcemanager.url" : "http://localhost:8088"
    }
  }
}'

但它没有检查单选按钮群集配置>自定义。它离开了Local Cluster

上的复选框

如何修改API以确保选择自定义?

enter image description here

enter image description here

这篇文章没有我需要的信息: https://community.hortonworks.com/articles/72110/ambari-views-rest-api-overview.html

Ambari版本2.5.2.0

1 个答案:

答案 0 :(得分:0)

我在下面添加了它并且有效:

“ViewInstanceInfo”:{     “cluster_handle”:null,     “cluster_type”:“无”,