hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgumas...@apache.org
Subject hive git commit: Revert "HIVE-13882: When hive.server2.async.exec.async.compile is turned on, from JDBC we will get "The query did not generate a result set" (Reviewed by Jimmy Xiang)"
Date Fri, 03 Jun 2016 05:04:42 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2.1 600bde23b -> 29a25990d


Revert "HIVE-13882: When hive.server2.async.exec.async.compile is turned on, from JDBC we
will get "The query did not generate a result set" (Reviewed by Jimmy Xiang)"

This reverts commit 0adb2255c6dd3f06c92c67f5cbb6917d51dc5636.


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

Branch: refs/heads/branch-2.1
Commit: 29a25990d8d8e039202b838ffca43aadcc954058
Parents: 600bde2
Author: Vaibhav Gumashta <vgumashta@hortonworks.com>
Authored: Thu Jun 2 22:04:25 2016 -0700
Committer: Vaibhav Gumashta <vgumashta@hortonworks.com>
Committed: Thu Jun 2 22:04:25 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/conf/HiveConf.java   |   2 +-
 .../apache/hive/jdbc/TestJdbcWithMiniHS2.java   |  69 +-----------
 .../org/apache/hive/jdbc/HiveStatement.java     |  12 +--
 service-rpc/if/TCLIService.thrift               |   4 -
 .../gen/thrift/gen-cpp/TCLIService_types.cpp    |  22 ----
 .../src/gen/thrift/gen-cpp/TCLIService_types.h  |  12 +--
 .../rpc/thrift/TGetOperationStatusResp.java     | 107 +------------------
 service-rpc/src/gen/thrift/gen-php/Types.php    |  23 ----
 .../src/gen/thrift/gen-py/TCLIService/ttypes.py |  15 +--
 .../gen/thrift/gen-rb/t_c_l_i_service_types.rb  |   4 +-
 .../hive/service/cli/OperationStatus.java       |   8 +-
 .../hive/service/cli/operation/Operation.java   |   2 +-
 .../service/cli/thrift/ThriftCLIService.java    |   1 -
 .../cli/thrift/ThriftCLIServiceClient.java      |   2 +-
 14 files changed, 19 insertions(+), 264 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index ff5c858..c6edacb 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -2082,7 +2082,7 @@ public class HiveConf extends Configuration {
     HIVE_SERVER2_THRIFT_BIND_HOST("hive.server2.thrift.bind.host", "",
         "Bind host on which to run the HiveServer2 Thrift service."),
     HIVE_SERVER2_PARALLEL_COMPILATION("hive.driver.parallel.compilation", false, "Whether
to\n" +
-        "enable parallel compilation of the queries between sessions and within the same
session on HiveServer2. The default is false."),
+        "enable parallel compilation between sessions on HiveServer2. The default is false."),
     HIVE_SERVER2_COMPILE_LOCK_TIMEOUT("hive.server2.compile.lock.timeout", "0s",
         new TimeValidator(TimeUnit.SECONDS),
         "Number of seconds a request will wait to acquire the compile lock before giving
up. " +

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java
b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java
index 5b8d345..38b1f2f 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java
@@ -50,7 +50,6 @@ import java.util.concurrent.TimeoutException;
 
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
-
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -137,66 +136,6 @@ public class TestJdbcWithMiniHS2 {
   }
 
   @Test
-  public void testParallelCompilation() throws Exception {
-    final String tableName = "testParallelCompilation";
-    hs2Conn = getConnection();
-    Statement stmt = hs2Conn.createStatement();
-
-    // create table
-    stmt.execute("DROP TABLE IF EXISTS " + tableName);
-    stmt.execute("CREATE TABLE " + tableName
-        + " (under_col INT COMMENT 'the under column', value STRING) COMMENT ' test table'");
-
-    // load data
-    stmt.execute("load data local inpath '"
-        + kvDataFilePath.toString() + "' into table " + tableName);
-
-    ResultSet res = stmt.executeQuery("SELECT * FROM " + tableName);
-    assertTrue(res.next());
-    res.close();
-
-    stmt.execute("SET hive.driver.parallel.compilation=true");
-    stmt.execute("SET hive.server2.async.exec.async.compile=true");
-
-    stmt.close();
-
-    startConcurrencyTest(hs2Conn, tableName, 10);
-    Connection conn2 = getConnection();
-    startConcurrencyTest(conn2, tableName, 10);
-    conn2.close();
-  }
-
-  @Test
-  public void testParallelCompilation2() throws Exception {
-    final String tableName = "testParallelCompilation2";
-    hs2Conn = getConnection();
-    Statement stmt = hs2Conn.createStatement();
-
-    // create table
-    stmt.execute("DROP TABLE IF EXISTS " + tableName);
-    stmt.execute("CREATE TABLE " + tableName
-        + " (under_col INT COMMENT 'the under column', value STRING) COMMENT ' test table'");
-
-    // load data
-    stmt.execute("load data local inpath '"
-        + kvDataFilePath.toString() + "' into table " + tableName);
-
-    ResultSet res = stmt.executeQuery("SELECT * FROM " + tableName);
-    assertTrue(res.next());
-    res.close();
-
-    stmt.execute("SET hive.driver.parallel.compilation=false");
-    stmt.execute("SET hive.server2.async.exec.async.compile=true");
-
-    stmt.close();
-
-    startConcurrencyTest(hs2Conn, tableName, 10);
-    Connection conn2 = getConnection();
-    startConcurrencyTest(conn2, tableName, 10);
-    conn2.close();
-  }
-
-  @Test
   public void testConcurrentStatements() throws Exception {
     String tableName = "testConcurrentStatements";
     Statement stmt = hs2Conn.createStatement();
@@ -215,13 +154,9 @@ public class TestJdbcWithMiniHS2 {
     res.close();
     stmt.close();
 
-    startConcurrencyTest(hs2Conn, tableName, 300);
-  }
-
-  private static void startConcurrencyTest(Connection conn, String tableName, int numTasks)
{
     // Start concurrent testing
     int POOL_SIZE = 100;
-    int TASK_COUNT = numTasks;
+    int TASK_COUNT = 300;
 
     SynchronousQueue<Runnable> executorQueue = new SynchronousQueue<Runnable>();
     ExecutorService workers = new ThreadPoolExecutor(1, POOL_SIZE, 20, TimeUnit.SECONDS,
executorQueue);
@@ -229,7 +164,7 @@ public class TestJdbcWithMiniHS2 {
     int i = 0;
     while(i < TASK_COUNT) {
       try {
-        Future<Boolean> future = workers.submit(new JDBCTask(conn, i, tableName));
+        Future<Boolean> future = workers.submit(new JDBCTask(hs2Conn, i, tableName));
         list.add(future);
         i++;
       } catch (RejectedExecutionException ree) {

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
----------------------------------------------------------------------
diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
index c4784c3..38ccc78 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
@@ -248,10 +248,10 @@ public class HiveStatement implements java.sql.Statement {
   @Override
   public boolean execute(String sql) throws SQLException {
     runAsyncOnServer(sql);
-    TGetOperationStatusResp status = waitForOperationToComplete();
+    waitForOperationToComplete();
 
     // The query should be completed by now
-    if (!status.isHasResultSet()) {
+    if (!stmtHandle.isHasResultSet()) {
       return false;
     }
     resultSet =  new HiveQueryResultSet.Builder(this).setClient(client).setSessionHandle(sessHandle)
@@ -299,7 +299,7 @@ public class HiveStatement implements java.sql.Statement {
      * Run asynchronously whenever possible
      * Currently only a SQLOperation can be run asynchronously,
      * in a background operation thread
-     * Compilation can run asynchronously or synchronously and execution run asynchronously
+     * Compilation is synchronous and execution is asynchronous
      */
     execReq.setRunAsync(true);
     execReq.setConfOverlay(sessConf);
@@ -318,9 +318,9 @@ public class HiveStatement implements java.sql.Statement {
     }
   }
 
-  TGetOperationStatusResp waitForOperationToComplete() throws SQLException {
+  void waitForOperationToComplete() throws SQLException {
     TGetOperationStatusReq statusReq = new TGetOperationStatusReq(stmtHandle);
-    TGetOperationStatusResp statusResp = null;
+    TGetOperationStatusResp statusResp;
 
     // Poll on the operation status, till the operation is complete
     while (!isOperationComplete) {
@@ -363,8 +363,6 @@ public class HiveStatement implements java.sql.Statement {
         throw new SQLException(e.toString(), "08S01", e);
       }
     }
-
-    return statusResp;
   }
 
   private void checkConnection(String action) throws SQLException {

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service-rpc/if/TCLIService.thrift
----------------------------------------------------------------------
diff --git a/service-rpc/if/TCLIService.thrift b/service-rpc/if/TCLIService.thrift
index 5a9a785..9879b1b 100644
--- a/service-rpc/if/TCLIService.thrift
+++ b/service-rpc/if/TCLIService.thrift
@@ -1037,13 +1037,9 @@ struct TGetOperationStatusResp {
 
   // When was the operation started
   7: optional i64 operationStarted
-
   // When was the operation completed
   8: optional i64 operationCompleted
 
-  // If the operation has the result
-  9: optional bool hasResultSet
-
 }
 
 

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp b/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp
index 0f53cb2..5229230 100644
--- a/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp
+++ b/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp
@@ -8293,11 +8293,6 @@ void TGetOperationStatusResp::__set_operationCompleted(const int64_t
val) {
 __isset.operationCompleted = true;
 }
 
-void TGetOperationStatusResp::__set_hasResultSet(const bool val) {
-  this->hasResultSet = val;
-__isset.hasResultSet = true;
-}
-
 uint32_t TGetOperationStatusResp::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -8386,14 +8381,6 @@ uint32_t TGetOperationStatusResp::read(::apache::thrift::protocol::TProtocol*
ip
           xfer += iprot->skip(ftype);
         }
         break;
-      case 9:
-        if (ftype == ::apache::thrift::protocol::T_BOOL) {
-          xfer += iprot->readBool(this->hasResultSet);
-          this->__isset.hasResultSet = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -8452,11 +8439,6 @@ uint32_t TGetOperationStatusResp::write(::apache::thrift::protocol::TProtocol*
o
     xfer += oprot->writeI64(this->operationCompleted);
     xfer += oprot->writeFieldEnd();
   }
-  if (this->__isset.hasResultSet) {
-    xfer += oprot->writeFieldBegin("hasResultSet", ::apache::thrift::protocol::T_BOOL,
9);
-    xfer += oprot->writeBool(this->hasResultSet);
-    xfer += oprot->writeFieldEnd();
-  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -8472,7 +8454,6 @@ void swap(TGetOperationStatusResp &a, TGetOperationStatusResp &b)
{
   swap(a.taskStatus, b.taskStatus);
   swap(a.operationStarted, b.operationStarted);
   swap(a.operationCompleted, b.operationCompleted);
-  swap(a.hasResultSet, b.hasResultSet);
   swap(a.__isset, b.__isset);
 }
 
@@ -8485,7 +8466,6 @@ TGetOperationStatusResp::TGetOperationStatusResp(const TGetOperationStatusResp&
   taskStatus = other271.taskStatus;
   operationStarted = other271.operationStarted;
   operationCompleted = other271.operationCompleted;
-  hasResultSet = other271.hasResultSet;
   __isset = other271.__isset;
 }
 TGetOperationStatusResp& TGetOperationStatusResp::operator=(const TGetOperationStatusResp&
other272) {
@@ -8497,7 +8477,6 @@ TGetOperationStatusResp& TGetOperationStatusResp::operator=(const
TGetOperationS
   taskStatus = other272.taskStatus;
   operationStarted = other272.operationStarted;
   operationCompleted = other272.operationCompleted;
-  hasResultSet = other272.hasResultSet;
   __isset = other272.__isset;
   return *this;
 }
@@ -8512,7 +8491,6 @@ void TGetOperationStatusResp::printTo(std::ostream& out) const {
   out << ", " << "taskStatus="; (__isset.taskStatus ? (out << to_string(taskStatus))
: (out << "<null>"));
   out << ", " << "operationStarted="; (__isset.operationStarted ? (out <<
to_string(operationStarted)) : (out << "<null>"));
   out << ", " << "operationCompleted="; (__isset.operationCompleted ? (out <<
to_string(operationCompleted)) : (out << "<null>"));
-  out << ", " << "hasResultSet="; (__isset.hasResultSet ? (out << to_string(hasResultSet))
: (out << "<null>"));
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h b/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h
index d23b3cd..838bf17 100644
--- a/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h
+++ b/service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h
@@ -3709,7 +3709,7 @@ inline std::ostream& operator<<(std::ostream& out, const
TGetOperationStatusReq&
 }
 
 typedef struct _TGetOperationStatusResp__isset {
-  _TGetOperationStatusResp__isset() : operationState(false), sqlState(false), errorCode(false),
errorMessage(false), taskStatus(false), operationStarted(false), operationCompleted(false),
hasResultSet(false) {}
+  _TGetOperationStatusResp__isset() : operationState(false), sqlState(false), errorCode(false),
errorMessage(false), taskStatus(false), operationStarted(false), operationCompleted(false)
{}
   bool operationState :1;
   bool sqlState :1;
   bool errorCode :1;
@@ -3717,7 +3717,6 @@ typedef struct _TGetOperationStatusResp__isset {
   bool taskStatus :1;
   bool operationStarted :1;
   bool operationCompleted :1;
-  bool hasResultSet :1;
 } _TGetOperationStatusResp__isset;
 
 class TGetOperationStatusResp {
@@ -3725,7 +3724,7 @@ class TGetOperationStatusResp {
 
   TGetOperationStatusResp(const TGetOperationStatusResp&);
   TGetOperationStatusResp& operator=(const TGetOperationStatusResp&);
-  TGetOperationStatusResp() : operationState((TOperationState::type)0), sqlState(), errorCode(0),
errorMessage(), taskStatus(), operationStarted(0), operationCompleted(0), hasResultSet(0)
{
+  TGetOperationStatusResp() : operationState((TOperationState::type)0), sqlState(), errorCode(0),
errorMessage(), taskStatus(), operationStarted(0), operationCompleted(0) {
   }
 
   virtual ~TGetOperationStatusResp() throw();
@@ -3737,7 +3736,6 @@ class TGetOperationStatusResp {
   std::string taskStatus;
   int64_t operationStarted;
   int64_t operationCompleted;
-  bool hasResultSet;
 
   _TGetOperationStatusResp__isset __isset;
 
@@ -3757,8 +3755,6 @@ class TGetOperationStatusResp {
 
   void __set_operationCompleted(const int64_t val);
 
-  void __set_hasResultSet(const bool val);
-
   bool operator == (const TGetOperationStatusResp & rhs) const
   {
     if (!(status == rhs.status))
@@ -3791,10 +3787,6 @@ class TGetOperationStatusResp {
       return false;
     else if (__isset.operationCompleted && !(operationCompleted == rhs.operationCompleted))
       return false;
-    if (__isset.hasResultSet != rhs.__isset.hasResultSet)
-      return false;
-    else if (__isset.hasResultSet && !(hasResultSet == rhs.hasResultSet))
-      return false;
     return true;
   }
   bool operator != (const TGetOperationStatusResp &rhs) const {

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
index b981368..3049280 100644
--- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
+++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
@@ -46,7 +46,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
   private static final org.apache.thrift.protocol.TField TASK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskStatus",
org.apache.thrift.protocol.TType.STRING, (short)6);
   private static final org.apache.thrift.protocol.TField OPERATION_STARTED_FIELD_DESC = new
org.apache.thrift.protocol.TField("operationStarted", org.apache.thrift.protocol.TType.I64,
(short)7);
   private static final org.apache.thrift.protocol.TField OPERATION_COMPLETED_FIELD_DESC =
new org.apache.thrift.protocol.TField("operationCompleted", org.apache.thrift.protocol.TType.I64,
(short)8);
-  private static final org.apache.thrift.protocol.TField HAS_RESULT_SET_FIELD_DESC = new
org.apache.thrift.protocol.TField("hasResultSet", org.apache.thrift.protocol.TType.BOOL, (short)9);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -62,7 +61,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
   private String taskStatus; // optional
   private long operationStarted; // optional
   private long operationCompleted; // optional
-  private boolean hasResultSet; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -77,8 +75,7 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
     ERROR_MESSAGE((short)5, "errorMessage"),
     TASK_STATUS((short)6, "taskStatus"),
     OPERATION_STARTED((short)7, "operationStarted"),
-    OPERATION_COMPLETED((short)8, "operationCompleted"),
-    HAS_RESULT_SET((short)9, "hasResultSet");
+    OPERATION_COMPLETED((short)8, "operationCompleted");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -109,8 +106,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
           return OPERATION_STARTED;
         case 8: // OPERATION_COMPLETED
           return OPERATION_COMPLETED;
-        case 9: // HAS_RESULT_SET
-          return HAS_RESULT_SET;
         default:
           return null;
       }
@@ -154,9 +149,8 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
   private static final int __ERRORCODE_ISSET_ID = 0;
   private static final int __OPERATIONSTARTED_ISSET_ID = 1;
   private static final int __OPERATIONCOMPLETED_ISSET_ID = 2;
-  private static final int __HASRESULTSET_ISSET_ID = 3;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.OPERATION_STATE,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE,_Fields.TASK_STATUS,_Fields.OPERATION_STARTED,_Fields.OPERATION_COMPLETED,_Fields.HAS_RESULT_SET};
+  private static final _Fields optionals[] = {_Fields.OPERATION_STATE,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE,_Fields.TASK_STATUS,_Fields.OPERATION_STARTED,_Fields.OPERATION_COMPLETED};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -176,8 +170,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.OPERATION_COMPLETED, new org.apache.thrift.meta_data.FieldMetaData("operationCompleted",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-    tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetOperationStatusResp.class,
metaDataMap);
   }
@@ -215,7 +207,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
     }
     this.operationStarted = other.operationStarted;
     this.operationCompleted = other.operationCompleted;
-    this.hasResultSet = other.hasResultSet;
   }
 
   public TGetOperationStatusResp deepCopy() {
@@ -235,8 +226,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
     this.operationStarted = 0;
     setOperationCompletedIsSet(false);
     this.operationCompleted = 0;
-    setHasResultSetIsSet(false);
-    this.hasResultSet = false;
   }
 
   public TStatus getStatus() {
@@ -428,28 +417,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID,
value);
   }
 
-  public boolean isHasResultSet() {
-    return this.hasResultSet;
-  }
-
-  public void setHasResultSet(boolean hasResultSet) {
-    this.hasResultSet = hasResultSet;
-    setHasResultSetIsSet(true);
-  }
-
-  public void unsetHasResultSet() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
-  }
-
-  /** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise
*/
-  public boolean isSetHasResultSet() {
-    return EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
-  }
-
-  public void setHasResultSetIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value);
-  }
-
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case STATUS:
@@ -516,14 +483,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
       }
       break;
 
-    case HAS_RESULT_SET:
-      if (value == null) {
-        unsetHasResultSet();
-      } else {
-        setHasResultSet((Boolean)value);
-      }
-      break;
-
     }
   }
 
@@ -553,9 +512,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
     case OPERATION_COMPLETED:
       return getOperationCompleted();
 
-    case HAS_RESULT_SET:
-      return isHasResultSet();
-
     }
     throw new IllegalStateException();
   }
@@ -583,8 +539,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
       return isSetOperationStarted();
     case OPERATION_COMPLETED:
       return isSetOperationCompleted();
-    case HAS_RESULT_SET:
-      return isSetHasResultSet();
     }
     throw new IllegalStateException();
   }
@@ -674,15 +628,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
         return false;
     }
 
-    boolean this_present_hasResultSet = true && this.isSetHasResultSet();
-    boolean that_present_hasResultSet = true && that.isSetHasResultSet();
-    if (this_present_hasResultSet || that_present_hasResultSet) {
-      if (!(this_present_hasResultSet && that_present_hasResultSet))
-        return false;
-      if (this.hasResultSet != that.hasResultSet)
-        return false;
-    }
-
     return true;
   }
 
@@ -730,11 +675,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
     if (present_operationCompleted)
       list.add(operationCompleted);
 
-    boolean present_hasResultSet = true && (isSetHasResultSet());
-    list.add(present_hasResultSet);
-    if (present_hasResultSet)
-      list.add(hasResultSet);
-
     return list.hashCode();
   }
 
@@ -826,16 +766,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetHasResultSet()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     return 0;
   }
 
@@ -921,12 +851,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
       sb.append(this.operationCompleted);
       first = false;
     }
-    if (isSetHasResultSet()) {
-      if (!first) sb.append(", ");
-      sb.append("hasResultSet:");
-      sb.append(this.hasResultSet);
-      first = false;
-    }
     sb.append(")");
     return sb.toString();
   }
@@ -1044,14 +968,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 9: // HAS_RESULT_SET
-            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
-              struct.hasResultSet = iprot.readBool();
-              struct.setHasResultSetIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1113,11 +1029,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
         oprot.writeI64(struct.operationCompleted);
         oprot.writeFieldEnd();
       }
