zeppelin git commit: [Zeppelin-1229] Add cache buster for zeppelin-web build

2016-07-29 Thread corneadoug
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.6 aa5068f5e -> 13752e202


[Zeppelin-1229] Add cache buster for zeppelin-web build

In order to bust the cache when there is changes to the code of zeppelin-web 
after build, we are adding hashes at the end of the imported .js and .css files 
we use.
Every time there is changes in one of those file, the hash will change and the 
browser will use new file instead of cached one.

Improvement

https://issues.apache.org/jira/browse/ZEPPELIN-1229

* Build zeppelin-web once and write down the HASH in 
`dist/scripts/scripts.HASH.js`
* After making a change inside a .js file of the application and building 
again, the hash in `dist/scripts/scripts.HASH.js` should be changed.

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

Author: Damien CORNEAU 

Closes #1225 from corneadoug/ZEPPELIN-1229 and squashes the following commits:

ebad090 [Damien CORNEAU] Add cache buster for .js and .css file in zeppelin-web 
production build

(cherry picked from commit 848dbd0302a4e6d4917a70c1cbc2220a7a814488)
Signed-off-by: Damien CORNEAU 


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

Branch: refs/heads/branch-0.6
Commit: 13752e2020057da19b4c92a7bca0add38d20e0f5
Parents: aa5068f
Author: Damien CORNEAU 
Authored: Mon Jul 25 14:20:06 2016 +0900
Committer: Damien CORNEAU 
Committed: Fri Jul 29 15:45:25 2016 +0900

--
 zeppelin-web/Gruntfile.js | 26 +-
 zeppelin-web/package.json |  1 +
 2 files changed, 26 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/13752e20/zeppelin-web/Gruntfile.js
--
diff --git a/zeppelin-web/Gruntfile.js b/zeppelin-web/Gruntfile.js
index 5574daf..8204837 100644
--- a/zeppelin-web/Gruntfile.js
+++ b/zeppelin-web/Gruntfile.js
@@ -56,6 +56,29 @@ module.exports = function (grunt) {
   }
 },
 
