You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Alejandro Fernandez (JIRA)" <ji...@apache.org> on 2016/08/23 20:03:20 UTC

[jira] [Created] (AMBARI-18242) Move service metadata into stack's service version folder

Alejandro Fernandez created AMBARI-18242:
--------------------------------------------

             Summary: Move service metadata into stack's service version folder
                 Key: AMBARI-18242
                 URL: https://issues.apache.org/jira/browse/AMBARI-18242
             Project: Ambari
          Issue Type: Epic
            Reporter: Alejandro Fernandez


Today, there's a lot of hardcodings and metadata that belongs inside the stack for a particular service and version.
Instead, this logic is in

1. python files in common-services
2. Config Packs
3. Upgrade Packs
4. Stack Advisor

Details
1.
ambari/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
{code}
_PACKAGE_DIRS = {
  "accumulo": [
    {
      "conf_dir": "/etc/accumulo/conf",
      "current_dir": "{0}/current/accumulo-client/conf".format(STACK_ROOT_PATTERN)
    }
  ],
  "falcon": [
    {
      "conf_dir": "/etc/falcon/conf",
      "current_dir": "{0}/current/falcon-client/conf".format(STACK_ROOT_PATTERN)
    }
  ],
{code}

2. Any config-upgrade.xml
E.g.,
ambari/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
{code}
<service name="HIVE">
      <component name="HIVE_SERVER">
        <changes>
          <definition xsi:type="configure" id="hdp_2_5_0_0_hive_server_set_transport_mode">
            <condition type="hive-site" key="hive.server2.transport.mode" value="binary">
              <type>hive-site</type>
              <key>hive.server2.thrift.port</key>
              <value>10010</value>
            </condition>
            <condition type="hive-site" key="hive.server2.transport.mode" value="http">
              <type>hive-site</type>
              <key>hive.server2.http.port</key>
              <value>10011</value>
            </condition>
          </definition>

          <definition xsi:type="configure" id="hdp_2_5_0_0_hive_server_restore_transport_mode_on_downgrade">
            <condition type="hive-site" key="hive.server2.transport.mode" value="binary">
              <type>hive-site</type>
              <key>hive.server2.thrift.port</key>
              <value>10000</value>
            </condition>
            <condition type="hive-site" key="hive.server2.transport.mode" value="http">
              <type>hive-site</type>
              <key>hive.server2.http.port</key>
              <value>10001</value>
            </condition>
          </definition>
        </changes>
      </component>
    </service>
{code}

3. Any upgrade pack
E.g., ambari/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
{code}
    <service name="STORM">
      <component name="NIMBUS">
        <pre-upgrade>
          <task xsi:type="configure" id="hdp_2_5_0_0_remove_empty_storm_topology_submission_notifier_plugin_class"/>
        </pre-upgrade>

        <upgrade>
          <task xsi:type="restart-task" />
        </upgrade>
      </component>
      <component name="SUPERVISOR">
        <upgrade>
          <task xsi:type="restart-task" />
        </upgrade>
      </component>
      <component name="STORM_UI_SERVER">
        <upgrade>
          <task xsi:type="restart-task" />
        </upgrade>
      </component>
      <component name="DRPC_SERVER">
        <upgrade>
          <task xsi:type="restart-task" />
        </upgrade>
      </component>
    </service>
{code}
Plus, any of the Java classes that can be called as PreChecks

4. Stack Advisor functions
{code}
def validateAtlasConfigurations()
def recommendFalconConfigurations()
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)