-      if (struct.isSetHasResultSet()) {
-        oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC);
-        oprot.writeBool(struct.hasResultSet);
-        oprot.writeFieldEnd();
-      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1158,10 +1069,7 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
       if (struct.isSetOperationCompleted()) {
         optionals.set(6);
       }
-      if (struct.isSetHasResultSet()) {
-        optionals.set(7);
-      }
-      oprot.writeBitSet(optionals, 8);
+      oprot.writeBitSet(optionals, 7);
       if (struct.isSetOperationState()) {
         oprot.writeI32(struct.operationState.getValue());
       }
@@ -1183,9 +1091,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
       if (struct.isSetOperationCompleted()) {
         oprot.writeI64(struct.operationCompleted);
       }
-      if (struct.isSetHasResultSet()) {
-        oprot.writeBool(struct.hasResultSet);
-      }
     }
 
     @Override
@@ -1194,7 +1099,7 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
       struct.status = new TStatus();
       struct.status.read(iprot);
       struct.setStatusIsSet(true);
-      BitSet incoming = iprot.readBitSet(8);
+      BitSet incoming = iprot.readBitSet(7);
       if (incoming.get(0)) {
         struct.operationState = org.apache.hive.service.rpc.thrift.TOperationState.findByValue(iprot.readI32());
         struct.setOperationStateIsSet(true);
@@ -1223,10 +1128,6 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOper
         struct.operationCompleted = iprot.readI64();
         struct.setOperationCompletedIsSet(true);
       }
