ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-15534. Unable to restart Falcon server (aonishuk)
Date Wed, 23 Mar 2016 16:19:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2a5f4f810 -> e45d869e7


AMBARI-15534. Unable to restart Falcon server (aonishuk)


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

Branch: refs/heads/trunk
Commit: e45d869e7434dba29bf55a06a54707f267b1f8f6
Parents: 2a5f4f8
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Mar 23 18:16:56 2016 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Mar 23 18:16:56 2016 +0200

----------------------------------------------------------------------
 .../before-START/files/fast-hdfs-resource.jar   | Bin 19285670 -> 19285850 bytes
 .../ambari/fast_hdfs_resource/Resource.java     |   6 +++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e45d869e/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar
index da81264..c90890b 100644
Binary files a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar
and b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar
differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/e45d869e/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Resource.java
----------------------------------------------------------------------
diff --git a/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Resource.java
b/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Resource.java
index 9ef7660..da5a706 100644
--- a/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Resource.java
+++ b/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Resource.java
@@ -210,7 +210,11 @@ public class Resource {
     } else if (isCreate && resource.getType().equals("file")) {
       dfs.createNewFile(pathHadoop); // empty file
     } else {
-      dfs.copyFromLocalFile(new Path(resource.getSource()), pathHadoop);// copy
+      if(dfs.exists(pathHadoop) && dfs.getFileStatus(pathHadoop).isDir()) {
+        System.out.println("Skipping copy from local, as target " + pathHadoop + " is an
existing directory."); // Copy from local to existing directory is not supported by dfs.
+      } else {
+        dfs.copyFromLocalFile(new Path(resource.getSource()), pathHadoop);
+      }
     }
   }
 


Mime
View raw message