+htmlhint: {
+  options: {
+'tagname-lowercase': true,
+'attr-lowercase': true,
+'space-tab-mixed-disabled': 'space',
+'tag-pair': true,
+'tag-self-close': true,
+'attr-no-duplication': true
+  },
+  src: ['src/**/*.html']
+},
+
+cacheBust: {
+  taskName: {
+options: {
+  baseDir: '<%= yeoman.dist %>',
+  assets: ['scripts/**.js', 'styles/**.css'],
+  deleteOriginals: true
+},
+src: ['<%= yeoman.dist %>/index.html']
+  }
+},
+
 'goog-webfont-dl': {
   patuaOne: {
 options: {
@@ -500,7 +523,8 @@ module.exports = function (grunt) {
 'cssmin',
 'uglify',
 'usemin',
-'htmlmin'
+'htmlmin',
+'cacheBust'
   ]);
 
   grunt.registerTask('default', [

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/13752e20/zeppelin-web/package.json
--
diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json
index ff18967..d8081ed 100644
--- a/zeppelin-web/package.json
+++ b/zeppelin-web/package.json
@@ -9,6 +9,7 @@
 "autoprefixer": "^6.1.0",
 "bower": "1.7.2",
 "grunt": "^0.4.1",
+"grunt-cache-bust": "^1.3.0",
 "grunt-cli": "^0.1.13",
 "grunt-concurrent": "^0.5.0",
 "grunt-contrib-clean": "^0.5.0",



zeppelin git commit: [MINOR] Make scala version definition consistent in Travis.CI configuration

2016-07-29 Thread minalee
Repository: zeppelin
Updated Branches:
  refs/heads/master 40cfc5a40 -> 2696930ed


[MINOR] Make scala version definition consistent in Travis.CI configuration

### What is this PR for?
Minor cleanup to make scala version definition consistent in the Travis.CI 
configuration

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

Author: Luciano Resende 

Closes #1220 from lresende/travis and squashes the following commits:

91c1fc0 [Luciano Resende] [MINOR] Make scala version profiles consistent


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

Branch: refs/heads/master
Commit: 2696930ed381eb522fa92ae8b09d28e4d4889d40
Parents: 40cfc5a
Author: Luciano Resende 
Authored: Fri Jul 22 07:02:03 2016 -0700
Committer: Mina Lee 
Committed: Fri Jul 29 15:34:31 2016 +0900

--
 .travis.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2696930e/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 1656f4b..0af97b9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,7 @@ matrix:
 
 # Test all modules with scala 2.10
 - jdk: "oraclejdk7"
-  env: SCALA_VER="2.10" SPARK_VER="1.6.1" HADOOP_VER="2.3" 
PROFILE="-Pspark-1.6 -Pr -Phadoop-2.3 -Ppyspark -Psparkr -Pscalding -Pexamples" 
BUILD_FLAG="package -Pbuild-distr" TEST_FLAG="verify -Pusing-packaged-distr" 
TEST_PROJECTS=""
+  env: SCALA_VER="2.10" SPARK_VER="1.6.1" HADOOP_VER="2.3" 
PROFILE="-Pspark-1.6 -Pr -Phadoop-2.3 -Ppyspark -Psparkr -Pscalding -Pexamples 
-Pscala-2.10" BUILD_FLAG="package -Pbuild-distr" TEST_FLAG="verify 
-Pusing-packaged-distr" TEST_PROJECTS=""
 
 # Test all modules with scala 2.11
 - jdk: "oraclejdk7"
@@ -104,4 +104,3 @@ after_failure:
 
 after_script:
   - ./testing/stopSparkCluster.sh $SPARK_VER $HADOOP_VER
-



zeppelin git commit: ZEPPELIN-1225. Errors before the last shell command are ignored

2016-07-29 Thread moon
Repository: zeppelin
Updated Branches:
  refs/heads/master 211e55d01 -> 40cfc5a40


ZEPPELIN-1225. Errors before the last shell command are ignored

### What is this PR for?
The problem is that command "bash -c " will always return 0 as 
long as the last line of shell script run correctly. e.g the following command 
will run correctly without any error message.
```
hello
pwd
```
This PR will redirect stderr and stdout to the same place, and will display 
both the stderr and stdout to frontend just like what user see in the native 
shell terminal. So the output of above command will be as following
```
bash: hello: command not found
/Users/jzhang/github/zeppelin
```

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

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

### How should this be tested?
Unit test is added and also manually verify it on zeppelin notebook.

### 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: Jeff Zhang 

This patch had conflicts when merged, resolved by
Committer: Lee moon soo 

Closes #1215 from zjffdu/ZEPPELIN-1225 and squashes the following commits:

aa87b66 [Jeff Zhang] should clear executors after shell execution is completed
0266c71 [Jeff Zhang] ZEPPELIN-1225. Errors before the last shell command are 
ignored


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

Branch: refs/heads/master
Commit: 40cfc5a408de49214ab77d31273afde7188a4cea
Parents: 211e55d
Author: Jeff Zhang 
Authored: Fri Jul 22 14:30:31 2016 +0800
Committer: Lee moon soo 
Committed: Fri Jul 29 15:11:55 2016 +0900

--
 .../apache/zeppelin/shell/ShellInterpreter.java |  20 +--
 .../zeppelin/shell/ShellInterpreterTest.java| 137 +++
 2 files changed, 88 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/40cfc5a4/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 9619de5..3e09b8b 100644
--- a/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
+++ b/shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.commons.exec.CommandLine;
 import org.apache.commons.exec.DefaultExecutor;
@@ -50,7 +51,7 @@ public class ShellInterpreter extends Interpreter {
   private static final String TIMEOUT_PROPERTY = 
"shell.command.timeout.millisecs";
   private final boolean isWindows = 
System.getProperty("os.name").startsWith("Windows");
   private final String shell = isWindows ? "cmd /c" : "bash -c";
-  private Map executors;
+  ConcurrentHashMap executors;
 
   public ShellInterpreter(Properties property) {
 super(property);
@@ -59,7 +60,7 @@ public class ShellInterpreter extends Interpreter {
   @Override
   public void open() {
 LOGGER.info("Command timeout property: {}", getProperty(TIMEOUT_PROPERTY));
-executors = new HashMap();
+executors = new ConcurrentHashMap();
 if (!StringUtils.isAnyEmpty(getProperty("zeppelin.shell.auth.type"))) {
   ShellSecurityImpl.createSecureConfiguration(getProperty(), shell);
 }
@@ -73,7 +74,6 @@ public class ShellInterpreter extends Interpreter {
   public InterpreterResult interpret(String cmd, InterpreterContext 
contextInterpreter) {
 LOGGER.debug("Run shell command '" + cmd + "'");
 OutputStream outStream = new ByteArrayOutputStream();
-OutputStream errStream = new ByteArrayOutputStream();
 
 CommandLine cmdLine = CommandLine.parse(shell);
 // the Windows CMD shell doesn't handle multiline statements,
@@ -86,7 +86,7 @@ public class ShellInterpreter extends Interpreter {
 
 try {
   DefaultExecutor executor = new DefaultExecutor();
-  executor.setStreamHandler(new PumpStreamHandler(outStream, errStream));
+  executor.setStreamHandler(new PumpStreamHandler(outStream, outStream));
   executor.setWatchdog(new 
ExecuteWatchdog(Long.valueOf(getProperty(TIMEOUT_PROPERTY;
   executors.put(contextInterpreter.getParagraphId(), executor);