-      if (incoming.get(7)) {
-        struct.hasResultSet = iprot.readBool();
-        struct.setHasResultSetIsSet(true);
-      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service-rpc/src/gen/thrift/gen-php/Types.php
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-php/Types.php b/service-rpc/src/gen/thrift/gen-php/Types.php
index a6a257f..9ed7403 100644
--- a/service-rpc/src/gen/thrift/gen-php/Types.php
+++ b/service-rpc/src/gen/thrift/gen-php/Types.php
@@ -8082,10 +8082,6 @@ class TGetOperationStatusResp {
    * @var int
    */
   public $operationCompleted = null;
-  /**
-   * @var bool
-   */
-  public $hasResultSet = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -8123,10 +8119,6 @@ class TGetOperationStatusResp {
           'var' => 'operationCompleted',
           'type' => TType::I64,
           ),
-        9 => array(
-          'var' => 'hasResultSet',
-          'type' => TType::BOOL,
-          ),
         );
     }
     if (is_array($vals)) {
@@ -8154,9 +8146,6 @@ class TGetOperationStatusResp {
       if (isset($vals['operationCompleted'])) {
         $this->operationCompleted = $vals['operationCompleted'];
       }
-      if (isset($vals['hasResultSet'])) {
-        $this->hasResultSet = $vals['hasResultSet'];
-      }
     }
   }
 
