impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ab...@apache.org
Subject [1/3] incubator-impala git commit: Remove superfluous Hive Metastore integration test.
Date Sat, 10 Sep 2016 04:43:34 GMT
Repository: incubator-impala
Updated Branches:
  refs/heads/master 37a2ba255 -> 218019e59


Remove superfluous Hive Metastore integration test.

Removes the test test_impala_sees_hive_tables_and_dbs
in test_metadata_query_statements.py

The same scenarios are covered in test_hms_integration.py

Change-Id: I5706c375a490ee9e8ea095458ca208a116687277
Reviewed-on: http://gerrit.cloudera.org:8080/4334
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/d153d181
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/d153d181
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/d153d181

Branch: refs/heads/master
Commit: d153d181661e47cb9deffabaf356b7fcc2e77cb5
Parents: 37a2ba2
Author: Alex Behm <alex.behm@cloudera.com>
Authored: Wed Sep 7 22:47:23 2016 -0700
Committer: Internal Jenkins <cloudera-hudson@gerrit.cloudera.org>
Committed: Fri Sep 9 23:07:35 2016 +0000

----------------------------------------------------------------------
 .../metadata/test_metadata_query_statements.py  | 131 -------------------
 1 file changed, 131 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d153d181/tests/metadata/test_metadata_query_statements.py
----------------------------------------------------------------------
diff --git a/tests/metadata/test_metadata_query_statements.py b/tests/metadata/test_metadata_query_statements.py
index 12aa2be..7b2f72f 100644
--- a/tests/metadata/test_metadata_query_statements.py
+++ b/tests/metadata/test_metadata_query_statements.py
@@ -151,134 +151,3 @@ class TestMetadataQueryStatements(ImpalaTestSuite):
     self.cleanup_db('impala_test_desc_db2')
     self.cleanup_db('impala_test_desc_db3')
     self.cleanup_db('impala_test_desc_db4')
-
-  # Missing Coverage: ddl by hive being visible to Impala for data not residing in hdfs.
-  @SkipIfIsilon.hive
-  @SkipIfS3.hive
-  @SkipIfLocal.hive
-  @pytest.mark.execute_serially # because of invalidate metadata
-  def test_impala_sees_hive_tables_and_dbs(self, vector):
-    self.client.set_configuration(vector.get_value('exec_option'))
-    DB_NAME = 'hive_test_db'
-    TBL_NAME = 'testtbl'
-    self.cleanup_db(DB_NAME)
-    try:
-      self.__run_test_impala_sees_hive_tables_and_dbs(DB_NAME, TBL_NAME)
-    finally:
-      self.cleanup_db(DB_NAME)
-
-  def __run_test_impala_sees_hive_tables_and_dbs(self, db_name, tbl_name):
-    assert db_name not in self.all_db_names()
-
-    self.run_stmt_in_hive("create database %s" % db_name)
-
-    # Run 'invalidate metadata <table name>' when the parent database does not exist.
-    try:
-      self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name))
-      assert 0, 'Expected to fail'
-    except ImpalaBeeswaxException as e:
-      assert "TableNotFoundException: Table not found: %s.%s"\
-          % (db_name, tbl_name) in str(e)
-
-    assert db_name not in self.all_db_names()
-
-    # Create a table external to Impala.
-    self.run_stmt_in_hive("create table %s.%s (i int)" % (db_name, tbl_name))
-
-    # Impala does not know about this database or table.
-    assert db_name not in self.all_db_names()
-
-    # Run 'invalidate metadata <table name>'. It should add the database and table
-    # in to Impala's catalog.
-    self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name))
-    assert db_name in self.all_db_names()
-
-    result = self.client.execute("show tables in %s" % db_name)
-    assert tbl_name in result.data
-    assert len(result.data) == 1
-
-    self.client.execute("create table %s.%s (j int)" % (db_name, tbl_name + "_test"))
-    self.run_stmt_in_hive("drop table %s.%s" % (db_name, tbl_name + "_test"))
-
-    # Re-create the table in Hive. Use the same name, but different casing.
-    self.run_stmt_in_hive("create table %s.%s (i bigint)" % (db_name, tbl_name + "_TEST"))
-    self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name + "_Test"))
-    result = self.client.execute("show tables in %s" % db_name)
-    assert tbl_name + "_test" in result.data
-    assert tbl_name + "_Test" not in result.data
-    assert tbl_name + "_TEST" not in result.data
-
-    # Verify this table is the version created in Hive (the column should be BIGINT)
-    result = self.client.execute("describe %s.%s" % (db_name, tbl_name + '_test'))
-    assert 'bigint' in result.data[0]
-
-    self.client.execute("drop table %s.%s" % (db_name, tbl_name + "_TEST"))
-
-    # Make sure we can actually use the table
-    self.client.execute(("insert overwrite table %s.%s "
-                        "select 1 from functional.alltypes limit 5"
-                         % (db_name, tbl_name)))
-    result = self.execute_scalar("select count(*) from %s.%s" % (db_name, tbl_name))
-    assert int(result) == 5
-
-    # Should be able to call invalidate metadata multiple times on the same table.
-    self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name))
-    self.client.execute("refresh %s.%s"  % (db_name, tbl_name))
-    result = self.client.execute("show tables in %s" % db_name)
-    assert tbl_name in result.data
-
-    # Can still use the table.
-    result = self.execute_scalar("select count(*) from %s.%s" % (db_name, tbl_name))
-    assert int(result) == 5
-
-    # Run 'invalidate metadata <table name>' when no table exists with that name.
-    try:
-      self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name + '2'))
-      assert 0, 'Expected to fail'
-    except ImpalaBeeswaxException as e:
-      assert "TableNotFoundException: Table not found: %s.%s"\
-          % (db_name, tbl_name + '2') in str(e)
-
-    result = self.client.execute("show tables in %s" % db_name);
-    assert len(result.data) == 1
-    assert tbl_name in result.data
-
-    # Create another table
-    self.run_stmt_in_hive("create table %s.%s (i int)" % (db_name, tbl_name + '2'))
-    self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name + '2'))
-    result = self.client.execute("show tables in %s" % db_name)
-    assert tbl_name + '2' in result.data
-    assert tbl_name in result.data
-
-    # Drop the table, and then verify invalidate metadata <table name> removes the
-    # table from the catalog.
-    self.run_stmt_in_hive("drop table %s.%s " % (db_name, tbl_name))
-    self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name))
-    result = self.client.execute("show tables in %s" % db_name)
-    assert tbl_name + '2' in result.data
-    assert tbl_name not in result.data
-
-    # Should be able to call invalidate multiple times on the same table when the table
-    # does not exist.
-    try:
-      self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name))
-      assert 0, 'Expected to fail'
-    except ImpalaBeeswaxException as e:
-      assert "TableNotFoundException: Table not found: %s.%s"\
-          % (db_name, tbl_name) in str(e)
-
-    result = self.client.execute("show tables in %s" % db_name)
-    assert tbl_name + '2' in result.data
-    assert tbl_name not in result.data
-
-    # Drop the parent database (this will drop all tables). Then invalidate the table
-    self.run_stmt_in_hive("drop database %s CASCADE" % db_name)
-    self.client.execute("invalidate metadata %s.%s"  % (db_name, tbl_name + '2'))
-    result = self.client.execute("show tables in %s" % db_name);
-    assert len(result.data) == 0
-
-    # Requires a refresh to see the dropped database
-    assert db_name in self.all_db_names()
-
-    self.client.execute("invalidate metadata")
-    assert db_name not in self.all_db_names()


Mime
View raw message