Srimanth Gunturi created AMBARI-6781:
----------------------------------------
Summary: BE: Provide configurations recommendations via
/recommendations endpoint on stack-version
Key: AMBARI-6781
URL: https://issues.apache.org/jira/browse/AMBARI-6781
Project: Ambari
Issue Type: Bug
Components: controller
Affects Versions: 1.7.0
Reporter: Srimanth Gunturi
Assignee: Srimanth Gunturi
Fix For: 1.7.0
To enable Ambari server in giving recommendations, we need to provide a
_/recommendations_ endpoint inside the stack-version URL. Callers will then be
able to ask a stack-version for its recommendations on host-layout and
configurations.
In this JIRA, we will provide configurations recommendation where the
host-layout has already been determined. Callers will provide the selected
host-layout, and API will respond with recommended configurations inside the
provided Blueprint objects.
{code}
POST
http://server:8080/api/v1/stacks/HDP/versions/2.1/recommendations
{code}
Request:
{code}
{
hosts: ['h1', 'h2', 'h3'],
services: ['HDFS', 'YARN', 'HBASE'],
recommendations: {
blueprint: {
host_groups: [
{
name: ‘host-group-1’,
components: [
{
name: ‘NAMENODE’
},
{
name: ‘HBASE_MASTER’
}
]
},
{
name: ‘host-group-2’,
components: [
{
name: ‘RESOURCEMANAGER’
}
]
},
{
name: ‘host-group-3’,
components: [
{
name: ‘DATANODE’,
},
{
name: ‘NODEMANAGER’,
},
{
name: ‘HBASE_REGIONSERVER’,
}
]
}
]
},
blueprint_cluster_binding: {
host_groups: [
{
name: ‘host-group-1’,
hosts: [
{
fqdn: ‘c6401.ambari.apache.org’
}
]
},
{
name: ‘host-group-1’,
hosts: [
{
fqdn: ‘c6402.ambari.apache.org’
}
]
},
{
name: ‘host-group-3’,
hosts: [
{
fqdn: ‘c6403.ambari.apache.org’
}
]
}
]
}
}
}
{code}
Response:
{code}
{
Versions: {
stack_name: 'HDP',
stack_version: '2.1.1'
},
hosts: ['h1', 'h2', 'h3'],
services: ['HDFS', 'YARN', 'HBASE'],
recommendations: {
blueprint: {
configurations: {
global: {
properties: {
‘hbase_user’: ‘hbase’,
‘clientPort’: ‘2181’,
‘hadoop_heapsize’: ‘1024’,
...
}
},
core-site: { … },
hdfs-site: { … },
yarn-site: { … },
hbase-site: { … }
},
host_groups: [
{
name: ‘host-group-1’,
components: [
{
name: ‘NAMENODE’
},
{
name: ‘HBASE_MASTER’
}
]
},
{
name: ‘host-group-2’,
components: [
{
name: ‘RESOURCEMANAGER’
}
]
},
{
name: ‘host-group-3’,
components: [
{
name: ‘DATANODE’,
},
{
name: ‘NODEMANAGER’,
},
{
name: ‘HBASE_REGIONSERVER’,
}
]
}
]
},
blueprint_cluster_binding: {
host_groups: [
{
name: ‘host-group-1’,
hosts: [
{
fqdn: ‘c6401.ambari.apache.org’
}
]
},
{
name: ‘host-group-1’,
hosts: [
{
fqdn: ‘c6402.ambari.apache.org’
}
]
},
{
name: ‘host-group-3’,
hosts: [
{
fqdn: ‘c6403.ambari.apache.org’
}
]
}
]
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)