You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/08/26 09:45:32 UTC
[1/2] ignite git commit: Added test.
Repository: ignite
Updated Branches:
refs/heads/master 203f00c77 -> 76bc7d613
Added test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/194df76c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/194df76c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/194df76c
Branch: refs/heads/master
Commit: 194df76cbed6e0799f01819851bedabc00d39fab
Parents: c47a706
Author: sboikov <sb...@gridgain.com>
Authored: Wed Aug 26 10:44:49 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Aug 26 10:44:49 2015 +0300
----------------------------------------------------------------------
.../IgniteCacheManyAsyncOperationsTest.java | 107 +++++++++++++++++++
1 file changed, 107 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/194df76c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java
new file mode 100644
index 0000000..ab4f1b8
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheManyAsyncOperationsTest.java
@@ -0,0 +1,107 @@
+/*
+ * 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.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.lang.*;
+
+import java.util.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheManyAsyncOperationsTest extends IgniteCacheAbstractTest {
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 2;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return PARTITIONED;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected CacheAtomicityMode atomicityMode() {
+ return TRANSACTIONAL;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected NearCacheConfiguration nearConfiguration() {
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ if (gridName.equals(getTestGridName(2)))
+ cfg.setClientMode(true);
+
+ return cfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testManyAsyncOperations() throws Exception {
+ try (Ignite client = startGrid(gridCount())) {
+ assertTrue(client.configuration().isClientMode());
+
+ IgniteCache<Object, Object> cache = client.cache(null).withAsync();
+
+ final int ASYNC_OPS = cache.getConfiguration(CacheConfiguration.class).getMaxConcurrentAsyncOperations();
+
+ log.info("Number of async operations: " + ASYNC_OPS);
+
+ Map<Integer, byte[]> map = new HashMap<>();
+
+ for (int i = 0; i < 500; i++)
+ map.put(i, new byte[128]);
+
+ for (int iter = 0; iter < 3; iter++) {
+ log.info("Iteration: " + iter);
+
+ List<IgniteFuture<?>> futs = new ArrayList<>(ASYNC_OPS);
+
+ for (int i = 0; i < ASYNC_OPS; i++) {
+ cache.putAll(map);
+
+ futs.add(cache.future());
+
+ if (i % 50 == 0)
+ log.info("Created futures: " + (i + 1));
+ }
+
+ for (int i = 0; i < ASYNC_OPS; i++) {
+ IgniteFuture<?> fut = futs.get(i);
+
+ fut.get();
+
+ if (i % 50 == 0)
+ log.info("Done: " + (i + 1));
+ }
+ }
+ }
+ }
+}
[2/2] ignite git commit: Merge remote-tracking branch 'origin/master'
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/76bc7d61
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/76bc7d61
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/76bc7d61
Branch: refs/heads/master
Commit: 76bc7d61352f68c3e1fe83652a747f234adcd0c1
Parents: 194df76 203f00c
Author: sboikov <sb...@gridgain.com>
Authored: Wed Aug 26 10:45:25 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Aug 26 10:45:25 2015 +0300
----------------------------------------------------------------------
.../internal/platform/PlatformBootstrap.java | 36 -
.../platform/PlatformBootstrapFactory.java | 37 -
.../internal/platform/PlatformException.java | 71 --
.../internal/platform/PlatformIgnition.java | 187 ----
.../platform/PlatformNoCallbackException.java | 50 --
.../callback/PlatformCallbackGateway.java | 869 -------------------
.../callback/PlatformCallbackUtils.java | 468 ----------
.../platform/memory/PlatformAbstractMemory.java | 121 ---
.../PlatformBigEndianInputStreamImpl.java | 126 ---
.../PlatformBigEndianOutputStreamImpl.java | 162 ----
.../platform/memory/PlatformExternalMemory.java | 55 --
.../platform/memory/PlatformInputStream.java | 30 -
.../memory/PlatformInputStreamImpl.java | 323 -------
.../platform/memory/PlatformMemory.java | 77 --
.../platform/memory/PlatformMemoryManager.java | 46 -
.../memory/PlatformMemoryManagerImpl.java | 83 --
.../platform/memory/PlatformMemoryPool.java | 133 ---
.../platform/memory/PlatformMemoryUtils.java | 468 ----------
.../platform/memory/PlatformOutputStream.java | 30 -
.../memory/PlatformOutputStreamImpl.java | 259 ------
.../platform/memory/PlatformPooledMemory.java | 63 --
.../platform/memory/PlatformUnpooledMemory.java | 51 --
.../platform/utils/PlatformReaderBiClosure.java | 34 -
.../platform/utils/PlatformReaderClosure.java | 34 -
.../platform/utils/PlatformWriterBiClosure.java | 34 -
.../platform/utils/PlatformWriterClosure.java | 33 -
.../platform/PlatformAbstractBootstrap.java | 47 +
.../processors/platform/PlatformBootstrap.java | 36 +
.../platform/PlatformBootstrapFactory.java | 37 +
.../processors/platform/PlatformException.java | 71 ++
.../processors/platform/PlatformIgnition.java | 186 ++++
.../platform/PlatformNoCallbackException.java | 50 ++
.../callback/PlatformCallbackGateway.java | 869 +++++++++++++++++++
.../callback/PlatformCallbackUtils.java | 468 ++++++++++
.../platform/memory/PlatformAbstractMemory.java | 121 +++
.../PlatformBigEndianInputStreamImpl.java | 126 +++
.../PlatformBigEndianOutputStreamImpl.java | 162 ++++
.../platform/memory/PlatformExternalMemory.java | 55 ++
.../platform/memory/PlatformInputStream.java | 30 +
.../memory/PlatformInputStreamImpl.java | 323 +++++++
.../platform/memory/PlatformMemory.java | 77 ++
.../platform/memory/PlatformMemoryManager.java | 46 +
.../memory/PlatformMemoryManagerImpl.java | 83 ++
.../platform/memory/PlatformMemoryPool.java | 133 +++
.../platform/memory/PlatformMemoryUtils.java | 468 ++++++++++
.../platform/memory/PlatformOutputStream.java | 30 +
.../memory/PlatformOutputStreamImpl.java | 259 ++++++
.../platform/memory/PlatformPooledMemory.java | 63 ++
.../platform/memory/PlatformUnpooledMemory.java | 51 ++
.../platform/utils/PlatformReaderBiClosure.java | 34 +
.../platform/utils/PlatformReaderClosure.java | 34 +
.../platform/utils/PlatformWriterBiClosure.java | 34 +
.../platform/utils/PlatformWriterClosure.java | 33 +
53 files changed, 3926 insertions(+), 3880 deletions(-)
----------------------------------------------------------------------