You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2015/09/22 01:03:18 UTC

[6/8] hive git commit: HIVE-11889: Add unit test for HIVE-11449 (Wei Zheng via Jason Dere)

HIVE-11889: Add unit test for HIVE-11449 (Wei Zheng via Jason Dere)


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

Branch: refs/heads/llap
Commit: 4ff5b258c93a1996f320cab19c58465a2aab38bc
Parents: 262bae6
Author: Jason Dere <jd...@hortonworks.com>
Authored: Mon Sep 21 10:45:37 2015 -0700
Committer: Jason Dere <jd...@hortonworks.com>
Committed: Mon Sep 21 10:45:37 2015 -0700

----------------------------------------------------------------------
 .../persistence/TestBytesBytesMultiHashMap.java |  3 ++
 .../ql/exec/persistence/TestHashPartition.java  | 29 ++++++++++++++++++++
 2 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/4ff5b258/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java b/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java
index c417b6f..aed9214 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java
@@ -43,6 +43,9 @@ public class TestBytesBytesMultiHashMap {
     assertEquals(CAPACITY, map.getCapacity());
     map = new BytesBytesMultiHashMap(9, LOAD_FACTOR, WB_SIZE);
     assertEquals(16, map.getCapacity());
+
+    // Verify the scenario when maxProbeSize is a very small value, it doesn't fail
+    BytesBytesMultiHashMap map1 = new BytesBytesMultiHashMap(1024, (float) 0.75, 524288, 1);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/hive/blob/4ff5b258/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestHashPartition.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestHashPartition.java b/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestHashPartition.java
new file mode 100644
index 0000000..a6e52bd
--- /dev/null
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestHashPartition.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.exec.persistence;
+
+import org.apache.hadoop.hive.ql.exec.persistence.HybridHashTableContainer.HashPartition;
+import org.junit.Test;
+
+public class TestHashPartition {
+
+  @Test
+  public void testHashPartition() throws Exception {
+    HashPartition hashPartition = new HashPartition(1024, (float) 0.75, 524288, 1, true);
+  }
+}