hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From heyongqi...@apache.org
Subject svn commit: r1083640 - in /hive/trunk/cli/src/java/org/apache/hadoop/hive/cli: CliDriver.java CliSessionState.java
Date Mon, 21 Mar 2011 00:40:35 GMT
Author: heyongqiang
Date: Mon Mar 21 00:40:35 2011
New Revision: 1083640

URL: http://svn.apache.org/viewvc?rev=1083640&view=rev
Log:
HIVE-2060:CLI local mode hit NPE when exiting by ^D (Ning Zhang via He Yongqiang)

Modified:
    hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
    hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliSessionState.java

Modified: hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
URL: http://svn.apache.org/viewvc/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java?rev=1083640&r1=1083639&r2=1083640&view=diff
==============================================================================
--- hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java (original)
+++ hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java Mon Mar 21 00:40:35
2011
@@ -95,6 +95,7 @@ public class CliDriver {
       // if we have come this far - either the previous commands
       // are all successful or this is command line. in either case
       // this counts as a successful run
+      ss.close();
       System.exit(0);
 
     } else if (tokens[0].equalsIgnoreCase("source")) {

Modified: hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliSessionState.java
URL: http://svn.apache.org/viewvc/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliSessionState.java?rev=1083640&r1=1083639&r2=1083640&view=diff
==============================================================================
--- hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliSessionState.java (original)
+++ hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliSessionState.java Mon Mar 21 00:40:35
2011
@@ -103,9 +103,10 @@ public class CliSessionState extends Ses
 
   public void close() {
     try {
-      client.clean();
-      client.shutdown();
-      transport.close();
+      if (remoteMode) {
+        client.clean();
+        transport.close();
+      }
     } catch (TException e) {
       e.printStackTrace();
     }



Mime
View raw message