@@ -8236,13 +8225,6 @@ class TGetOperationStatusResp {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 9:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->hasResultSet);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -8299,11 +8281,6 @@ class TGetOperationStatusResp {
       $xfer += $output->writeI64($this->operationCompleted);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->hasResultSet !== null) {
-      $xfer += $output->writeFieldBegin('hasResultSet', TType::BOOL, 9);
-      $xfer += $output->writeBool($this->hasResultSet);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py b/service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py
index fcd330f..44e5462 100644
--- a/service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py
+++ b/service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py
@@ -6097,7 +6097,6 @@ class TGetOperationStatusResp:
    - taskStatus
    - operationStarted
    - operationCompleted
-   - hasResultSet
   """
 
   thrift_spec = (
@@ -6110,10 +6109,9 @@ class TGetOperationStatusResp:
     (6, TType.STRING, 'taskStatus', None, None, ), # 6
     (7, TType.I64, 'operationStarted', None, None, ), # 7
     (8, TType.I64, 'operationCompleted', None, None, ), # 8
-    (9, TType.BOOL, 'hasResultSet', None, None, ), # 9
   )
 
-  def __init__(self, status=None, operationState=None, sqlState=None, errorCode=None, errorMessage=None,
taskStatus=None, operationStarted=None, operationCompleted=None, hasResultSet=None,):
+  def __init__(self, status=None, operationState=None, sqlState=None, errorCode=None, errorMessage=None,
taskStatus=None, operationStarted=None, operationCompleted=None,):
     self.status = status
     self.operationState = operationState
     self.sqlState = sqlState
@@ -6122,7 +6120,6 @@ class TGetOperationStatusResp:
     self.taskStatus = taskStatus
     self.operationStarted = operationStarted
     self.operationCompleted = operationCompleted
-    self.hasResultSet = hasResultSet
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -6174,11 +6171,6 @@ class TGetOperationStatusResp:
           self.operationCompleted = iprot.readI64()
         else:
           iprot.skip(ftype)
-      elif fid == 9:
-        if ftype == TType.BOOL:
-          self.hasResultSet = iprot.readBool()
-        else:
-          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -6221,10 +6213,6 @@ class TGetOperationStatusResp:
       oprot.writeFieldBegin('operationCompleted', TType.I64, 8)
       oprot.writeI64(self.operationCompleted)
       oprot.writeFieldEnd()
-    if self.hasResultSet is not None:
-      oprot.writeFieldBegin('hasResultSet', TType.BOOL, 9)
-      oprot.writeBool(self.hasResultSet)
-      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -6244,7 +6232,6 @@ class TGetOperationStatusResp:
     value = (value * 31) ^ hash(self.taskStatus)
     value = (value * 31) ^ hash(self.operationStarted)
     value = (value * 31) ^ hash(self.operationCompleted)
-    value = (value * 31) ^ hash(self.hasResultSet)
     return value
 
   def __repr__(self):

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb b/service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb
index 71148a0..b39ec1e 100644
--- a/service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb
+++ b/service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb
@@ -1571,7 +1571,6 @@ class TGetOperationStatusResp
   TASKSTATUS = 6
   OPERATIONSTARTED = 7
   OPERATIONCOMPLETED = 8
-  HASRESULTSET = 9
 
   FIELDS = {
     STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class =>
::TStatus},
@@ -1581,8 +1580,7 @@ class TGetOperationStatusResp
     ERRORMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'errorMessage',
:optional => true},
     TASKSTATUS => {:type => ::Thrift::Types::STRING, :name => 'taskStatus', :optional
=> true},
     OPERATIONSTARTED => {:type => ::Thrift::Types::I64, :name => 'operationStarted',
:optional => true},
-    OPERATIONCOMPLETED => {:type => ::Thrift::Types::I64, :name => 'operationCompleted',
:optional => true},
-    HASRESULTSET => {:type => ::Thrift::Types::BOOL, :name => 'hasResultSet', :optional
=> true}
+    OPERATIONCOMPLETED => {:type => ::Thrift::Types::I64, :name => 'operationCompleted',
:optional => true}
   }
 
   def struct_fields; FIELDS; end

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service/src/java/org/apache/hive/service/cli/OperationStatus.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/OperationStatus.java b/service/src/java/org/apache/hive/service/cli/OperationStatus.java
index b0a26e3..5e24d38 100644
--- a/service/src/java/org/apache/hive/service/cli/OperationStatus.java
+++ b/service/src/java/org/apache/hive/service/cli/OperationStatus.java
@@ -28,15 +28,13 @@ public class OperationStatus {
   private final String taskStatus;
   private final long operationStarted;
   private final long operationCompleted;
-  private final boolean hasResultSet;
   private final HiveSQLException operationException;
 
-  public OperationStatus(OperationState state, String taskStatus, long operationStarted,
long operationCompleted, boolean hasResultSet, HiveSQLException operationException) {
+  public OperationStatus(OperationState state, String taskStatus, long operationStarted,
long operationCompleted, HiveSQLException operationException) {
     this.state = state;
     this.taskStatus = taskStatus;
     this.operationStarted = operationStarted;
     this.operationCompleted = operationCompleted;
-    this.hasResultSet = hasResultSet;
     this.operationException = operationException;
   }
 
@@ -56,10 +54,6 @@ public class OperationStatus {
     return operationCompleted;
   }
 
-  public boolean getHasResultSet() {
-    return hasResultSet;
-  }
-
   public HiveSQLException getOperationException() {
     return operationException;
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service/src/java/org/apache/hive/service/cli/operation/Operation.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/operation/Operation.java b/service/src/java/org/apache/hive/service/cli/operation/Operation.java
index d48b92c..0932884 100644
--- a/service/src/java/org/apache/hive/service/cli/operation/Operation.java
+++ b/service/src/java/org/apache/hive/service/cli/operation/Operation.java
@@ -144,7 +144,7 @@ public abstract class Operation {
     } catch (HiveSQLException sqlException) {
       LOG.error("Error getting task status for " + opHandle.toString(), sqlException);
     }
-    return new OperationStatus(state, taskStatus, operationStart, operationComplete, hasResultSet,
operationException);
+    return new OperationStatus(state, taskStatus, operationStart, operationComplete, operationException);
   }
 
   public boolean hasResultSet() {

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
index 8bc3d94..5464e58 100644
--- a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
+++ b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
@@ -629,7 +629,6 @@ public abstract class ThriftCLIService extends AbstractService implements
TCLISe
       resp.setTaskStatus(operationStatus.getTaskStatus());
       resp.setOperationStarted(operationStatus.getOperationStarted());
       resp.setOperationCompleted(operationStatus.getOperationCompleted());
-      resp.setHasResultSet(operationStatus.getHasResultSet());
       if (opException != null) {
         resp.setSqlState(opException.getSQLState());
         resp.setErrorCode(opException.getErrorCode());

http://git-wip-us.apache.org/repos/asf/hive/blob/29a25990/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
index 3c48dbb..82ac42d 100644
--- a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
+++ b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
@@ -370,7 +370,7 @@ public class ThriftCLIServiceClient extends CLIServiceClient {
         opException = new HiveSQLException(resp.getErrorMessage(), resp.getSqlState(), resp.getErrorCode());
       }
       return new OperationStatus(opState, resp.getTaskStatus(), resp.getOperationStarted(),
-        resp.getOperationCompleted(), resp.isHasResultSet(), opException);
+        resp.getOperationCompleted(), opException);
     } catch (HiveSQLException e) {
       throw e;
     } catch (Exception e) {


Mime
View raw message