You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by we...@apache.org on 2017/05/24 23:51:43 UTC

[09/54] [abbrv] hive git commit: HIVE-16697 Schema table validator should return a sorted list of missing tables (Naveen Gangam, reviewed by Aihua Xu)

HIVE-16697 Schema table validator should return a sorted list of missing tables (Naveen Gangam, reviewed by Aihua Xu)


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

Branch: refs/heads/hive-14535
Commit: 497f119163643d9ecd39faa3d414ee25cb013a41
Parents: ed3c3ed
Author: Naveen Gangam <ng...@apache.org>
Authored: Thu May 18 10:08:02 2017 -0400
Committer: Naveen Gangam <ng...@apache.org>
Committed: Thu May 18 10:08:02 2017 -0400

----------------------------------------------------------------------
 beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/497f1191/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
index 86faeb0..a453580 100644
--- a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
+++ b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
@@ -60,6 +60,7 @@ import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
@@ -800,6 +801,7 @@ public class HiveSchemaTool {
     // now diff the lists
     schemaTables.removeAll(dbTables);
     if (schemaTables.size() > 0) {
+      Collections.sort(schemaTables);
       System.err.println("Table(s) [ " + Arrays.toString(schemaTables.toArray())
           + " ] are missing from the metastore database schema.");
       System.out.println("Schema table validation failed!!!");