hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [01/31] hive git commit: Revert "HIVE-13589: beeline - support prompt for password with '-u' option(Ke Jia, reviewed by Vihang Karajgaonkar and Ferdinand Xu)"
Date Mon, 12 Sep 2016 20:24:33 GMT
Repository: hive
Updated Branches:
  refs/heads/hive-14535 30fd19f4b -> 3e481b471


Revert "HIVE-13589: beeline - support prompt for password with '-u' option(Ke Jia, reviewed
by Vihang Karajgaonkar and Ferdinand Xu)"

This reverts commit e6b5115868ca42f974e525d2309e747be65f5d80.


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

Branch: refs/heads/hive-14535
Commit: 63fdb513f907309b4de4122ea5e37f17da7e0f7b
Parents: 8cec20d
Author: Ferdinand Xu <cheng.a.xu@intel.com>
Authored: Thu Sep 8 02:50:40 2016 +0800
Committer: Ferdinand Xu <cheng.a.xu@intel.com>
Committed: Thu Sep 8 02:50:40 2016 +0800

----------------------------------------------------------------------
 .../src/java/org/apache/hive/beeline/BeeLine.java    | 15 ++++++---------
 .../src/java/org/apache/hive/beeline/Commands.java   |  2 +-
 2 files changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/63fdb513/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 8e65e39..ecd60f6 100644
--- a/beeline/src/java/org/apache/hive/beeline/BeeLine.java
+++ b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
@@ -881,7 +881,6 @@ public class BeeLine implements Closeable {
     }
 
     try {
-      ConsoleReader reader = getConsoleReader(inputStream);
       if (isBeeLine) {
         int code = initArgs(args);
         if (code != 0) {
@@ -906,7 +905,7 @@ public class BeeLine implements Closeable {
       } catch (Exception e) {
         // ignore
       }
-
+      ConsoleReader reader = getConsoleReader(inputStream);
       return execute(reader, false);
     } finally {
         close();
@@ -1080,16 +1079,14 @@ public class BeeLine implements Closeable {
     Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
         @Override
         public void run() {
-          if(consoleReader != null) {
             History h = consoleReader.getHistory();
             if (h instanceof FileHistory) {
-              try {
-                ((FileHistory) h).flush();
-              } catch (IOException e) {
-                error(e);
-              }
+                try {
+                    ((FileHistory) h).flush();
+                } catch (IOException e) {
+                    error(e);
+                }
             }
-          }
         }
     }));
 

http://git-wip-us.apache.org/repos/asf/hive/blob/63fdb513/beeline/src/java/org/apache/hive/beeline/Commands.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/Commands.java b/beeline/src/java/org/apache/hive/beeline/Commands.java
index 2f3ec13..039e354 100644
--- a/beeline/src/java/org/apache/hive/beeline/Commands.java
+++ b/beeline/src/java/org/apache/hive/beeline/Commands.java
@@ -1511,7 +1511,7 @@ public class Commands {
         username = beeLine.getConsoleReader().readLine("Enter username for " + url + ": ");
       }
       props.setProperty(JdbcConnectionParams.AUTH_USER, username);
-      if (password == null || password.length() == 0) {
+      if (password == null) {
         password = beeLine.getConsoleReader().readLine("Enter password for " + url + ": ",
           new Character('*'));
       }


Mime
View raw message