You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2017/12/14 17:46:46 UTC

[1/2] incubator-trafodion git commit: TRAFODION-2829

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master f71c719da -> d5a7f5b68


TRAFODION-2829


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/4eca9347
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/4eca9347
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/4eca9347

Branch: refs/heads/master
Commit: 4eca9347e1a90762df1e886e5088e30319e6430b
Parents: 318f487
Author: liyuanyuan <yu...@esgyn.cn>
Authored: Tue Dec 5 11:24:13 2017 +0000
Committer: liyuanyuan <yu...@esgyn.cn>
Committed: Tue Dec 5 11:25:08 2017 +0000

----------------------------------------------------------------------
 core/conn/trafci/install/Installer.java-tmpl      | 18 +++++++++++++-----
 core/conn/trafci/lib/python/Session.py            |  2 ++
 core/conn/trafci/samples/sampleDDL.py             |  1 +
 core/conn/trafci/samples/sampleDML.py             |  1 +
 core/conn/trafci/samples/sampleTables.py          |  1 +
 .../java/org/trafodion/ci/SessionInterface.java   |  2 +-
 6 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4eca9347/core/conn/trafci/install/Installer.java-tmpl
----------------------------------------------------------------------
diff --git a/core/conn/trafci/install/Installer.java-tmpl b/core/conn/trafci/install/Installer.java-tmpl
index 83f3510..d85e1fc 100644
--- a/core/conn/trafci/install/Installer.java-tmpl
+++ b/core/conn/trafci/install/Installer.java-tmpl
@@ -3287,12 +3287,8 @@ void processCmdMode(String zipfile)
 
       StringBuffer path = new StringBuffer();
       for (String jarFile : jarFiles) {
-         if (isTrafHome) {
-            path.append(INSTALL_DIR_STR);
-         } else {
             path.append(outputDir.getAbsolutePath());
-         }
-         path.append(File.separator).append(jarFile).append(File.pathSeparator);
+	    path.append(File.separator).append(jarFile).append(File.pathSeparator);
       }
       String replaceStr = path.substring(0, path.length() - File.pathSeparator.length());
 
@@ -3318,7 +3314,19 @@ void processCmdMode(String zipfile)
       replacePythonLib=replacePythonLib.replaceAll("\\$","\\\\\\$");
            
       batchfile=batchfile.replaceAll(classVarToReplace,replace).replaceAll("#####PATH#####",File.separator+File.separator+File.separator+File.separator);
+      String[] split = replacePython.split(File.pathSeparator);
+		List list = new ArrayList<String>();
+		for (String str : split) {
+			list.add("\""+str+"\"");
+		}
+      replacePython = list.toString();
       batchfile=batchfile.replaceAll(pythonClassVarToReplace,replacePython).replaceAll("#####PATH#####",File.separator+File.separator+File.separator+File.separator);
+     /* String[] split = batchfile.split(File.pathSeparator);
+		List list = new ArrayList<String>();
+		for (String str : split) {
+			list.add(str);
+		}
+      batchfile = list.toString(); */
       batchfile=batchfile.replaceAll(perlClassVarToReplace,replacePerl).replaceAll("#####PATH#####",File.separator+File.separator+File.separator+File.separator);
       batchfile =batchfile.replaceAll(perlLibPathToReplace, replacePerlLib).replaceAll("#####PATH#####", File.separator + File.separator + File.separator + File.separator);
       batchfile =batchfile.replaceAll(pythonLibPathToReplace, replacePythonLib).replaceAll("#####PATH#####", File.separator + File.separator + File.separator + File.separator);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4eca9347/core/conn/trafci/lib/python/Session.py
----------------------------------------------------------------------
diff --git a/core/conn/trafci/lib/python/Session.py b/core/conn/trafci/lib/python/Session.py
old mode 100644
new mode 100755
index 7106ed0..5b2dc12
--- a/core/conn/trafci/lib/python/Session.py
+++ b/core/conn/trafci/lib/python/Session.py
@@ -1,3 +1,4 @@
+#!/usr/bin/jython
 # @@@ START COPYRIGHT @@@
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +20,7 @@
 #
 # @@@ END COPYRIGHT @@@
 import sys
