zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject zeppelin git commit: [ZEPPELIN-2841] fix a problem in shell interpreter . Working directory '.' can not be found in docker environment
Date Fri, 11 Aug 2017 16:49:39 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 7f2f67bcb -> 71d130521


[ZEPPELIN-2841] fix a problem in shell interpreter . Working directory '.' can not be found
in docker environment

### What is this PR for?
shell interpreter complained that working directory '.' can not be found in docker environment.
I add a line of code to set current working directory to USER`s home, and it works.

### What type of PR is it?
Bug Fix

### Todos
* tests

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2841

### How should this be tested?
run shell interpreter`s test units

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update?
No
* Is there breaking changes for older versions?
No
* Does this needs documentation?
No

Author: Shu Jiaming <jiaming.shu@transwarp.io>
Author: 束佳明 <shujiaming@hotmail.com>

Closes #2521 from vistep/master and squashes the following commits:

34a0049 [Shu Jiaming] ZEPPELIN-2841 fix a bug where shell interpreter complained that working
directory '.' can not be found while zeppelin was running in docker enviroment.
d02104a [束佳明] Merge pull request #1 from apache/master


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

Branch: refs/heads/master
Commit: 71d130521605cb7dcdb80fb18748ffcd87294ed5
Parents: 7f2f67b
Author: Shu Jiaming <jiaming.shu@transwarp.io>
Authored: Wed Aug 9 15:47:36 2017 +0800
Committer: Lee moon soo <moon@apache.org>
Committed: Fri Aug 11 09:49:28 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71d13052/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java b/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
index 07eed5f..daad0b3 100644
--- a/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
+++ b/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
@@ -20,6 +20,7 @@ package org.apache.zeppelin.shell;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.io.File;
 import java.util.List;
 import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
@@ -98,6 +99,7 @@ public class ShellInterpreter extends KerberosInterpreter {
         contextInterpreter.out, contextInterpreter.out));
       executor.setWatchdog(new ExecuteWatchdog(Long.valueOf(getProperty(TIMEOUT_PROPERTY))));
       executors.put(contextInterpreter.getParagraphId(), executor);
+      executor.setWorkingDirectory(new File(System.getProperty("user.home")));
       int exitVal = executor.execute(cmdLine);
       LOGGER.info("Paragraph " + contextInterpreter.getParagraphId() 
         + " return with exit value: " + exitVal);


Mime
View raw message