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/11/19 17:32:59 UTC
[1/2] ignite git commit: Added benchmark:
IgniteSqlQueryPutSeparatedBenchmark
Repository: ignite
Updated Branches:
refs/heads/ignite-1.5 f708c1a4d -> c85d1f5fe
Added benchmark: IgniteSqlQueryPutSeparatedBenchmark
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96483be6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96483be6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96483be6
Branch: refs/heads/ignite-1.5
Commit: 96483be6543e223282eaf8d5c8dbabbab1715baf
Parents: 4c9ea58
Author: ashutak <as...@gridgain.com>
Authored: Thu Nov 19 19:31:28 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Thu Nov 19 19:31:28 2015 +0300
----------------------------------------------------------------------
.../config/benchmark-multicast.properties | 6 +-
.../benchmark-query-put-separated.properties | 88 ++++++++++++++++++++
.../IgniteSqlQueryPutSeparatedBenchmark.java | 84 +++++++++++++++++++
3 files changed, 175 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/96483be6/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 85f6c11..03cfddb 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -113,7 +113,7 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-putAll-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllSerializableTxBenchmark -sn IgniteNode -ds ${ver}tx-putAllSerializable-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-optimistic-getAllPutAll-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc PESSIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-pessimistic-getAllPutAll-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -txi SERIALIZABLE -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds tx-opt-serializable-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-optimistic-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc PESSIMISTIC -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-pessimistic-getAllPutAll-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -txc OPTIMISTIC -txi SERIALIZABLE -dn IgniteGetAllPutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-opt-serializable-getAllPutAll-1-backup,\
"
http://git-wip-us.apache.org/repos/asf/ignite/blob/96483be6/modules/yardstick/config/benchmark-query-put-separated.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query-put-separated.properties b/modules/yardstick/config/benchmark-query-put-separated.properties
new file mode 100644
index 0000000..b1b2942
--- /dev/null
+++ b/modules/yardstick/config/benchmark-query-put-separated.properties
@@ -0,0 +1,88 @@
+# 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.
+
+#
+# Contains all multicast benchmarks
+#
+
+now0=`date +'%H%M%S'`
+
+# JVM options.
+JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
+
+# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.
+JVM_OPTS=${JVM_OPTS}" \
+-Xloggc:./gc${now0}.log \
+-XX:+PrintGCDetails \
+-verbose:gc \
+-XX:+UseParNewGC \
+-XX:+UseConcMarkSweepGC \
+-XX:+UseTLAB \
+-XX:NewSize=128m \
+-XX:MaxNewSize=128m \
+-XX:MaxTenuringThreshold=0 \
+-XX:SurvivorRatio=1024 \
+-XX:+UseCMSInitiatingOccupancyOnly \
+-XX:CMSInitiatingOccupancyFraction=60 \
+"
+
+#Ignite version
+ver="RELEASE-"
+
+# List of default probes.
+# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
+
+# Packages where the specified benchmark is searched by reflection mechanism.
+BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+
+# Restart servers for each benchmark.
+RESTART_SERVERS=true
+
+# Probe point writer class name.
+# BENCHMARK_WRITER=
+
+# Comma-separated list of the hosts to run BenchmarkServers on.
+SERVER_HOSTS=localhost,localhost,localhost
+
+# Comma-separated list of the hosts to run BenchmarkDrivers on.
+DRIVER_HOSTS=localhost,localhost
+
+# Remote username.
+# REMOTE_USER=
+
+# Number of nodes, used to wait for the specified number of nodes to start.
+nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
+
+# Backups count.
+b=1
+
+# Warmup.
+w=10
+
+# Duration.
+d=30
+
+# Threads count.
+t=64
+
+# Sync mode.
+sm=PRIMARY_SYNC
+
+# Run configuration which contains all benchmarks.
+# Note that each benchmark is set to run for 300 seconds (5 mins) with warm-up set to 60 seconds (1 minute).
+CONFIGS="\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w ${w} -d ${d} -t ${t} -sm PRIMARY_SYNC -dn IgniteSqlQueryPutSeparatedBenchmark -sn IgniteNode -ds query-put-1b,\
+"
http://git-wip-us.apache.org/repos/asf/ignite/blob/96483be6/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutSeparatedBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutSeparatedBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutSeparatedBenchmark.java
new file mode 100644
index 0000000..b74978e
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutSeparatedBenchmark.java
@@ -0,0 +1,84 @@
+/*
+ * 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.yardstick.cache;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ThreadLocalRandom;
+import javax.cache.Cache;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.yardstick.cache.model.Person;
+import org.yardstickframework.BenchmarkConfiguration;
+
+/**
+ * Ignite benchmark that performs put and query operations.
+ */
+public class IgniteSqlQueryPutSeparatedBenchmark extends IgniteCacheAbstractBenchmark<Integer, Object> {
+ /** {@inheritDoc} */
+ @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
+ super.setUp(cfg);
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+ if (cfg.memberId() % 2 == 0) {
+ double salary = rnd.nextDouble() * args.range() * 1000;
+
+ double maxSalary = salary + 1000;
+
+ Collection<Cache.Entry<Integer, Object>> entries = executeQuery(salary, maxSalary);
+
+ for (Cache.Entry<Integer, Object> entry : entries) {
+ Person p = (Person)entry.getValue();
+
+ if (p.getSalary() < salary || p.getSalary() > maxSalary)
+ throw new Exception("Invalid person retrieved [min=" + salary + ", max=" + maxSalary +
+ ", person=" + p + ']');
+ }
+ }
+ else {
+ int i = rnd.nextInt(args.range());
+
+ cache.put(i, new Person(i, "firstName" + i, "lastName" + i, i * 1000));
+ }
+
+ return true;
+ }
+
+ /**
+ * @param minSalary Min salary.
+ * @param maxSalary Max salary.
+ * @return Query result.
+ * @throws Exception If failed.
+ */
+ private Collection<Cache.Entry<Integer, Object>> executeQuery(double minSalary, double maxSalary) throws Exception {
+ SqlQuery qry = new SqlQuery(Person.class, "salary >= ? and salary <= ?");
+
+ qry.setArgs(minSalary, maxSalary);
+
+ return cache.query(qry).getAll();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("query");
+ }
+}
[2/2] ignite git commit: Merge remote-tracking branch
'apache/ignite-1.5' into ignite-1.5
Posted by sb...@apache.org.
Merge remote-tracking branch 'apache/ignite-1.5' into ignite-1.5
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c85d1f5f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c85d1f5f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c85d1f5f
Branch: refs/heads/ignite-1.5
Commit: c85d1f5fed821d0fa5e354d19d7da3fd7f9ac87c
Parents: 96483be f708c1a
Author: ashutak <as...@gridgain.com>
Authored: Thu Nov 19 19:32:31 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Thu Nov 19 19:32:31 2015 +0300
----------------------------------------------------------------------
modules/camel/README.txt | 34 +
modules/camel/licenses/apache-2.0.txt | 202 ++++++
modules/camel/pom.xml | 102 +++
.../ignite/stream/camel/CamelStreamer.java | 237 +++++++
.../stream/camel/IgniteCamelStreamerTest.java | 420 +++++++++++
.../camel/IgniteCamelStreamerTestSuite.java | 48 ++
.../src/test/resources/camel.test.properties | 18 +
.../ignite/codegen/MessageCodeGenerator.java | 11 +-
.../java/org/apache/ignite/IgniteCache.java | 3 +-
.../java/org/apache/ignite/IgniteCompute.java | 3 +-
.../org/apache/ignite/compute/ComputeJob.java | 2 +-
.../ignite/internal/GridUpdateNotifier.java | 2 +-
.../communication/GridIoMessageFactory.java | 18 +
.../discovery/GridDiscoveryManager.java | 2 +-
.../processors/cache/GridCacheAdapter.java | 103 ++-
.../processors/cache/GridCacheAtomicFuture.java | 6 +
.../cache/GridCacheDeploymentManager.java | 2 +-
.../processors/cache/GridCacheFuture.java | 13 -
.../processors/cache/GridCacheGateway.java | 1 -
.../processors/cache/GridCacheIoManager.java | 50 +-
.../processors/cache/GridCacheMessage.java | 20 +-
.../processors/cache/GridCacheMvcc.java | 7 -
.../processors/cache/GridCacheMvccFuture.java | 7 +
.../processors/cache/GridCacheMvccManager.java | 150 ++--
.../GridCachePartitionExchangeManager.java | 55 +-
.../cache/GridCacheSharedContext.java | 7 +-
.../processors/cache/IgniteCacheProxy.java | 3 +
.../distributed/GridCacheTxRecoveryFuture.java | 54 +-
.../distributed/GridDistributedBaseMessage.java | 56 --
.../distributed/GridDistributedLockRequest.java | 6 -
.../GridDistributedLockResponse.java | 32 +-
.../GridDistributedTxPrepareRequest.java | 67 +-
.../dht/CacheDistributedGetFutureAdapter.java | 27 +-
.../cache/distributed/dht/CacheGetFuture.java | 32 +
.../distributed/dht/GridDhtCacheAdapter.java | 141 ++++
.../distributed/dht/GridDhtLockFuture.java | 79 ++-
.../distributed/dht/GridDhtLockRequest.java | 2 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 24 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 4 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 9 +
.../distributed/dht/GridDhtTxPrepareFuture.java | 77 +-
.../dht/GridDhtTxPrepareRequest.java | 54 +-
.../dht/GridPartitionedGetFuture.java | 69 +-
.../dht/GridPartitionedSingleGetFuture.java | 697 +++++++++++++++++++
.../dht/atomic/GridDhtAtomicCache.java | 127 +++-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 84 +--
.../dht/atomic/GridDhtAtomicUpdateRequest.java | 11 +
.../dht/atomic/GridNearAtomicUpdateFuture.java | 5 -
.../dht/colocated/GridDhtColocatedCache.java | 162 ++++-
.../colocated/GridDhtColocatedLockFuture.java | 81 ++-
.../distributed/near/CacheVersionedValue.java | 2 +-
.../distributed/near/GridNearCacheAdapter.java | 4 +-
.../distributed/near/GridNearGetFuture.java | 57 +-
.../distributed/near/GridNearGetRequest.java | 1 -
.../distributed/near/GridNearGetResponse.java | 2 -
.../distributed/near/GridNearLockFuture.java | 72 +-
.../distributed/near/GridNearLockRequest.java | 4 +-
...arOptimisticSerializableTxPrepareFuture.java | 108 +--
.../near/GridNearOptimisticTxPrepareFuture.java | 69 +-
.../GridNearPessimisticTxPrepareFuture.java | 58 +-
.../near/GridNearSingleGetRequest.java | 396 +++++++++++
.../near/GridNearSingleGetResponse.java | 321 +++++++++
.../near/GridNearTransactionalCache.java | 9 +-
.../near/GridNearTxFinishFuture.java | 42 +-
.../cache/distributed/near/GridNearTxLocal.java | 164 +++--
.../near/GridNearTxPrepareFutureAdapter.java | 20 +-
.../near/GridNearTxPrepareRequest.java | 52 +-
.../processors/cache/local/GridLocalCache.java | 4 +-
.../cache/local/GridLocalLockFuture.java | 5 -
.../cache/transactions/IgniteInternalTx.java | 1 +
.../cache/transactions/IgniteTxAdapter.java | 1 +
.../cache/transactions/IgniteTxEntry.java | 9 +-
.../cache/transactions/IgniteTxHandler.java | 19 +-
.../IgniteTxImplicitSingleStateImpl.java | 7 +
.../transactions/IgniteTxLocalAdapter.java | 14 +-
.../cache/transactions/IgniteTxManager.java | 3 +-
.../IgniteTxRemoteStateAdapter.java | 5 +
.../cache/transactions/IgniteTxState.java | 6 +
.../cache/transactions/IgniteTxStateImpl.java | 69 +-
.../clock/GridClockSyncProcessor.java | 28 +-
.../internal/util/UUIDCollectionMessage.java | 114 +++
.../util/future/GridCompoundFuture.java | 15 +-
.../ignite/internal/util/lang/GridFunc.java | 8 +-
.../ignite/internal/util/nio/GridNioServer.java | 13 +-
.../ignite/marshaller/MarshallerExclusions.java | 4 +-
.../org/apache/ignite/stream/StreamAdapter.java | 19 +-
.../IgniteClientReconnectCacheTest.java | 11 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 75 ++
.../GridCacheConcurrentTxMultiNodeTest.java | 15 -
.../cache/GridCachePartitionedGetSelfTest.java | 3 +-
.../IgniteCacheAbstractStopBusySelfTest.java | 27 +-
.../IgniteCacheP2pUnmarshallingErrorTest.java | 184 +++--
.../CacheGetFutureHangsSelfTest.java | 6 +
.../GridCacheAbstractNodeRestartSelfTest.java | 2 +
.../IgniteCacheSingleGetMessageTest.java | 357 ++++++++++
.../GridCacheReplicatedMetricsSelfTest.java | 9 -
.../IgniteCacheTxStoreSessionTest.java | 2 +-
.../testsuites/IgniteCacheTestSuite3.java | 2 +
.../testsuites/IgniteCacheTestSuite4.java | 3 +
modules/flume/README.md | 40 --
modules/flume/README.txt | 72 ++
modules/flume/licenses/apache-2.0.txt | 202 ++++++
modules/twitter/README.txt | 32 +
modules/twitter/licenses/apache-2.0.txt | 202 ++++++
modules/twitter/pom.xml | 122 ++++
.../ignite/stream/twitter/OAuthSettings.java | 86 +++
.../ignite/stream/twitter/TwitterStreamer.java | 295 ++++++++
.../twitter/IgniteTwitterStreamerTest.java | 234 +++++++
.../twitter/IgniteTwitterStreamerTestSuite.java | 32 +
.../stream/twitter/TwitterStreamerImpl.java | 79 +++
pom.xml | 2 +
112 files changed, 6152 insertions(+), 1107 deletions(-)
----------------------------------------------------------------------