+sys.path += ##TRAFCI_PYTHON_CLASSPATH##
 from org.trafodion.ci import ScriptsInterface
 from java.lang import System
 from java.io import PrintStream

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4eca9347/core/conn/trafci/samples/sampleDDL.py
----------------------------------------------------------------------
diff --git a/core/conn/trafci/samples/sampleDDL.py b/core/conn/trafci/samples/sampleDDL.py
old mode 100644
new mode 100755
index d890a9f..0b5fde8
--- a/core/conn/trafci/samples/sampleDDL.py
+++ b/core/conn/trafci/samples/sampleDDL.py
@@ -1,3 +1,4 @@
+#!/usr/bin/jython
 # @@@ START COPYRIGHT @@@
 #
 # Licensed to the Apache Software Foundation (ASF) under one

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4eca9347/core/conn/trafci/samples/sampleDML.py
----------------------------------------------------------------------
diff --git a/core/conn/trafci/samples/sampleDML.py b/core/conn/trafci/samples/sampleDML.py
old mode 100644
new mode 100755
index 413166e..79a2b22
--- a/core/conn/trafci/samples/sampleDML.py
+++ b/core/conn/trafci/samples/sampleDML.py
@@ -1,3 +1,4 @@
+#!/usr/bin/jython
 # @@@ START COPYRIGHT @@@
 #
 # Licensed to the Apache Software Foundation (ASF) under one

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4eca9347/core/conn/trafci/samples/sampleTables.py
----------------------------------------------------------------------
diff --git a/core/conn/trafci/samples/sampleTables.py b/core/conn/trafci/samples/sampleTables.py
old mode 100644
new mode 100755
index 78dd70a..151a8c4
--- a/core/conn/trafci/samples/sampleTables.py
+++ b/core/conn/trafci/samples/sampleTables.py
@@ -1,3 +1,4 @@
+#!/usr/bin/jython
 # @@@ START COPYRIGHT @@@
 #
 # Licensed to the Apache Software Foundation (ASF) under one

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4eca9347/core/conn/trafci/src/main/java/org/trafodion/ci/SessionInterface.java
----------------------------------------------------------------------
diff --git a/core/conn/trafci/src/main/java/org/trafodion/ci/SessionInterface.java b/core/conn/trafci/src/main/java/org/trafodion/ci/SessionInterface.java
index 0243eb1..b5aa53e 100644
--- a/core/conn/trafci/src/main/java/org/trafodion/ci/SessionInterface.java
+++ b/core/conn/trafci/src/main/java/org/trafodion/ci/SessionInterface.java
@@ -415,7 +415,7 @@ public class SessionInterface implements SessionDefaults
                if (!OS_EOF)
                {
             	   if(!sessObj.isSessionStartup()) {
-	                  if  (!userPressedCtrlC && sessObj.isLogCmdText() && sessObj.isLogCmdEcho() && !reader.getConsoleReader().isJline() )
+	                  if  (!userPressedCtrlC && sessObj.isLogCmdText() && sessObj.isLogCmdEcho() && reader.getConsoleReader() != null  && !reader.getConsoleReader().isJline() )
 	                  {
 	                     writer.write(sessObj.getSessionPrompt());
 	                  }


[2/2] incubator-trafodion git commit: Merge [TRAFODION-2829] PR 1324 Fix Python example

Posted by db...@apache.org.
Merge [TRAFODION-2829] PR 1324 Fix Python example


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

Branch: refs/heads/master
Commit: d5a7f5b68427b3e041d45f7e910c9443902e0bee
Parents: f71c719 4eca934
Author: Dave Birdsall <db...@apache.org>
Authored: Thu Dec 14 17:45:49 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Thu Dec 14 17:45:49 2017 +0000

----------------------------------------------------------------------
 core/conn/trafci/install/Installer.java-tmpl      | 18 +++++++++++++-----
 core/conn/trafci/lib/python/Session.py            |  2 ++
 core/conn/trafci/samples/sampleDDL.py             |  1 +
 core/conn/trafci/samples/sampleDML.py             |  1 +
 core/conn/trafci/samples/sampleTables.py          |  1 +
 .../java/org/trafodion/ci/SessionInterface.java   |  2 +-
 6 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------