You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/08/15 09:30:40 UTC
[2/4] ignite git commit: IGNITE-826: Removed
HadoopHashMapSelfTest.testAllocation() as it tested nothing.
IGNITE-826: Removed HadoopHashMapSelfTest.testAllocation() as it tested nothing.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/78aa065b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/78aa065b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/78aa065b
Branch: refs/heads/ignite-gg-11416
Commit: 78aa065b4c7b05381b1fa31159b74969ec4a2bfe
Parents: 89bce0f
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jul 21 13:15:35 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Aug 15 12:29:52 2016 +0300
----------------------------------------------------------------------
.../collections/HadoopHashMapSelfTest.java | 56 ++------------------
1 file changed, 5 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/78aa065b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/shuffle/collections/HadoopHashMapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/shuffle/collections/HadoopHashMapSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/shuffle/collections/HadoopHashMapSelfTest.java
index 2e1f66e..c0f8325 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/shuffle/collections/HadoopHashMapSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/shuffle/collections/HadoopHashMapSelfTest.java
@@ -36,60 +36,14 @@ import org.apache.ignite.internal.util.typedef.X;
*
*/
public class HadoopHashMapSelfTest extends HadoopAbstractMapTest {
-
- public void testAllocation() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-826");
-
- final GridUnsafeMemory mem = new GridUnsafeMemory(0);
-
- long size = 3L * 1024 * 1024 * 1024;
-
- final long chunk = 16;// * 1024;
-
- final int page = 4 * 1024;
-
- final int writes = chunk < page ? 1 : (int)(chunk / page);
-
- final long cnt = size / chunk;
-
- assert cnt < Integer.MAX_VALUE;
-
- final int threads = 4;
-
- long start = System.currentTimeMillis();
-
- multithreaded(new Callable<Object>() {
- @Override public Object call() throws Exception {
- int cnt0 = (int)(cnt / threads);
-
- for (int i = 0; i < cnt0; i++) {
- long ptr = mem.allocate(chunk);
-
- for (int j = 0; j < writes; j++)
- mem.writeInt(ptr + j * page, 100500);
- }
-
- return null;
- }
- }, threads);
-
- X.println("End: " + (System.currentTimeMillis() - start) + " mem: " + mem.allocatedSize() + " cnt: " + cnt);
-
- Thread.sleep(30000);
- }
-
-
- /** */
+ /**
+ * Test simple map.
+ *
+ * @throws Exception If failed.
+ */
public void testMapSimple() throws Exception {
GridUnsafeMemory mem = new GridUnsafeMemory(0);
-// mem.listen(new GridOffHeapEventListener() {
-// @Override public void onEvent(GridOffHeapEvent evt) {
-// if (evt == GridOffHeapEvent.ALLOCATE)
-// U.dumpStack();
-// }
-// });
-
Random rnd = new Random();
int mapSize = 16 << rnd.nextInt(3);