You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/06/10 22:15:55 UTC
ambari git commit: AMBARI-17171. Falcon to create data-mirroring
directory in HDFS if extensions is supported (alejandro)
Repository: ambari
Updated Branches:
refs/heads/trunk 60a7054dd -> 38bfa42e0
AMBARI-17171. Falcon to create data-mirroring directory in HDFS if extensions is supported (alejandro)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/38bfa42e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/38bfa42e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/38bfa42e
Branch: refs/heads/trunk
Commit: 38bfa42e027a47a3ecbdb57d0453f8140ef7f92f
Parents: 60a7054
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Thu Jun 9 15:20:36 2016 -0700
Committer: Alejandro Fernandez <af...@hortonworks.com>
Committed: Fri Jun 10 15:16:31 2016 -0700
----------------------------------------------------------------------
.../FALCON/0.5.0.2.1/package/scripts/falcon.py | 9 +++++++++
.../0.5.0.2.1/package/scripts/falcon_server.py | 16 ----------------
.../0.5.0.2.1/package/scripts/params_linux.py | 4 ++--
3 files changed, 11 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/38bfa42e/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
index b5b3a34..6cb4089 100644
--- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
+++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
@@ -131,6 +131,7 @@ def falcon(type, action = None, upgrade_type=None):
owner = params.falcon_user,
mode = 0777)
+ # In HDP 2.4 and earlier, the data-mirroring directory was copied to HDFS.
if params.supports_data_mirroring:
params.HdfsResource(params.dfs_data_mirroring_dir,
type = "directory",
@@ -143,6 +144,14 @@ def falcon(type, action = None, upgrade_type=None):
source = params.local_data_mirroring_dir)
if params.supports_falcon_extensions:
+ # In HDP 2.5, data-mirroring directory is still needed by Falcon for the data store, but don't copy any content.
+ # Instead, copy the extensions folder to HDFS.
+ params.HdfsResource(params.dfs_data_mirroring_dir,
+ type = "directory",
+ action = "create_on_execute",
+ owner = params.falcon_user,
+ mode = 0777)
+
params.HdfsResource(params.falcon_extensions_dest_dir,
type = "directory",
action = "create_on_execute",
http://git-wip-us.apache.org/repos/asf/ambari/blob/38bfa42e/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
index 0d2cd8e..cd74890 100644
--- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
+++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
@@ -87,22 +87,6 @@ class FalconServerLinux(FalconServer):
conf_select.select(params.stack_name, "falcon", params.version)
stack_select.select("falcon-server", params.version)
- # Must be an Upgrade direction from a version less than when the feature is supported to a
- # version at or after the feature is supported.
- if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and \
- check_stack_feature(StackFeature.FALCON_EXTENSIONS, params.stack_version_formatted) and \
- not check_stack_feature(StackFeature.FALCON_EXTENSIONS, params.current_version_formatted):
- params.HdfsResource(params.falcon_extensions_dest_dir,
- type = "directory",
- action = "create_on_execute",
- owner = params.falcon_user,
- group = params.proxyuser_group,
- recursive_chown = True,
- recursive_chmod = True,
- mode = 0770,
- source = params.falcon_extensions_source_dir)
- params.HdfsResource(None, action="execute")
-
falcon_server_upgrade.pre_start_restore()
def security_status(self, env):
http://git-wip-us.apache.org/repos/asf/ambari/blob/38bfa42e/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
index 41954a5..441f0da 100644
--- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
@@ -122,8 +122,8 @@ smokeuser_principal = config['configurations']['cluster-env']['smokeuser_princi
kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
supports_hive_dr = config['configurations']['falcon-env']['supports_hive_dr']
-# HDP 2.4 still supported the /usr/$STACK/$VERSION/falcon/data-mirroring folder.
-# In HDP 2.5, it was replaced with Falcon Extensions. data mirroring XOR falcon extensions
+# HDP 2.4 still supported the /usr/$STACK/$VERSION/falcon/data-mirroring folder, which had to be copied to HDFS
+# In HDP 2.5, an empty data-mirroring folder has to be created, and the extensions folder has to be uploaded to HDFS.
supports_data_mirroring = supports_hive_dr and (stack_version_formatted and not check_stack_feature(StackFeature.FALCON_EXTENSIONS, stack_version_formatted))
# Falcon Extensions were supported in HDP 2.5 and higher.