[incubator-livy] branch master updated: [LIVY-690][THRIFT] Exclude curator in thrift server pom to avoid conflict jars

2019-09-29 Thread jshao
This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-livy.git


The following commit(s) were added to refs/heads/master by this push:
 new 0804c8e  [LIVY-690][THRIFT] Exclude curator in thrift server pom to 
avoid conflict jars
0804c8e is described below

commit 0804c8ea8ece67d01ababec616c9ad8e3b15dc9f
Author: Yiheng Wang 
AuthorDate: Sun Sep 29 16:24:30 2019 +0800

[LIVY-690][THRIFT] Exclude curator in thrift server pom to avoid conflict 
jars

## What changes were proposed in this pull request?
Currently, thrift server has a dependency of curator-client:2.12.0 through 
the hive service. After the build, a `curator-client-2.12.0.jar` file will be 
generated in the `jars` folder. It is conflicted with the 
`curator-client-2.7.1.jar` file, which is used by livy server.

We observed that in some JDK, the `curator-client-2.12.0.jar` is loaded 
before the `curator-client-2.7.1.jar`, and will crash the recovery enabled livy 
server.

In this patch, we exclude the `org.apache.curator` modules from the hive 
dependency.

## How was this patch tested?
Manual test and existing UT/ITs

Author: Yiheng Wang 

Closes #239 from yiheng/exclude_curator.
---
 thriftserver/server/pom.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/thriftserver/server/pom.xml b/thriftserver/server/pom.xml
index fe17f96..86f0b86 100644
--- a/thriftserver/server/pom.xml
+++ b/thriftserver/server/pom.xml
@@ -58,6 +58,10 @@
   org.eclipse.jetty
   *
 
+
+  org.apache.curator
+  *
+
   
 
 



[incubator-livy] branch master updated: [LIVY-688] Error message of BypassJobStatus should contains cause information of Exception

2019-09-29 Thread jshao
This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-livy.git


The following commit(s) were added to refs/heads/master by this push:
 new 0ea4a14  [LIVY-688] Error message of BypassJobStatus should contains 
cause information of Exception
0ea4a14 is described below

commit 0ea4a14fcd77a954898f58b4a624d0d515b52eda
Author: weiwenda 
AuthorDate: Sun Sep 29 16:19:41 2019 +0800

[LIVY-688] Error message of BypassJobStatus should contains cause 
information of Exception

## What changes were proposed in this pull request?
Change the implement of org.apache.livy.rsc.Utils.stackTraceAsString to 
guava Throwables.getStackTraceAsString, so that user can receive details of 
error message by calling org.apache.livy.client.http.JobHandleImpl.get.

https://issues.apache.org/jira/browse/LIVY-688

Author: weiwenda 

Closes #237 from WeiWenda/livy-err-clear.
---
 rsc/src/main/java/org/apache/livy/rsc/Utils.java | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/rsc/src/main/java/org/apache/livy/rsc/Utils.java 
b/rsc/src/main/java/org/apache/livy/rsc/Utils.java
index d2c0059..3c8a5e6 100644
--- a/rsc/src/main/java/org/apache/livy/rsc/Utils.java
+++ b/rsc/src/main/java/org/apache/livy/rsc/Utils.java
@@ -17,6 +17,8 @@
 
 package org.apache.livy.rsc;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -91,13 +93,9 @@ public class Utils {
   }
 
   public static String stackTraceAsString(Throwable t) {
-StringBuilder sb = new StringBuilder();
-sb.append(t.getClass().getName()).append(": ").append(t.getMessage());
-for (StackTraceElement e : t.getStackTrace()) {
-  sb.append("\n");
-  sb.append(e.toString());
-}
-return sb.toString();
+StringWriter stringWriter = new StringWriter();
+t.printStackTrace(new PrintWriter(stringWriter));
+return stringWriter.toString();
   }
 
   public static  void addListener(Future future, final FutureListener 
lsnr) {