hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sp...@apache.org
Subject hive git commit: HIVE-13987: Clarify current error shown when HS2 is down (Abdullah Yousufi, reviewed by Sergio Pena)
Date Wed, 15 Jun 2016 15:31:03 GMT
Repository: hive
Updated Branches:
  refs/heads/master 113df6ba7 -> 53e01e4a5


HIVE-13987: Clarify current error shown when HS2 is down (Abdullah Yousufi, reviewed by Sergio
Pena)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/53e01e4a
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/53e01e4a
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/53e01e4a

Branch: refs/heads/master
Commit: 53e01e4a5cd88fe04fa67031b8c3183084b287cf
Parents: 113df6b
Author: Abdullah Yousufi <abdullah.yousufi@cloudera.com>
Authored: Wed Jun 15 10:29:56 2016 -0500
Committer: Sergio Pena <sergio.pena@cloudera.com>
Committed: Wed Jun 15 10:29:56 2016 -0500

----------------------------------------------------------------------
 beeline/src/java/org/apache/hive/beeline/BeeLine.java | 5 +++++
 beeline/src/main/resources/BeeLine.properties         | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/53e01e4a/beeline/src/java/org/apache/hive/beeline/BeeLine.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/BeeLine.java b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
index 734eeb8..ba7da70 100644
--- a/beeline/src/java/org/apache/hive/beeline/BeeLine.java
+++ b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
@@ -92,6 +92,7 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hive.beeline.cli.CliOptionsProcessor;
+import org.apache.thrift.transport.TTransportException;
 
 /**
  * A console SQL shell with command completion.
@@ -1745,6 +1746,10 @@ public class BeeLine implements Closeable {
       return;
     }
 
+    if (e.getCause() instanceof TTransportException) {
+      error(loc("hs2-unavailable"));
+    }
+
     error(loc(e instanceof SQLWarning ? "Warning" : "Error",
         new Object[] {
             e.getMessage() == null ? "" : e.getMessage().trim(),

http://git-wip-us.apache.org/repos/asf/hive/blob/53e01e4a/beeline/src/main/resources/BeeLine.properties
----------------------------------------------------------------------
diff --git a/beeline/src/main/resources/BeeLine.properties b/beeline/src/main/resources/BeeLine.properties
index e940a7d..d85ef65 100644
--- a/beeline/src/main/resources/BeeLine.properties
+++ b/beeline/src/main/resources/BeeLine.properties
@@ -142,6 +142,8 @@ active-connections: 0#No active connections|1#{0} active connection:|1<{0}
activ
 
 time-ms: ({0,number,#.###} seconds)
 
+hs2-unavailable: HS2 may be unavailable, check server status
+
 cmd-usage: Usage: java org.apache.hive.cli.beeline.BeeLine \n \
 \  -u <database url>               the JDBC URL to connect to\n \
 \  -r                              reconnect to last saved connect url (in conjunction with
!save)\n \


Mime
View raw message