hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject hive git commit: HIVE-11889: Add unit test for HIVE-11449 (Wei Zheng via Jason Dere)
Date Mon, 21 Sep 2015 18:10:41 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 8203921a8 -> 0d1a45c22


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/0d1a45c2
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/0d1a45c2
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/0d1a45c2

Branch: refs/heads/branch-1
Commit: 0d1a45c2249fe2d270e76d290da21bf430fde8d2
Parents: 8203921
Author: Jason Dere <jdere@hortonworks.com>
Authored: Mon Sep 21 11:10:15 2015 -0700
Committer: Jason Dere <jdere@hortonworks.com>
Committed: Mon Sep 21 11:10:15 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/0d1a45c2/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/0d1a45c2/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);
+  }
+}


Mime
View raw message