You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2017/02/27 19:44:19 UTC

ambari git commit: AMBARI-20212. Remove HDP version check in KAFKA service (Madhuvanthi Radhakrishnan via smohanty)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 6330cfb69 -> 7e28c6b30


AMBARI-20212. Remove HDP version check in KAFKA service (Madhuvanthi Radhakrishnan via smohanty)


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

Branch: refs/heads/branch-2.5
Commit: 7e28c6b30668d013fdccaa7d3827a3726e940f01
Parents: 6330cfb
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Mon Feb 27 11:42:33 2017 -0800
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Mon Feb 27 11:42:33 2017 -0800

----------------------------------------------------------------------
 .../common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py | 5 ++---
 .../resources/stacks/HDP/2.0.6/properties/stack_features.json   | 5 +++++
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7e28c6b3/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
index 015e150..4512038 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
@@ -22,7 +22,7 @@ from resource_management.core.resources.system import Execute, File, Directory
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.functions import stack_select
 from resource_management.libraries.functions import Direction
-from resource_management.libraries.functions.version import compare_versions, format_stack_version
+from resource_management.libraries.functions.version import format_stack_version
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.check_process_status import check_process_status
 from resource_management.libraries.functions import StackFeature
@@ -68,8 +68,7 @@ class KafkaBroker(Script):
         src_version = format_stack_version(params.version)
         dst_version = format_stack_version(params.downgrade_from_version)
 
-      # TODO: How to handle the case of crossing stack version boundary in a stack agnostic way?
-      if compare_versions(src_version, '2.3.4.0') < 0 and compare_versions(dst_version, '2.3.4.0') >= 0:
+      if not check_stack_feature(StackFeature.KAFKA_ACL_MIGRATION_SUPPORT, src_version) and check_stack_feature(StackFeature.KAFKA_ACL_MIGRATION_SUPPORT, dst_version):
         # Calling the acl migration script requires the configs to be present.
         self.configure(env, upgrade_type=upgrade_type)
         upgrade.run_migration(env, upgrade_type)

http://git-wip-us.apache.org/repos/asf/ambari/blob/7e28c6b3/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index bc2e7a7..34f3c07 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -22,6 +22,11 @@
       "min_version": "2.2.0.0"
     },
     {
+      "name": "kafka_acl_migration_support",
+      "description": "ACL migration support",
+      "min_version": "2.3.4.0"
+    },
+    {
       "name": "secure_zookeeper",
       "description": "Protect ZNodes with SASL acl in secure clusters",
       "min_version": "2.6.0.0"