You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/04/17 16:06:05 UTC

svn commit: r1468917 - in /hive/trunk: metastore/src/test/org/apache/hadoop/hive/metastore/ ql/src/test/org/apache/hadoop/hive/ql/security/

Author: hashutosh
Date: Wed Apr 17 14:06:05 2013
New Revision: 1468917

URL: http://svn.apache.org/r1468917
Log:
HIVE-4280 : TestRetryingHMSHandler is failing on trunk. (Teddy Choi via Ashutosh Chauhan)

Modified:
    hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
    hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartition.java
    hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
    hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
    hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
    hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java?rev=1468917&r1=1468916&r2=1468917&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java Wed Apr 17 14:06:05 2013
@@ -60,7 +60,7 @@ public class TestHiveMetaStoreWithEnviro
   private Table table = new Table();
   private final Partition partition = new Partition();
 
-  private static final String dbName = "tmpdb";
+  private static final String dbName = "hive3252";
   private static final String tblName = "tmptbl";
   private static final String renamed = "tmptbl2";
 

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartition.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartition.java?rev=1468917&r1=1468916&r2=1468917&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartition.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMarkPartition.java Wed Apr 17 14:06:05 2013
@@ -62,36 +62,36 @@ public class TestMarkPartition extends T
   InvalidPartitionException, UnknownPartitionException, InterruptedException {
     HiveMetaStoreClient msc = new HiveMetaStoreClient(hiveConf, null);
     driver = new Driver(hiveConf);
-    driver.run("drop database if exists tmpdb cascade");
-    driver.run("create database tmpdb");
-    driver.run("use tmpdb");
+    driver.run("drop database if exists hive2215 cascade");
+    driver.run("create database hive2215");
+    driver.run("use hive2215");
     driver.run("drop table if exists tmptbl");
     driver.run("create table tmptbl (a string) partitioned by (b string)");
     driver.run("alter table tmptbl add partition (b='2011')");
     Map<String,String> kvs = new HashMap<String, String>();
     kvs.put("b", "'2011'");
-    msc.markPartitionForEvent("tmpdb", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
-    assert msc.isPartitionMarkedForEvent("tmpdb", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
+    msc.markPartitionForEvent("hive2215", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
+    assert msc.isPartitionMarkedForEvent("hive2215", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
     Thread.sleep(10000);
-    assert !msc.isPartitionMarkedForEvent("tmpdb", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
+    assert !msc.isPartitionMarkedForEvent("hive2215", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
 
     kvs.put("b", "'2012'");
-    assert !msc.isPartitionMarkedForEvent("tmpdb", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
+    assert !msc.isPartitionMarkedForEvent("hive2215", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
     try{
-      msc.markPartitionForEvent("tmpdb", "tmptbl2", kvs, PartitionEventType.LOAD_DONE);
+      msc.markPartitionForEvent("hive2215", "tmptbl2", kvs, PartitionEventType.LOAD_DONE);
       assert false;
     } catch(Exception e){
       assert e instanceof UnknownTableException;
     }
     try{
-      msc.isPartitionMarkedForEvent("tmpdb", "tmptbl2", kvs, PartitionEventType.LOAD_DONE);
+      msc.isPartitionMarkedForEvent("hive2215", "tmptbl2", kvs, PartitionEventType.LOAD_DONE);
       assert false;
     } catch(Exception e){
       assert e instanceof UnknownTableException;
     }
     kvs.put("a", "'2012'");
     try{
-      msc.isPartitionMarkedForEvent("tmpdb", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
+      msc.isPartitionMarkedForEvent("hive2215", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
       assert false;
     } catch(Exception e){
       assert e instanceof InvalidPartitionException;
@@ -100,7 +100,7 @@ public class TestMarkPartition extends T
 
   @Override
   protected void tearDown() throws Exception {
-    driver.run("drop database if exists tmpdb cascade");
+    driver.run("drop database if exists hive2215 cascade");
     super.tearDown();
   }
 

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java?rev=1468917&r1=1468916&r2=1468917&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java Wed Apr 17 14:06:05 2013
@@ -69,7 +69,7 @@ public class TestMetaStoreEndFunctionLis
     /* Objective here is to ensure that when exceptions are thrown in HiveMetaStore in API methods
      * they bubble up and are stored in the MetaStoreEndFunctionContext objects
      */
-    String dbName = "tmpdb";
+    String dbName = "hive3524";
     String tblName = "tmptbl";
     int listSize = 0;
 
@@ -109,7 +109,7 @@ public class TestMetaStoreEndFunctionLis
     assertEquals(context.getInputTableName(), tableName);
 
     try {
-      msc.getPartition("tmpdb", tblName, "b=2012");
+      msc.getPartition("hive3524", tblName, "b=2012");
     }
     catch (Exception e2) {
     }

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java?rev=1468917&r1=1468916&r2=1468917&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java Wed Apr 17 14:06:05 2013
@@ -65,7 +65,7 @@ public class TestMetaStoreEventListener 
   private HiveMetaStoreClient msc;
   private Driver driver;
 
-  private static final String dbName = "tmpdb";
+  private static final String dbName = "hive2038";
   private static final String tblName = "tmptbl";
   private static final String renamed = "tmptbl2";
 
@@ -217,7 +217,7 @@ public class TestMetaStoreEventListener 
 
     driver.run("alter table tmptbl add partition (b='2011')");
     listSize++;
-    Partition part = msc.getPartition("tmpdb", "tmptbl", "b=2011");
+    Partition part = msc.getPartition("hive2038", "tmptbl", "b=2011");
     assertEquals(notifyList.size(), listSize);
     assertEquals(preNotifyList.size(), listSize);
 
@@ -304,7 +304,7 @@ public class TestMetaStoreEventListener 
 
     Map<String,String> kvs = new HashMap<String, String>(1);
     kvs.put("b", "2011");
-    msc.markPartitionForEvent("tmpdb", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
+    msc.markPartitionForEvent("hive2038", "tmptbl", kvs, PartitionEventType.LOAD_DONE);
     listSize++;
     assertEquals(notifyList.size(), listSize);
     assertEquals(preNotifyList.size(), listSize);

Modified: hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java?rev=1468917&r1=1468916&r2=1468917&view=diff
==============================================================================
--- hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java (original)
+++ hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java Wed Apr 17 14:06:05 2013
@@ -68,7 +68,7 @@ public class TestRetryingHMSHandler exte
   // Create a database and a table in that database.  Because the AlternateFailurePreListener is
   // being used each attempt to create something should require two calls by the RetryingHMSHandler
   public void testRetryingHMSHandler() throws Exception {
-    String dbName = "tmpdb";
+    String dbName = "hive4159";
     String tblName = "tmptbl";
 
     Database db = new Database();

Modified: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java?rev=1468917&r1=1468916&r2=1468917&view=diff
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java (original)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java Wed Apr 17 14:06:05 2013
@@ -169,7 +169,7 @@ public class TestAuthorizationPreEventLi
   }
 
   public void testListener() throws Exception {
-    String dbName = "tmpdb";
+    String dbName = "hive3705";
     String tblName = "tmptbl";
     String renamed = "tmptbl2";
     int listSize = 0;
@@ -199,7 +199,7 @@ public class TestAuthorizationPreEventLi
 
     driver.run("alter table tmptbl add partition (b='2011')");
     listSize++;
-    Partition part = msc.getPartition("tmpdb", "tmptbl", "b=2011");
+    Partition part = msc.getPartition("hive3705", "tmptbl", "b=2011");
 
     Partition ptnFromEvent = (
         (org.apache.hadoop.hive.ql.metadata.Partition)