ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srimanth Gunturi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-6686) BE: Provide host-layout validations via /validations endpoint on stack-version
Date Wed, 30 Jul 2014 20:38:40 GMT
Srimanth Gunturi created AMBARI-6686:
----------------------------------------

             Summary: BE: Provide host-layout validations via /validations endpoint on stack-version
                 Key: AMBARI-6686
                 URL: https://issues.apache.org/jira/browse/AMBARI-6686
             Project: Ambari
          Issue Type: Task
          Components: controller
    Affects Versions: 1.7.0
            Reporter: Srimanth Gunturi
            Assignee: Srimanth Gunturi
             Fix For: 1.7.0


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 host-layout validations where the host-layout selected
by the user is 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)

Mime
View raw message