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] [Updated] (AMBARI-12280) HiveServer2 upgrade/downgrade should deregister old server after new one is started
Date Tue, 07 Jul 2015 01:52:05 GMT

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

Srimanth Gunturi updated AMBARI-12280:
--------------------------------------
    Attachment: AMBARI-12280.patch

Attaching new patch with changes to use the new version when decommissioning.

With the new code changes, the command to restart HiveServer2 runs the following:
*Upgrade*
{code}
2015-07-07 01:00:24,583 - HiveServer2 executing "deregister" command in preparation for upgrade...
2015-07-07 01:00:24,584 - call['/usr/hdp/2.2.4.2-2/hive/bin/hive --version'] {'path': '/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/var/lib/ambari-agent:/var/lib/ambari-agent:/usr/hdp/2.2.4.2-2/hive/bin:/usr/hdp/2.2.4.2-2/hadoop/bin',
'user': 'hive'}
2015-07-07 01:00:30,069 - call returned (0, 'Hive 0.14.0.2.2.4.2-2\nSubversion git://ip-10-0-0-5.ec2.internal/grid/0/jenkins/workspace/HDP-2.2.4.1-centos6/bigtop/build/hive/rpm/BUILD/hive-0.14.0.2.2.4.2
-r 115d99896f5a4a81e7d91e052e8d38d7436b78d4\nCompiled by jenkins on Tue Mar 31 16:26:33 EDT
2015\nFrom source with checksum 1f34a1d4e566c3e801582862ed85ee93')
2015-07-07 01:00:30,070 - Execute['hive --config /usr/hdp/current/hive-server2/conf/conf.server
--service hiveserver2 --deregister 0.14.0.2.2.4.2-2'] {'path': ['/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/var/lib/ambari-agent:/var/lib/ambari-agent:/usr/hdp/current/hive-server2/bin:/usr/hdp/2.3.0.0-2434/hadoop/bin'],
'tries': 1, 'user': 'hive'}
{code}

*Downgrade*
{code}
2015-07-07 01:29:16,647 - HiveServer2 executing "deregister" command in preparation for upgrade...
2015-07-07 01:29:16,648 - call['/usr/hdp/2.3.0.0-2434/hive/bin/hive --version'] {'path': '/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/var/lib/ambari-agent:/var/lib/ambari-agent:/usr/hdp/2.3.0.0-2434/hive/bin:/usr/hdp/2.3.0.0-2434/hadoop/bin',
'user': 'hive'}
2015-07-07 01:29:24,118 - call returned (0, 'WARNING: Use "yarn jar" to launch YARN applications.\nHive
1.2.1.2.3.0.0-2434\nSubversion git://ip-10-0-0-90.ec2.internal/grid/0/jenkins/workspace/HDP-dal-centos6/bigtop/build/hive/rpm/BUILD/hive-1.2.1.2.3.0.0
-r a77a00ae765a73b2957337e96ed5a0dbb2e60dfb\nCompiled by jenkins on Sat Jun 20 11:50:41 EDT
2015\nFrom source with checksum 150f554beae04f76f814f59549dead8b')
2015-07-07 01:29:24,119 - Execute['hive --config /etc/hive/conf.server --service hiveserver2
--deregister 1.2.1.2.3.0.0-2434'] {'path': ['/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/var/lib/ambari-agent:/var/lib/ambari-agent:/usr/hdp/2.3.0.0-2434/hive/bin:/usr/hdp/2.3.0.0-2434/hadoop/bin'],
'tries': 1, 'user': 'hive'}
{code}

The command.json for the downgrade has the new {{downgrade_from_version}} field which is only
set on downgrade.
{code}
    "commandParams": {
        "upgrade_direction": "downgrade",
        "service_package_folder": "common-services/HIVE/0.12.0.2.0/package",
        "script": "scripts/hive_server.py",
        "hooks_folder": "HDP/2.0.6/hooks",
        "restart_type": "rolling_upgrade",
        "version": "2.2.4.2-2",
        "forceRefreshConfigTagsBeforeExecution": "*",
        "original_stack": "HDP-2.2",
        "command_timeout": "900",
        "target_stack": "HDP-2.3",
        "downgrade_from_version": "2.3.0.0-2434",
        "script_type": "PYTHON"
    },
{code}

> HiveServer2 upgrade/downgrade should deregister old server after new one is started
> -----------------------------------------------------------------------------------
>
>                 Key: AMBARI-12280
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12280
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.1.0
>            Reporter: Srimanth Gunturi
>            Assignee: Srimanth Gunturi
>            Priority: Critical
>             Fix For: 2.1.0
>
>         Attachments: AMBARI-12280.patch
>
>
> During upgrade/downgrade, the deregister is happening before the new HS2 is started.
This can lead to a case where there is no HS2 up and running. The order needs to be fixed,
to first start target version of HS2 and then do the deregister.
> 1. Switch hive-server2 to the new software version, start the new process, and deregister
the old version of hive-server2:
> Since the current version would have changed before hive version is obtained for deregister
command, the version should be obtained using the HDP versioned path.
> /usr/hdp/$HDP_VERSION/hive/bin/hive --version 
> It will be safer to use the full path to hive for this, instead of relying on the $PATH
variable setting.



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

Mime
View raw message