ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-11595. Small misc. fixes for UpgradeCatalog210, Falcon DR directory ownership, and location of hadoop-streaming.jar (alejandro)
Date Mon, 01 Jun 2015 21:27:26 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 70ec7ecad -> 7f5d9487e


AMBARI-11595. Small misc. fixes for UpgradeCatalog210, Falcon DR directory ownership, and
location of hadoop-streaming.jar (alejandro)


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

Branch: refs/heads/trunk
Commit: 7f5d9487e283ac3d7d527673debe44a4e9961a7e
Parents: 70ec7ec
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Mon Jun 1 14:01:26 2015 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Mon Jun 1 14:27:18 2015 -0700

----------------------------------------------------------------------
 .../org/apache/ambari/server/upgrade/UpgradeCatalog210.java    | 6 +++---
 .../common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py | 2 +-
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py            | 2 +-
 .../src/test/python/stacks/2.1/FALCON/test_falcon_server.py    | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f5d9487/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
index c3d264f..abbee4e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
@@ -393,20 +393,20 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog {
       dbAccessor.addColumn(tableName, new DBColumnInfo(HOST_ID_COL, Long.class, null, null,
true));
 
       // The column name is different for one table
-      String hostNameColumnName = tableName == SERVICE_CONFIG_HOSTS_TABLE ? "hostname" :
"host_name";
+      String hostNameColumnName = tableName.equals(SERVICE_CONFIG_HOSTS_TABLE) ? "hostname"
: "host_name";
 
       if (dbAccessor.tableHasData(tableName)) {
         dbAccessor.executeQuery("UPDATE " + tableName + " t SET host_id = (SELECT host_id
FROM hosts h WHERE h.host_name = t." + hostNameColumnName + ") WHERE t.host_id IS NULL AND
t." + hostNameColumnName + " IS NOT NULL");
 
         // For legacy reasons, the hostrolecommand table will contain "none" for some records
where the host_name was not important.
         // These records were populated during Finalize in Rolling Upgrade, so they must
be updated to use a valid host_name.
-        if (tableName == HOST_ROLE_COMMAND_TABLE && StringUtils.isNotBlank(randomHostName))
{
+        if (tableName.equals(HOST_ROLE_COMMAND_TABLE) && StringUtils.isNotBlank(randomHostName))
{
           dbAccessor.executeQuery("UPDATE " + tableName + " t SET host_id = (SELECT host_id
FROM hosts h WHERE h.host_name = '" + randomHostName + "') WHERE t.host_id IS NULL AND t.host_name
= 'none'");
         }
       }
 
       // The one exception for setting NOT NULL is the requestoperationlevel table
-      if (tableName != REQUEST_OPERATION_LEVEL_TABLE) {
+      if (!tableName.equals(REQUEST_OPERATION_LEVEL_TABLE)) {
         if (databaseType == Configuration.DatabaseType.DERBY) {
           // This is a workaround for UpgradeTest.java unit test
           dbAccessor.executeQuery("ALTER TABLE " + tableName + " ALTER column " + HOST_ID_COL
+ " NOT NULL");

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f5d9487/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 639071e..b9821bf 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
@@ -124,7 +124,7 @@ def falcon(type, action = None):
         params.HdfsResource(params.dfs_data_mirroring_dir,
                             type="directory",
                             action="create_on_execute",
-                            owner=params.hdfs_user,
+                            owner=params.falcon_user,
                             group=params.user_group,
                             recursive_chown = True,
                             recursive_chmod = True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f5d9487/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index ce62309..4e9d844 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -115,7 +115,7 @@ if Script.is_hdp_stack_greater_or_equal("2.2"):
   hive_tar_dest_file = "/hdp/apps/{0}/hive/hive.tar.gz".format(STACK_VERSION_PATTERN)
   pig_tar_dest_file = "/hdp/apps/{0}/pig/pig.tar.gz".format(STACK_VERSION_PATTERN)
 
-  hadoop_streaming_tar_source = "/usr/hdp/{0}/hadoop/hadoop-streaming.jar".format(STACK_VERSION_PATTERN)
+  hadoop_streaming_tar_source = "/usr/hdp/{0}/hadoop-mapreduce/hadoop-streaming.jar".format(STACK_VERSION_PATTERN)
   sqoop_tar_source = "/usr/hdp/{0}/sqoop/sqoop.tar.gz".format(STACK_VERSION_PATTERN)
   hadoop_streaming_tar_dest_dir = "/hdp/apps/{0}/mapreduce/".format(STACK_VERSION_PATTERN)
   sqoop_tar_dest_dir = "/hdp/apps/{0}/sqoop/".format(STACK_VERSION_PATTERN)

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f5d9487/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
index 7ce3140..326bdc8 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
@@ -144,7 +144,7 @@ class TestFalconServer(RMFTestCase):
         keytab = UnknownConfigurationMock(),
         kinit_path_local = '/usr/bin/kinit',
         user = 'hdfs',
-        owner = 'hdfs',
+        owner = 'falcon',
         group='hadoop',
         hadoop_conf_dir = '/etc/hadoop/conf',
         type = 'directory',


Mime
View raw message