You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by hz...@apache.org on 2016/03/01 23:36:20 UTC
[34/37] incubator-trafodion git commit: add more log and set default
value for pdsh/pdcp
add more log and set default value for pdsh/pdcp
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/a028041e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/a028041e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/a028041e
Branch: refs/heads/master
Commit: a028041e640025189be4f6ba2a1cf1d19f43086f
Parents: 83b6c28
Author: Kevin Xu <ka...@esgyn.cn>
Authored: Thu Jan 21 12:43:06 2016 +0800
Committer: Kevin Xu <ka...@esgyn.cn>
Committed: Thu Jan 21 12:43:06 2016 +0800
----------------------------------------------------------------------
.../src/main/java/org/trafodion/libmgmt/FileMgmt.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a028041e/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/FileMgmt.java
----------------------------------------------------------------------
diff --git a/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/FileMgmt.java b/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/FileMgmt.java
index 093bf85..bae0702 100644
--- a/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/FileMgmt.java
+++ b/core/sql/lib_mgmt/src/main/java/org/trafodion/libmgmt/FileMgmt.java
@@ -237,17 +237,20 @@ public class FileMgmt {
public static void syncJar(String userPath, String fileName) throws SQLException, IOException {
checkFileName(fileName);
- LOG.info("syncJars " + fileName);
String nodes = System.getenv("MY_NODES");
+ LOG.info("syncJars " + fileName + ", MY_NODES=" + nodes);
if (nodes != null && !"".equals(nodes.trim())) {
String pdcp = System.getenv("SQ_PDCP");
String pdsh = System.getenv("SQ_PDSH");
- if (pdcp != null) {
- execShell(pdcp + " " + nodes + " " + userPath + fileName.trim() + " " + userPath + " ");
+ LOG.info("SQ_PDCP=" + pdcp + ", SQ_PDSH=" + pdsh);
+ if (pdcp == null) {
+ pdcp = "/usr/bin/pdcp";
}
- if (pdsh != null) {
- execShell(pdsh + " " + nodes + " chmod 755 " + userPath + fileName.trim());
+ if (pdsh == null) {
+ pdsh = "/usr/bin/pdsh";
}
+ execShell(pdcp + " " + nodes + " " + userPath + fileName.trim() + " " + userPath + " ");
+ execShell(pdsh + " " + nodes + " chmod 755 " + userPath + fileName.trim());
}
}
@@ -264,6 +267,7 @@ public class FileMgmt {
}
private static String execShell(String cmd) throws IOException {
+ LOG.info("Processing command: " + cmd);
Process p = Runtime.getRuntime().exec(cmd);
if (p != null) {
StringBuilder sb = new StringBuilder();