Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 62d7b3a89 -> defe34218


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/defe3421
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/defe3421
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/defe3421

Branch: refs/heads/branch-2.4
Commit: defe34218751fd80264bc7690c5ac1964f7d5c10
Parents: 62d7b3a
Author: Alejandro Fernandez <[email protected]>
Authored: Fri Jun 10 15:18:25 2016 -0700
Committer: Alejandro Fernandez <[email protected]>
Committed: Fri Jun 10 15:18:25 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/defe3421/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/defe3421/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 cf18420..a5bd982 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/defe3421/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.

Reply via email to