You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ai...@apache.org on 2016/12/20 17:08:32 UTC

hive git commit: HIVE-15425: Eliminate conflicting output from schematool's table validator. (Naveen Gangam, reviewed by Aihua Xu)

Repository: hive
Updated Branches:
  refs/heads/master 0c94b11b2 -> 714bb83cb


HIVE-15425: Eliminate conflicting output from schematool's table validator. (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/714bb83c
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/714bb83c
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/714bb83c

Branch: refs/heads/master
Commit: 714bb83cb33dece0c35d825c35683690a24dee94
Parents: 0c94b11
Author: Aihua Xu <ai...@apache.org>
Authored: Tue Dec 20 12:08:01 2016 -0500
Committer: Aihua Xu <ai...@apache.org>
Committed: Tue Dec 20 12:08:01 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/hive/blob/714bb83c/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 2172906..a981bce 100644
--- a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
+++ b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
@@ -688,14 +688,14 @@ public class HiveSchemaTool {
       return false;
     }
 
-    System.out.println("Expected (from schema definition) " + schemaTables.size() +
-        " tables, Found (from HMS metastore) " + dbTables.size() + " tables");
-
     // now diff the lists
+    int schemaSize = schemaTables.size();
     schemaTables.removeAll(dbTables);
     if (schemaTables.size() > 0) {
-      System.out.println(schemaTables.size() + " tables [ " + Arrays.toString(schemaTables.toArray())
-          + " ] are missing from the database schema.");
+      System.out.println("Found " + schemaSize + " tables in schema definition, " +
+          schemaTables.size() + " tables [ " + Arrays.toString(schemaTables.toArray())
+          + " ] are missing from the metastore database schema.");
+      System.out.println("Schema table validation failed!!!");
       return false;
     } else {
       System.out.println("Succeeded in schema table validation");