You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Srimanth Gunturi (JIRA)" <ji...@apache.org> on 2014/08/15 03:13:18 UTC

[jira] [Updated] (AMBARI-6870) BE: Provide configurations validation via /validations endpoint on stack-version

     [ https://issues.apache.org/jira/browse/AMBARI-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Srimanth Gunturi updated AMBARI-6870:
-------------------------------------

    Attachment: AMBARI-6870.patch

Review at https://reviews.apache.org/r/24728/

> BE: Provide configurations validation via /validations endpoint on stack-version
> --------------------------------------------------------------------------------
>
>                 Key: AMBARI-6870
>                 URL: https://issues.apache.org/jira/browse/AMBARI-6870
>             Project: Ambari
>          Issue Type: Task
>          Components: controller
>    Affects Versions: 1.7.0
>            Reporter: Srimanth Gunturi
>            Assignee: Srimanth Gunturi
>             Fix For: 1.7.0
>
>         Attachments: AMBARI-6870.patch
>
>
> To enable Ambari server in giving validations, we need to provide a _/validations_ endpoint inside the stack-version URL. Callers will then be able to ask a stack-version to validate host-layout and configurations.
> In this JIRA, we will provide just the configurations validations where the host-layout and configurations entered by the user are given, and the API responds with validation messages.
> {code}
> POST 
> http://server:8080/api/v1/stacks/HDP/versions/2.1/validations
> {code}
> Request:
> {code}
> {
>   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: ‘SNAMENODE’
>             }
>           ]
>         },
>         {
>           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}
> {
>   items: [
>     {
>       type: ‘configuration’,
>       level: ‘ERROR’,
>       message: ‘Value should be integer’,
>       config-type:’mapred-site’,
>       config-name:'mapreduce.map.memory.mb'
>     },
>     {
>       type: ‘configuration’,
>       level: ‘WARN’,
>       message: ‘Maximum memory exceeds map memory size’,
>       config-type:’mapred-site’,
>       config-name:'mapreduce.map.java.opt'
>     },
>     {
>       type: ‘configuration’,
>       level: ‘ERROR’,
>       message: ‘yarn.new-config should be defined for HDP-2.1 Yarn service’,
>       config-type:’yarn-site’,
>       config-name:'yarn.new-config'
>     },
>     {
>       type: ‘configuration’,
>       level: ‘WARN’,
>       message: ‘yarn.old-config has been deprecated in HDP-2.1’,
>       config-type:’yarn-site’,
>       config-name:'yarn.old-config'
>     },
>     {
>       type: ‘host-component’,
>       level: ‘ERROR’,
>       message: ‘NameNode and Secondary NameNode cannot be hosted on same machine’,
>       component-name:’NAMENODE’,
>       host:'c6401.ambari.apache.org'
>     },
>     {
>       type: ‘host-component’,
>       level: ‘ERROR’,
>       message: ‘NameNode and Secondary NameNode cannot be hosted on same machine’,
>       component-name:’SNAMENODE’,
>       host:'c6401.ambari.apache.org'
>     }
>   ]
> }
> {code}
> There will be 2 types of validation messages
> * Configuration
> ** type = configuration
> ** level = WARN, ERROR
> ** message
> ** config-type = global, core-site, …
> ** config-name
> ** host-group (optional)
> * Host-Component
> ** type = host-component
> ** level = WARN, ERROR
> ** message
> ** component-name: NAMENODE, SNAMENODE, …
> ** host: <host-fqdn>
> There are 2 validation levels
> * WARN - value is valid, but semantically there may be issues (like > or < default)
> * ERROR - value is not valid and will cause service to fail.



--
This message was sent by Atlassian JIRA
(v6.2#6252)