hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject hive git commit: HIVE-14177: HS2 UI - List of recent queries shows most recent query last (Gunther Hagleitner, reviewed by Szehon Ho)
Date Wed, 03 Aug 2016 17:22:05 GMT
Repository: hive
Updated Branches:
  refs/heads/master 15efc47f8 -> 4b6ac735f


HIVE-14177: HS2 UI - List of recent queries shows most recent query last (Gunther Hagleitner,
reviewed by Szehon Ho)


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

Branch: refs/heads/master
Commit: 4b6ac735ffbdbfa16ee0fff33293c94f6b711f06
Parents: 15efc47
Author: Gunther Hagleitner <gunther@apache.org>
Authored: Wed Aug 3 10:21:08 2016 -0700
Committer: Gunther Hagleitner <gunther@apache.org>
Committed: Wed Aug 3 10:21:08 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hive/service/cli/session/TestQueryDisplay.java    | 4 ++--
 .../org/apache/hive/service/cli/operation/OperationManager.java  | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/4b6ac735/itests/hive-unit/src/test/java/org/apache/hive/service/cli/session/TestQueryDisplay.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/service/cli/session/TestQueryDisplay.java
b/itests/hive-unit/src/test/java/org/apache/hive/service/cli/session/TestQueryDisplay.java
index cc18ce7..6c60125 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/service/cli/session/TestQueryDisplay.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/service/cli/session/TestQueryDisplay.java
@@ -90,8 +90,8 @@ public class TestQueryDisplay {
     historicSqlOperations = sessionManager.getOperationManager().getHistoricalSQLOperations();
     Assert.assertEquals(liveSqlOperations.size(), 0);
     Assert.assertEquals(historicSqlOperations.size(), 2);
-    verifyDDL(historicSqlOperations.get(0),"show databases", opHandle1.getHandleIdentifier().toString(),
true);
-    verifyDDL(historicSqlOperations.get(1),"show tables", opHandle2.getHandleIdentifier().toString(),
true);
+    verifyDDL(historicSqlOperations.get(1),"show databases", opHandle1.getHandleIdentifier().toString(),
true);
+    verifyDDL(historicSqlOperations.get(0),"show tables", opHandle2.getHandleIdentifier().toString(),
true);
 
     session.close();
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/4b6ac735/service/src/java/org/apache/hive/service/cli/operation/OperationManager.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/operation/OperationManager.java
b/service/src/java/org/apache/hive/service/cli/operation/OperationManager.java
index fb328d7..dab8ba1 100644
--- a/service/src/java/org/apache/hive/service/cli/operation/OperationManager.java
+++ b/service/src/java/org/apache/hive/service/cli/operation/OperationManager.java
@@ -383,13 +383,14 @@ public class OperationManager extends AbstractService {
 
   /**
    * @return displays representing a number of historical SQLOperations, at max number of
-   * hive.server2.webui.max.historic.queries
+   * hive.server2.webui.max.historic.queries. Newest items will be first.
    */
   public List<SQLOperationDisplay> getHistoricalSQLOperations() {
     List<SQLOperationDisplay> result = new LinkedList<>();
     synchronized (webuiLock) {
       if (historicSqlOperations != null) {
         result.addAll(historicSqlOperations.values());
+        Collections.reverse(result);
       }
     }
     return result;


Mime
View raw message