You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2014/02/10 21:53:09 UTC

[1/2] git commit: KNOX-244: Knox run from the directory with spaces in Windows OS

Updated Branches:
  refs/heads/master a8792293a -> 32a88702f


KNOX-244: Knox run from the directory with spaces in Windows OS


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

Branch: refs/heads/master
Commit: 16536f9ce0252ff3f9198d309471e5663b29eeb8
Parents: b408087
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Mon Feb 10 15:52:44 2014 -0500
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Mon Feb 10 15:52:44 2014 -0500

----------------------------------------------------------------------
 gateway-release/home/bin/gateway.cmd                | 16 +++++++---------
 .../apache/hadoop/gateway/launcher/Launcher.java    | 11 ++++-------
 2 files changed, 11 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/16536f9c/gateway-release/home/bin/gateway.cmd
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/gateway.cmd b/gateway-release/home/bin/gateway.cmd
index c787b9b..517bcd0 100644
--- a/gateway-release/home/bin/gateway.cmd
+++ b/gateway-release/home/bin/gateway.cmd
@@ -154,16 +154,15 @@ SET ERR_FILE=%LOG_DIR%\.err
 :setDirPermission 
 	SET dirName=%1
 	SET uName=%2
-	dir "%dirName%" >NUL 2>NUL
+	dir %dirName% >NUL 2>NUL
 	IF NOT %ERRORLEVEL% ==0 ( 
-		ECHO "making dir"
-		mkdir  "%dirName%" 
+		ECHO "making dir" %dirName%
+		mkdir  %dirName% 
 	)
 	IF NOT %ERRORLEVEL% ==0 (
-		ECHO "Can't access or create \"$dirName\" folder. Run sudo $0 setup."
+		ECHO "Can't access or create %dirName%
 		Exit /B %1
 	)	
-	echo %dirName%
 	GOTO :EOF
 
 :knoxStop {
@@ -212,14 +211,13 @@ SET ERR_FILE=%LOG_DIR%\.err
 	IF [%uName%]==[""] (
 		uName="%USERNAME%" 
 	)  	
-	echo %uName%
-	CALL  :setDirPermission "%PID_DIR%\" %uName%
-	CALL  :setDirPermission "%LOG_DIR%\" %uName%
+	CALL  :setDirPermission "%PID_DIR%" %uName%
+	CALL  :setDirPermission "%LOG_DIR%" %uName%
 	java -DGATEWAY_HOME="%KNOX_HOME%" -jar "%KNOX_JAR%" -persist-master -nostart
 	GOTO :EOF
 
 :printHelp 
-	java -jar %KNOX_JAR% -help
+	java -jar "%KNOX_JAR%" -help
 	GOTO :EOF
 	
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/16536f9c/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Launcher.java
----------------------------------------------------------------------
diff --git a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Launcher.java b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Launcher.java
index 20c990d..b6e2de2 100644
--- a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Launcher.java
+++ b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Launcher.java
@@ -17,13 +17,10 @@
  */
 package org.apache.hadoop.gateway.launcher;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import java.io.*;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URL;
+import java.net.URLDecoder;
 import java.util.Properties;
 
 public class Launcher {
@@ -105,8 +102,8 @@ public class Launcher {
     properties.remove( OVERRIDE );
   }
 
-  private static File calcLauncherDir( URL libUrl ) {
-    String libPath = libUrl.getFile();
+  private static File calcLauncherDir( URL libUrl ) throws UnsupportedEncodingException {
+    String libPath = URLDecoder.decode(libUrl.getFile(), "UTF-8");
     File libFile = new File( libPath );
     File dir;
     if( libFile.isDirectory() ) {


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-knox

Posted by km...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-knox


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

Branch: refs/heads/master
Commit: 32a88702f235302b6b636bafac7cb7743765a7d8
Parents: 16536f9 a879229
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Mon Feb 10 15:53:01 2014 -0500
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Mon Feb 10 15:53:01 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/hadoop/gateway/util/KnoxCLI.java   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------