ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: logging (ls, mkdir)
Date Fri, 10 Apr 2015 13:26:55 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-676 c1e07eb5b -> 2c0c2654e


logging (ls, mkdir)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2c0c2654
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2c0c2654
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2c0c2654

Branch: refs/heads/ignite-676
Commit: 2c0c2654e172de38d0c6f92250e3010fe6063bd7
Parents: c1e07eb
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Fri Apr 10 16:26:52 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Fri Apr 10 16:26:52 2015 +0300

----------------------------------------------------------------------
 log_ls.txt                                      |  1 +
 log_mkdir1.txt                                  |  1 +
 log_mkdir2.txt                                  |  1 +
 .../util/nodestart/StartNodeCallableImpl.java   | 24 ++++++++++++++------
 ...gniteProjectionStartStopRestartSelfTest.java | 11 +++++----
 5 files changed, 27 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c0c2654/log_ls.txt
----------------------------------------------------------------------
diff --git a/log_ls.txt b/log_ls.txt
new file mode 100644
index 0000000..8ccf92e
--- /dev/null
+++ b/log_ls.txt
@@ -0,0 +1 @@
+Nothig happens.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c0c2654/log_mkdir1.txt
----------------------------------------------------------------------
diff --git a/log_mkdir1.txt b/log_mkdir1.txt
new file mode 100644
index 0000000..8ccf92e
--- /dev/null
+++ b/log_mkdir1.txt
@@ -0,0 +1 @@
+Nothig happens.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c0c2654/log_mkdir2.txt
----------------------------------------------------------------------
diff --git a/log_mkdir2.txt b/log_mkdir2.txt
new file mode 100644
index 0000000..8ccf92e
--- /dev/null
+++ b/log_mkdir2.txt
@@ -0,0 +1 @@
+Nothig happens.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c0c2654/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
index cb2f4ab..44280cb 100644
--- a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
+++ b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
@@ -58,8 +58,11 @@ public class StartNodeCallableImpl implements StartNodeCallable {
     @LoggerResource
     private IgniteLogger log;
 
-    public static String nohupHelpName;
-    public static String fName;
+    public static String fileNameLs;
+    public static String fileNameNohupHelp;
+    public static String fileNameMain;
+    public static String fileNameMkdir1;
+    public static String fileNameMkdir2;
 
     /**
      * Required by Externalizable.
@@ -139,7 +142,11 @@ public class StartNodeCallableImpl implements StartNodeCallable {
                 String tmpDir = env(ses, "$TMPDIR", "/tmp/");
                 String scriptOutputDir = tmpDir + "ignite-startNodes";
 
-                shell(ses, "mkdir " + scriptOutputDir);
+                fileNameMkdir1 = igniteHome + "/log_mkdir1.txt";
+                fileNameMkdir2 = igniteHome + "/log_mkdir2.txt";
+
+                shell(ses, "mkdir " + scriptOutputDir + " > " +  fileNameMkdir1 + " 2>&
1 &");
+                shell(ses, "mkdir " + scriptOutputDir + " > " +  fileNameMkdir2 + " 2>&
1 &");
 
                 // Mac os don't support ~ in double quotes. Trying get home path from remote
system.
                 if (igniteHome.startsWith("~")) {
@@ -148,21 +155,24 @@ public class StartNodeCallableImpl implements StartNodeCallable {
                     igniteHome = igniteHome.replaceFirst("~", homeDir);
                 }
                 
-                fName = igniteHome + "/log1.txt";
-                nohupHelpName = igniteHome + "/log_nohup_help.txt";
+                fileNameMain = igniteHome + "/log1.txt";
+                fileNameNohupHelp = igniteHome + "/log_nohup_help.txt";
+                fileNameNohupHelp = igniteHome + "/log_ls.txt";
 
                 startNodeCmd = new SB().
                     // Console output is consumed, started nodes must use Ignite file appenders
for log.
                         a("nohup ").
                     a("\"").a(igniteHome).a('/').a(scriptPath).a("\"").
                     a(" ").a(scriptArgs).
-                    a(!cfg.isEmpty() ? " \"" : "").a(cfg).a(!cfg.isEmpty() ? "\"" : "").a(rmtLogArgs).a("
> ").a(fName).a(" 2>& 1 &").
+                    a(!cfg.isEmpty() ? " \"" : "").a(cfg).a(!cfg.isEmpty() ? "\"" : "").a(rmtLogArgs).a("
> ").a(fileNameMain).a(" 2>& 1 &").
                     toString();
             }
 
             info("Starting remote node with SSH command: " + startNodeCmd, spec.logger(),
log);
 
-            shell(ses, "nohup --help  > " + nohupHelpName + " 2>& 1 &");
+            shell(ses, "ls  > " + fileNameLs + " 2>& 1 &");
+            
+            shell(ses, "nohup --help  > " + fileNameNohupHelp + " 2>& 1 &");
 
             shell(ses, startNodeCmd);
             

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c0c2654/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
index c419967..c6b4d07 100644
--- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
+++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
@@ -193,10 +193,13 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
             }
         });
 
-        joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+        joinedLatch.await(60, SECONDS);
 
-        printFile(StartNodeCallableImpl.nohupHelpName);
-        printFile(StartNodeCallableImpl.fName);
+        printFile(StartNodeCallableImpl.fileNameMkdir1);
+        printFile(StartNodeCallableImpl.fileNameMkdir2);
+        printFile(StartNodeCallableImpl.fileNameLs);
+        printFile(StartNodeCallableImpl.fileNameNohupHelp);
+        printFile(StartNodeCallableImpl.fileNameMain);
 
         assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
 
@@ -210,7 +213,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
         log.info(">>>>> File name=" + fName);
 
         try {
-            BufferedReader reader = new BufferedReader(new FileReader(StartNodeCallableImpl.fName));
+            BufferedReader reader = new BufferedReader(new FileReader(StartNodeCallableImpl.fileNameMain));
 
             String st = "";
 


Mime
View raw message