ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-9475. Upgrade pack definition for Ranger. (Velmurugan Periasamy via yusaku)
Date Fri, 06 Feb 2015 23:43:49 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 405b3762c -> 56e90a3a4


AMBARI-9475. Upgrade pack definition for Ranger. (Velmurugan Periasamy via yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/56e90a3a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/56e90a3a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/56e90a3a

Branch: refs/heads/trunk
Commit: 56e90a3a49e77776b32f45503a032bbf4a14de63
Parents: 405b376
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Fri Feb 6 15:43:39 2015 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Fri Feb 6 15:43:46 2015 -0800

----------------------------------------------------------------------
 .../RANGER/0.4.0/package/scripts/upgrade.py     | 29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/56e90a3a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/upgrade.py
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/upgrade.py
new file mode 100644
index 0000000..62abe8c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/upgrade.py
@@ -0,0 +1,29 @@
+
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+from resource_management import *
+from resource_management.core.resources.system import Execute
+from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
+
+def prestart(env, hdp_component):
+  import params
+
+  if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0')
>= 0:
+    Execute("hdp-select set {0} {1}".format(hdp_component, version))
\ No newline at end of file


Mime
View raw message