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/07/08 15:31:11 UTC
[01/50] incubator-ignite git commit: Merge branch 'ignite-1055' into
ignite-sprint-7
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-gg-10052 fe12ad37f -> 89be5f7de
Merge branch 'ignite-1055' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9f6a7f9b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9f6a7f9b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9f6a7f9b
Branch: refs/heads/ignite-gg-10052
Commit: 9f6a7f9bed05bd15807c534eb14d801bedd37970
Parents: 7828d19 251f0c8
Author: ashutak <as...@gridgain.com>
Authored: Fri Jul 3 17:52:00 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jul 3 17:52:00 2015 +0300
----------------------------------------------------------------------
bin/ignite.bat | 8 ++++++--
bin/ignite.sh | 6 +++++-
bin/include/parseargs.bat | 1 +
bin/include/parseargs.sh | 3 +++
.../apache/ignite/startup/cmdline/CommandLineStartup.java | 3 ++-
.../ignite/startup/cmdline/CommandLineTransformer.java | 9 +++++++++
6 files changed, 26 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
[03/50] incubator-ignite git commit: ignite-428 Review fixes
Posted by sb...@apache.org.
ignite-428 Review fixes
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/63fce5a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/63fce5a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/63fce5a4
Branch: refs/heads/ignite-gg-10052
Commit: 63fce5a4920531ad8cd9afc47d829bb2fa4bc438
Parents: 2c41739
Author: agura <ag...@gridgain.com>
Authored: Thu Jun 25 22:18:00 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 19:39:12 2015 +0300
----------------------------------------------------------------------
modules/kafka/pom.xml | 18 +-
.../ignite/stream/kafka/KafkaStreamer.java | 121 ++++++---
.../stream/kafka/KafkaEmbeddedBroker.java | 251 ++++++++++---------
.../kafka/KafkaIgniteStreamerSelfTest.java | 131 +++++-----
.../ignite/stream/kafka/SimplePartitioner.java | 27 +-
5 files changed, 293 insertions(+), 255 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index 165ec1c..43909bc 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-kafka</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.6-SNAPSHOT</version>
<dependencies>
<dependency>
@@ -39,6 +39,7 @@
<artifactId>ignite-core</artifactId>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.10</artifactId>
@@ -66,6 +67,7 @@
</exclusion>
</exclusions>
</dependency>
+
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
@@ -73,12 +75,6 @@
</dependency>
<dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.4</version>
- </dependency>
-
- <dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-log4j</artifactId>
<version>${project.version}</version>
@@ -90,7 +86,6 @@
<version>4.2</version>
</dependency>
-
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
@@ -103,13 +98,6 @@
</dependency>
<dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.8.3</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-spring</artifactId>
<version>${project.version}</version>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
index e0240ce..e9ad0bd 100644
--- a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
@@ -30,16 +30,17 @@ import java.util.*;
import java.util.concurrent.*;
/**
- * Server that subscribes to topic messages from Kafka broker, streams its to key-value pairs into {@link
- * org.apache.ignite.IgniteDataStreamer} instance.
+ * Server that subscribes to topic messages from Kafka broker and streams its to key-value pairs into
+ * {@link IgniteDataStreamer} instance.
* <p>
- * Uses Kafka's High Level Consumer API to read messages from Kafka
+ * Uses Kafka's High Level Consumer API to read messages from Kafka.
*
* @see <a href="https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example">Consumer Consumer Group
* Example</a>
*/
-public class KafkaStreamer<T, K, V>
- extends StreamAdapter<T, K, V> {
+public class KafkaStreamer<T, K, V> extends StreamAdapter<T, K, V> {
+ /** Retry timeout. */
+ private static final long DFLT_RETRY_TIMEOUT = 10000;
/** Logger. */
private IgniteLogger log;
@@ -53,61 +54,78 @@ public class KafkaStreamer<T, K, V>
/** Number of threads to process kafka streams. */
private int threads;
- /** Kafka Consumer Config. */
- private ConsumerConfig consumerConfig;
+ /** Kafka consumer config. */
+ private ConsumerConfig consumerCfg;
- /** Key Decoder. */
+ /** Key decoder. */
private Decoder<K> keyDecoder;
- /** Value Decoder. */
- private Decoder<V> valueDecoder;
+ /** Value decoder. */
+ private Decoder<V> valDecoder;
- /** Kafka Consumer connector. */
+ /** Kafka consumer connector. */
private ConsumerConnector consumer;
+ /** Retry timeout. */
+ private long retryTimeout = DFLT_RETRY_TIMEOUT;
+
+ /** Stopped. */
+ private volatile boolean stopped;
+
/**
- * Sets the topic.
+ * Sets the topic name.
*
- * @param topic Topic Name.
+ * @param topic Topic name.
*/
- public void setTopic(final String topic) {
+ public void setTopic(String topic) {
this.topic = topic;
}
/**
* Sets the threads.
*
- * @param threads Number of Threads.
+ * @param threads Number of threads.
*/
- public void setThreads(final int threads) {
+ public void setThreads(int threads) {
this.threads = threads;
}
/**
* Sets the consumer config.
*
- * @param consumerConfig Consumer configuration.
+ * @param consumerCfg Consumer configuration.
*/
- public void setConsumerConfig(final ConsumerConfig consumerConfig) {
- this.consumerConfig = consumerConfig;
+ public void setConsumerConfig(ConsumerConfig consumerCfg) {
+ this.consumerCfg = consumerCfg;
}
/**
* Sets the key decoder.
*
- * @param keyDecoder Key Decoder.
+ * @param keyDecoder Key decoder.
*/
- public void setKeyDecoder(final Decoder<K> keyDecoder) {
+ public void setKeyDecoder(Decoder<K> keyDecoder) {
this.keyDecoder = keyDecoder;
}
/**
* Sets the value decoder.
*
- * @param valueDecoder Value Decoder
+ * @param valDecoder Value decoder.
*/
- public void setValueDecoder(final Decoder<V> valueDecoder) {
- this.valueDecoder = valueDecoder;
+ public void setValueDecoder(Decoder<V> valDecoder) {
+ this.valDecoder = valDecoder;
+ }
+
+ /**
+ * Sets the retry timeout.
+ *
+ * @param retryTimeout Retry timeout.
+ */
+ public void setRetryTimeout(long retryTimeout) {
+ A.ensure(retryTimeout > 0, "retryTimeout > 0");
+
+ this.retryTimeout = retryTimeout;
}
/**
@@ -120,35 +138,56 @@ public class KafkaStreamer<T, K, V>
A.notNull(getIgnite(), "ignite");
A.notNull(topic, "topic");
A.notNull(keyDecoder, "key decoder");
- A.notNull(valueDecoder, "value decoder");
- A.notNull(consumerConfig, "kafka consumer config");
+ A.notNull(valDecoder, "value decoder");
+ A.notNull(consumerCfg, "kafka consumer config");
A.ensure(threads > 0, "threads > 0");
log = getIgnite().log();
- consumer = kafka.consumer.Consumer.createJavaConsumerConnector(consumerConfig);
+ consumer = kafka.consumer.Consumer.createJavaConsumerConnector(consumerCfg);
+
+ Map<String, Integer> topicCntMap = new HashMap<>();
- Map<String, Integer> topicCountMap = new HashMap<>();
- topicCountMap.put(topic, threads);
+ topicCntMap.put(topic, threads);
- Map<String, List<KafkaStream<K, V>>> consumerMap = consumer.createMessageStreams(topicCountMap, keyDecoder,
- valueDecoder);
+ Map<String, List<KafkaStream<K, V>>> consumerMap =
+ consumer.createMessageStreams(topicCntMap, keyDecoder, valDecoder);
List<KafkaStream<K, V>> streams = consumerMap.get(topic);
// Now launch all the consumer threads.
executor = Executors.newFixedThreadPool(threads);
+ stopped = false;
+
// Now create an object to consume the messages.
- for (final KafkaStream<K,V> stream : streams) {
+ for (final KafkaStream<K, V> stream : streams) {
executor.submit(new Runnable() {
@Override public void run() {
-
- ConsumerIterator<K, V> it = stream.iterator();
-
- while (it.hasNext()) {
- final MessageAndMetadata<K, V> messageAndMetadata = it.next();
- getStreamer().addData(messageAndMetadata.key(), messageAndMetadata.message());
+ while (!stopped) {
+ try {
+ for (ConsumerIterator<K, V> it = stream.iterator(); it.hasNext() && !stopped; ) {
+ MessageAndMetadata<K, V> msg = it.next();
+
+ try {
+ getStreamer().addData(msg.key(), msg.message());
+ }
+ catch (Exception e) {
+ U.warn(log, "Message is ignored due to an error [msg=" + msg + ']', e);
+ }
+ }
+ }
+ catch (Exception e) {
+ U.warn(log, "Message can't be consumed from stream. Retry after " +
+ retryTimeout + " ms.", e);
+
+ try {
+ Thread.sleep(retryTimeout);
+ }
+ catch (InterruptedException ie) {
+ // No-op.
+ }
+ }
}
}
});
@@ -159,6 +198,8 @@ public class KafkaStreamer<T, K, V>
* Stops streamer.
*/
public void stop() {
+ stopped = true;
+
if (consumer != null)
consumer.shutdown();
@@ -168,11 +209,11 @@ public class KafkaStreamer<T, K, V>
try {
if (!executor.awaitTermination(5000, TimeUnit.MILLISECONDS))
if (log.isDebugEnabled())
- log.debug("Timed out waiting for consumer threads to shut down, exiting uncleanly");
+ log.debug("Timed out waiting for consumer threads to shut down, exiting uncleanly.");
}
catch (InterruptedException e) {
if (log.isDebugEnabled())
- log.debug("Interrupted during shutdown, exiting uncleanly");
+ log.debug("Interrupted during shutdown, exiting uncleanly.");
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
index 28533f7..98b9e4c 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
@@ -17,7 +17,6 @@
package org.apache.ignite.stream.kafka;
-import org.apache.commons.io.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.zookeeper.server.*;
@@ -25,6 +24,7 @@ import kafka.admin.*;
import kafka.api.*;
import kafka.api.Request;
import kafka.producer.*;
+import kafka.serializer.*;
import kafka.server.*;
import kafka.utils.*;
import org.I0Itec.zkclient.*;
@@ -39,106 +39,104 @@ import java.util.concurrent.*;
* Kafka Embedded Broker.
*/
public class KafkaEmbeddedBroker {
-
- /** Default ZooKeeper Host. */
+ /** Default ZooKeeper host. */
private static final String ZK_HOST = "localhost";
- /** Broker Port. */
+ /** Broker port. */
private static final int BROKER_PORT = 9092;
- /** ZooKeeper Connection Timeout. */
+ /** ZooKeeper connection timeout. */
private static final int ZK_CONNECTION_TIMEOUT = 6000;
- /** ZooKeeper Session Timeout. */
+ /** ZooKeeper session timeout. */
private static final int ZK_SESSION_TIMEOUT = 6000;
/** ZooKeeper port. */
private static int zkPort = 0;
- /** Is ZooKeeper Ready. */
+ /** Is ZooKeeper ready. */
private boolean zkReady;
- /** Kafka Config. */
- private KafkaConfig brokerConfig;
+ /** Kafka config. */
+ private KafkaConfig brokerCfg;
- /** Kafka Server. */
- private KafkaServer kafkaServer;
+ /** Kafka server. */
+ private KafkaServer kafkaSrv;
- /** ZooKeeper Client. */
+ /** ZooKeeper client. */
private ZkClient zkClient;
/** Embedded ZooKeeper. */
private EmbeddedZooKeeper zooKeeper;
/**
- * Creates an embedded Kafka Broker.
+ * Creates an embedded Kafka broker.
*/
public KafkaEmbeddedBroker() {
try {
setupEmbeddedZooKeeper();
+
setupEmbeddedKafkaServer();
}
catch (IOException | InterruptedException e) {
- throw new RuntimeException("failed to start Kafka Broker " + e);
+ throw new RuntimeException("Failed to start Kafka broker " + e);
}
-
}
/**
- * @return ZooKeeper Address.
+ * @return ZooKeeper address.
*/
public static String getZKAddress() {
- return ZK_HOST + ":" + zkPort;
+ return ZK_HOST + ':' + zkPort;
}
/**
* Creates a Topic.
*
- * @param topic topic name
- * @param partitions number of paritions for the topic
- * @param replicationFactor replication factor
- * @throws TimeoutException
- * @throws InterruptedException
+ * @param topic Topic name.
+ * @param partitions Number of partitions for the topic.
+ * @param replicationFactor Replication factor.
+ * @throws TimeoutException If operation is timed out.
+ * @throws InterruptedException If interrupted.
*/
- public void createTopic(String topic, final int partitions, final int replicationFactor)
+ public void createTopic(String topic, int partitions, int replicationFactor)
throws TimeoutException, InterruptedException {
AdminUtils.createTopic(zkClient, topic, partitions, replicationFactor, new Properties());
+
waitUntilMetadataIsPropagated(topic, 0, 10000, 100);
}
/**
- * Sends message to Kafka Broker.
+ * Sends message to Kafka broker.
*
- * @param keyedMessages List of Keyed Messages.
+ * @param keyedMessages List of keyed messages.
* @return Producer used to send the message.
*/
- public Producer sendMessages(List<KeyedMessage<String, String>> keyedMessages) {
+ public Producer<String, String> sendMessages(List<KeyedMessage<String, String>> keyedMessages) {
Producer<String, String> producer = new Producer<>(getProducerConfig());
+
producer.send(scala.collection.JavaConversions.asScalaBuffer(keyedMessages));
+
return producer;
}
/**
- * Shuts down Kafka Broker.
- *
- * @throws IOException
+ * Shuts down Kafka broker.
*/
- public void shutdown()
- throws IOException {
-
+ public void shutdown() {
zkReady = false;
- if (kafkaServer != null)
- kafkaServer.shutdown();
+ if (kafkaSrv != null)
+ kafkaSrv.shutdown();
- List<String> logDirs = scala.collection.JavaConversions.asJavaList(brokerConfig.logDirs());
+ List<String> logDirs = scala.collection.JavaConversions.asJavaList(brokerCfg.logDirs());
- for (String logDir : logDirs) {
- FileUtils.deleteDirectory(new File(logDir));
- }
+ for (String logDir : logDirs)
+ U.delete(new File(logDir));
if (zkClient != null) {
zkClient.close();
+
zkClient = null;
}
@@ -148,16 +146,15 @@ public class KafkaEmbeddedBroker {
zooKeeper.shutdown();
}
catch (IOException e) {
- // ignore
+ // No-op.
}
zooKeeper = null;
}
-
}
/**
- * @return the Zookeeper Client
+ * @return ZooKeeper client.
*/
private ZkClient getZkClient() {
A.ensure(zkReady, "Zookeeper not setup yet");
@@ -169,102 +166,105 @@ public class KafkaEmbeddedBroker {
/**
* Checks if topic metadata is propagated.
*
- * @param topic topic name
- * @param partition partition
- * @return true if propagated otherwise false
+ * @param topic Topic name.
+ * @param part Partition.
+ * @return {@code True} if propagated, otherwise {@code false}.
*/
- private boolean isMetadataPropagated(final String topic, final int partition) {
- final scala.Option<PartitionStateInfo> partitionStateOption = kafkaServer.apis().metadataCache().getPartitionInfo(
- topic, partition);
- if (partitionStateOption.isDefined()) {
- final PartitionStateInfo partitionState = partitionStateOption.get();
- final LeaderAndIsr leaderAndInSyncReplicas = partitionState.leaderIsrAndControllerEpoch().leaderAndIsr();
-
- if (ZkUtils.getLeaderForPartition(getZkClient(), topic, partition) != null
- && Request.isValidBrokerId(leaderAndInSyncReplicas.leader())
- && leaderAndInSyncReplicas.isr().size() >= 1)
- return true;
+ private boolean isMetadataPropagated(String topic, int part) {
+ scala.Option<PartitionStateInfo> partStateOption =
+ kafkaSrv.apis().metadataCache().getPartitionInfo(topic, part);
- }
- return false;
+ if (!partStateOption.isDefined())
+ return false;
+
+ PartitionStateInfo partState = partStateOption.get();
+
+ LeaderAndIsr LeaderAndIsr = partState.leaderIsrAndControllerEpoch().leaderAndIsr();
+
+ return ZkUtils.getLeaderForPartition(getZkClient(), topic, part) != null &&
+ Request.isValidBrokerId(LeaderAndIsr.leader()) && LeaderAndIsr.isr().size() >= 1;
}
/**
* Waits until metadata is propagated.
*
- * @param topic topic name
- * @param partition partition
- * @param timeout timeout value in millis
- * @param interval interval in millis to sleep
- * @throws TimeoutException
- * @throws InterruptedException
+ * @param topic Topic name.
+ * @param part Partition.
+ * @param timeout Timeout value in millis.
+ * @param interval Interval in millis to sleep.
+ * @throws TimeoutException If operation is timed out.
+ * @throws InterruptedException If interrupted.
*/
- private void waitUntilMetadataIsPropagated(final String topic, final int partition, final long timeout,
- final long interval) throws TimeoutException, InterruptedException {
+ private void waitUntilMetadataIsPropagated(String topic, int part, long timeout, long interval)
+ throws TimeoutException, InterruptedException {
int attempt = 1;
- final long startTime = System.currentTimeMillis();
+
+ long startTime = System.currentTimeMillis();
while (true) {
- if (isMetadataPropagated(topic, partition))
+ if (isMetadataPropagated(topic, part))
return;
- final long duration = System.currentTimeMillis() - startTime;
+ long duration = System.currentTimeMillis() - startTime;
if (duration < timeout)
Thread.sleep(interval);
else
- throw new TimeoutException("metadata propagate timed out, attempt=" + attempt);
+ throw new TimeoutException("Metadata propagation is timed out, attempt " + attempt);
attempt++;
}
-
}
/**
- * Sets up embedded Kafka Server
+ * Sets up embedded Kafka server.
*
- * @throws IOException
+ * @throws IOException If failed.
*/
- private void setupEmbeddedKafkaServer()
- throws IOException {
+ private void setupEmbeddedKafkaServer() throws IOException {
A.ensure(zkReady, "Zookeeper should be setup before hand");
- brokerConfig = new KafkaConfig(getBrokerConfig());
- kafkaServer = new KafkaServer(brokerConfig, SystemTime$.MODULE$);
- kafkaServer.startup();
+ brokerCfg = new KafkaConfig(getBrokerConfig());
+
+ kafkaSrv = new KafkaServer(brokerCfg, SystemTime$.MODULE$);
+
+ kafkaSrv.startup();
}
/**
- * Sets up embedded zooKeeper
+ * Sets up embedded ZooKeeper.
*
- * @throws IOException
- * @throws InterruptedException
+ * @throws IOException If failed.
+ * @throws InterruptedException If interrupted.
*/
- private void setupEmbeddedZooKeeper()
- throws IOException, InterruptedException {
+ private void setupEmbeddedZooKeeper() throws IOException, InterruptedException {
EmbeddedZooKeeper zooKeeper = new EmbeddedZooKeeper(ZK_HOST, zkPort);
+
zooKeeper.startup();
+
zkPort = zooKeeper.getActualPort();
+
zkClient = new ZkClient(getZKAddress(), ZK_SESSION_TIMEOUT, ZK_CONNECTION_TIMEOUT, ZKStringSerializer$.MODULE$);
+
zkReady = true;
}
/**
- * @return Kafka Broker Address.
+ * @return Kafka broker address.
*/
private static String getBrokerAddress() {
- return ZK_HOST + ":" + BROKER_PORT;
+ return ZK_HOST + ':' + BROKER_PORT;
}
/**
- * Gets KafKa Brofer Config
+ * Gets Kafka broker config.
*
- * @return Kafka Broker Config
- * @throws IOException
+ * @return Kafka broker config.
+ * @throws IOException If failed.
*/
- private static Properties getBrokerConfig()
- throws IOException {
+ private static Properties getBrokerConfig() throws IOException {
Properties props = new Properties();
+
props.put("broker.id", "0");
props.put("host.name", ZK_HOST);
props.put("port", "" + BROKER_PORT);
@@ -272,60 +272,63 @@ public class KafkaEmbeddedBroker {
props.put("zookeeper.connect", getZKAddress());
props.put("log.flush.interval.messages", "1");
props.put("replica.socket.timeout.ms", "1500");
+
return props;
}
/**
- * @return Kafka Producer Config
+ * @return Kafka Producer config.
*/
private static ProducerConfig getProducerConfig() {
Properties props = new Properties();
+
props.put("metadata.broker.list", getBrokerAddress());
- props.put("serializer.class", "kafka.serializer.StringEncoder");
- props.put("key.serializer.class", "kafka.serializer.StringEncoder");
- props.put("partitioner.class", "org.apache.ignite.kafka.SimplePartitioner");
+ props.put("serializer.class", StringEncoder.class.getName());
+ props.put("key.serializer.class", StringEncoder.class.getName());
+ props.put("partitioner.class", SimplePartitioner.class.getName());
+
return new ProducerConfig(props);
}
/**
- * Creates Temp Directory
+ * Creates temp directory.
*
- * @param prefix prefix
- * @return Created File.
- * @throws IOException
+ * @param prefix Prefix.
+ * @return Created file.
+ * @throws IOException If failed.
*/
- private static File createTempDir(final String prefix)
- throws IOException {
- final Path path = Files.createTempDirectory(prefix);
- return path.toFile();
+ private static File createTempDir( String prefix) throws IOException {
+ Path path = Files.createTempDirectory(prefix);
+ return path.toFile();
}
/**
- * Creates Embedded ZooKeeper.
+ * Creates embedded ZooKeeper.
*/
private static class EmbeddedZooKeeper {
- /** Default ZooKeeper Host. */
+ /** Default ZooKeeper host. */
private final String zkHost;
- /** Default ZooKeeper Port. */
+ /** Default ZooKeeper port. */
private final int zkPort;
- /** NIO Context Factory. */
+ /** NIO context factory. */
private NIOServerCnxnFactory factory;
- /** Snapshot Directory. */
+ /** Snapshot directory. */
private File snapshotDir;
- /** Log Directory. */
+ /** Log directory. */
private File logDir;
/**
- * Creates an embedded Zookeeper
- * @param zkHost zookeeper host
- * @param zkPort zookeeper port
+ * Creates an embedded ZooKeeper.
+ *
+ * @param zkHost ZooKeeper host.
+ * @param zkPort ZooKeeper port.
*/
- EmbeddedZooKeeper(final String zkHost, final int zkPort) {
+ EmbeddedZooKeeper(String zkHost, int zkPort) {
this.zkHost = zkHost;
this.zkPort = zkPort;
}
@@ -333,22 +336,25 @@ public class KafkaEmbeddedBroker {
/**
* Starts up ZooKeeper.
*
- * @throws IOException
- * @throws InterruptedException
+ * @throws IOException If failed.
+ * @throws InterruptedException If interrupted.
*/
- void startup()
- throws IOException, InterruptedException {
+ void startup() throws IOException, InterruptedException {
snapshotDir = createTempDir("_ss");
+
logDir = createTempDir("_log");
- ZooKeeperServer zooServer = new ZooKeeperServer(snapshotDir, logDir, 500);
+
+ ZooKeeperServer zkSrv = new ZooKeeperServer(snapshotDir, logDir, 500);
+
factory = new NIOServerCnxnFactory();
+
factory.configure(new InetSocketAddress(zkHost, zkPort), 16);
- factory.startup(zooServer);
+
+ factory.startup(zkSrv);
}
/**
- *
- * @return actual port zookeeper is started
+ * @return Actual port ZooKeeper is started.
*/
int getActualPort() {
return factory.getLocalPort();
@@ -357,17 +363,16 @@ public class KafkaEmbeddedBroker {
/**
* Shuts down ZooKeeper.
*
- * @throws IOException
+ * @throws IOException If failed.
*/
- void shutdown()
- throws IOException {
+ void shutdown() throws IOException {
if (factory != null) {
factory.shutdown();
U.delete(snapshotDir);
+
U.delete(logDir);
}
}
}
-
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
index 5972639..2473990 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
@@ -32,31 +32,31 @@ import java.util.*;
import java.util.concurrent.*;
import static org.apache.ignite.events.EventType.*;
+import static org.apache.ignite.stream.kafka.KafkaEmbeddedBroker.*;
/**
* Tests {@link KafkaStreamer}.
*/
-public class KafkaIgniteStreamerSelfTest
- extends GridCommonAbstractTest {
+public class KafkaIgniteStreamerSelfTest extends GridCommonAbstractTest {
/** Embedded Kafka. */
private KafkaEmbeddedBroker embeddedBroker;
/** Count. */
private static final int CNT = 100;
- /** Test Topic. */
+ /** Test topic. */
private static final String TOPIC_NAME = "page_visits";
- /** Kafka Partition. */
+ /** Kafka partition. */
private static final int PARTITIONS = 4;
- /** Kafka Replication Factor. */
+ /** Kafka replication factor. */
private static final int REPLICATION_FACTOR = 1;
- /** Topic Message Key Prefix. */
+ /** Topic message key prefix. */
private static final String KEY_PREFIX = "192.168.2.";
- /** Topic Message Value Url. */
+ /** Topic message value URL. */
private static final String VALUE_URL = ",www.example.com,";
/** Constructor. */
@@ -65,18 +65,15 @@ public class KafkaIgniteStreamerSelfTest
}
/** {@inheritDoc} */
- @Override
- protected void beforeTest()
- throws Exception {
+ @SuppressWarnings("unchecked")
+ @Override protected void beforeTest() throws Exception {
grid().<Integer, String>getOrCreateCache(defaultCacheConfiguration());
embeddedBroker = new KafkaEmbeddedBroker();
}
/** {@inheritDoc} */
- @Override
- protected void afterTest()
- throws Exception {
+ @Override protected void afterTest() throws Exception {
grid().cache(null).clear();
embeddedBroker.shutdown();
@@ -85,76 +82,80 @@ public class KafkaIgniteStreamerSelfTest
/**
* Tests Kafka streamer.
*
- * @throws TimeoutException
- * @throws InterruptedException
+ * @throws TimeoutException If timed out.
+ * @throws InterruptedException If interrupted.
*/
- public void testKafkaStreamer()
- throws TimeoutException, InterruptedException {
+ public void testKafkaStreamer() throws TimeoutException, InterruptedException {
embeddedBroker.createTopic(TOPIC_NAME, PARTITIONS, REPLICATION_FACTOR);
- Map<String, String> keyValueMap = produceStream(TOPIC_NAME);
- consumerStream(TOPIC_NAME, keyValueMap);
+ Map<String, String> keyValMap = produceStream(TOPIC_NAME);
+
+ consumerStream(TOPIC_NAME, keyValMap);
}
/**
- * Produces/Sends messages to Kafka.
+ * Sends messages to Kafka.
*
* @param topic Topic name.
* @return Map of key value messages.
*/
- private Map<String, String> produceStream(final String topic) {
- final Map<String, String> keyValueMap = new HashMap<>();
-
+ private Map<String, String> produceStream(String topic) {
// Generate random subnets.
List<Integer> subnet = new ArrayList<>();
- int i = 0;
- while (i <= CNT)
- subnet.add(++i);
+ for (int i = 1; i <= CNT; i++)
+ subnet.add(i);
Collections.shuffle(subnet);
- final List<KeyedMessage<String, String>> messages = new ArrayList<>();
- for (int event = 0; event < CNT; event++) {
- long runtime = new Date().getTime();
- String ip = KEY_PREFIX + subnet.get(event);
+ List<KeyedMessage<String, String>> messages = new ArrayList<>(CNT);
+
+ Map<String, String> keyValMap = new HashMap<>();
+
+ for (int evt = 0; evt < CNT; evt++) {
+ long runtime = System.currentTimeMillis();
+
+ String ip = KEY_PREFIX + subnet.get(evt);
+
String msg = runtime + VALUE_URL + ip;
+
messages.add(new KeyedMessage<>(topic, ip, msg));
- keyValueMap.put(ip, msg);
+
+ keyValMap.put(ip, msg);
}
- final Producer<String, String> producer = embeddedBroker.sendMessages(messages);
+ Producer<String, String> producer = embeddedBroker.sendMessages(messages);
+
producer.close();
- return keyValueMap;
+ return keyValMap;
}
/**
- * Consumes Kafka Stream via ignite.
+ * Consumes Kafka stream via Ignite.
*
* @param topic Topic name.
- * @param keyValueMap Expected key value map.
- * @throws TimeoutException TimeoutException.
- * @throws InterruptedException InterruptedException.
+ * @param keyValMap Expected key value map.
+ * @throws TimeoutException If timed out.
+ * @throws InterruptedException If interrupted.
*/
- private void consumerStream(final String topic, final Map<String, String> keyValueMap)
+ private void consumerStream(String topic, Map<String, String> keyValMap)
throws TimeoutException, InterruptedException {
-
KafkaStreamer<String, String, String> kafkaStmr = null;
- final Ignite ignite = grid();
- try (IgniteDataStreamer<String, String> stmr = ignite.dataStreamer(null)) {
+ Ignite ignite = grid();
+ try (IgniteDataStreamer<String, String> stmr = ignite.dataStreamer(null)) {
stmr.allowOverwrite(true);
stmr.autoFlushFrequency(10);
- // Configure socket streamer.
+ // Configure Kafka streamer.
kafkaStmr = new KafkaStreamer<>();
// Get the cache.
IgniteCache<String, String> cache = ignite.cache(null);
- // Set ignite instance.
+ // Set Ignite instance.
kafkaStmr.setIgnite(ignite);
// Set data streamer instance.
@@ -167,58 +168,55 @@ public class KafkaIgniteStreamerSelfTest
kafkaStmr.setThreads(4);
// Set the consumer configuration.
- kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(KafkaEmbeddedBroker.getZKAddress(),
- "groupX"));
+ kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(getZKAddress(), "groupX"));
// Set the decoders.
- StringDecoder stringDecoder = new StringDecoder(new VerifiableProperties());
- kafkaStmr.setKeyDecoder(stringDecoder);
- kafkaStmr.setValueDecoder(stringDecoder);
+ StringDecoder strDecoder = new StringDecoder(new VerifiableProperties());
+
+ kafkaStmr.setKeyDecoder(strDecoder);
+ kafkaStmr.setValueDecoder(strDecoder);
// Start kafka streamer.
kafkaStmr.start();
final CountDownLatch latch = new CountDownLatch(CNT);
+
IgniteBiPredicate<UUID, CacheEvent> locLsnr = new IgniteBiPredicate<UUID, CacheEvent>() {
- @Override
- public boolean apply(UUID uuid, CacheEvent evt) {
+ @Override public boolean apply(UUID uuid, CacheEvent evt) {
latch.countDown();
+
return true;
}
};
ignite.events(ignite.cluster().forCacheNodes(null)).remoteListen(locLsnr, null, EVT_CACHE_OBJECT_PUT);
- latch.await();
- for (Map.Entry<String, String> entry : keyValueMap.entrySet()) {
- final String key = entry.getKey();
- final String value = entry.getValue();
+ latch.await();
- final String cacheValue = cache.get(key);
- assertEquals(value, cacheValue);
- }
+ for (Map.Entry<String, String> entry : keyValMap.entrySet())
+ assertEquals(entry.getValue(), cache.get(entry.getKey()));
}
-
finally {
- // Shutdown kafka streamer.
- kafkaStmr.stop();
+ if (kafkaStmr != null)
+ kafkaStmr.stop();
}
}
/**
* Creates default consumer config.
*
- * @param zooKeeper Zookeeper address <server:port>.
- * @param groupId Group Id for kafka subscriber.
- * @return {@link ConsumerConfig} kafka consumer configuration.
+ * @param zooKeeper ZooKeeper address <server:port>.
+ * @param grpId Group Id for kafka subscriber.
+ * @return Kafka consumer configuration.
*/
- private ConsumerConfig createDefaultConsumerConfig(String zooKeeper, String groupId) {
+ private ConsumerConfig createDefaultConsumerConfig(String zooKeeper, String grpId) {
A.notNull(zooKeeper, "zookeeper");
- A.notNull(groupId, "groupId");
+ A.notNull(grpId, "groupId");
Properties props = new Properties();
+
props.put("zookeeper.connect", zooKeeper);
- props.put("group.id", groupId);
+ props.put("group.id", grpId);
props.put("zookeeper.session.timeout.ms", "400");
props.put("zookeeper.sync.time.ms", "200");
props.put("auto.commit.interval.ms", "1000");
@@ -226,5 +224,4 @@ public class KafkaIgniteStreamerSelfTest
return new ConsumerConfig(props);
}
-
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/63fce5a4/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
index b836b44..1ef4f77 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
@@ -18,29 +18,36 @@
package org.apache.ignite.stream.kafka;
import kafka.producer.*;
+import kafka.utils.*;
/**
- * Simple Partitioner for Kafka.
+ * Simple partitioner for Kafka.
*/
@SuppressWarnings("UnusedDeclaration")
-public class SimplePartitioner
- implements Partitioner {
+public class SimplePartitioner implements Partitioner {
+ /**
+ * Constructs instance.
+ *
+ * @param props Properties.
+ */
+ public SimplePartitioner(VerifiableProperties props) {
+ // No-op.
+ }
/**
* Partitions the key based on the key value.
*
* @param key Key.
- * @param partitionSize Partition size.
+ * @param partSize Partition size.
* @return partition Partition.
*/
- public int partition(Object key, int partitionSize) {
- int partition = 0;
+ public int partition(Object key, int partSize) {
String keyStr = (String)key;
+
String[] keyValues = keyStr.split("\\.");
+
Integer intKey = Integer.parseInt(keyValues[3]);
- if (intKey > 0) {
- partition = intKey % partitionSize;
- }
- return partition;
+
+ return intKey > 0 ? intKey % partSize : 0;
}
}
[43/50] incubator-ignite git commit: Fixed notes
Posted by sb...@apache.org.
Fixed notes
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1a6948e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1a6948e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1a6948e8
Branch: refs/heads/ignite-gg-10052
Commit: 1a6948e8778d0e6379ffc0c99fee0d83d8bbebd7
Parents: 82f4992
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Wed Jul 8 13:04:31 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Wed Jul 8 13:04:31 2015 +0300
----------------------------------------------------------------------
.../config/benchmark-index-put.properties | 64 --------
.../config/benchmark-put-indexed-val.properties | 64 ++++++++
.../cache/IgnitePutIndex1Benchmark.java | 42 -----
.../cache/IgnitePutIndex2Benchmark.java | 42 -----
.../cache/IgnitePutIndexedValue1Benchmark.java | 42 +++++
.../cache/IgnitePutIndexedValue2Benchmark.java | 42 +++++
.../cache/IgnitePutIndexedValue8Benchmark.java | 2 +-
.../ignite/yardstick/cache/model/Person1.java | 29 +---
.../ignite/yardstick/cache/model/Person2.java | 45 +-----
.../ignite/yardstick/cache/model/Person8.java | 155 ++-----------------
10 files changed, 167 insertions(+), 360 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/config/benchmark-index-put.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-index-put.properties b/modules/yardstick/config/benchmark-index-put.properties
deleted file mode 100644
index fb73656..0000000
--- a/modules/yardstick/config/benchmark-index-put.properties
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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 benchmarks for SQL queries.
-#
-
-# 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}" -DIGNITE_QUIET=false" \
- -XX:+UseParNewGC \
- -XX:+UseConcMarkSweepGC \
- -XX:+UseTLAB \
- -XX:NewSize=128m \
- -XX:MaxNewSize=128m \
- -XX:MaxTenuringThreshold=0 \
- -XX:SurvivorRatio=1024 \
- -XX:+UseCMSInitiatingOccupancyOnly \
- -XX:CMSInitiatingOccupancyFraction=60 \
-"
-
-# List of default probes.
-# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
-BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
-
-# Packages where the specified benchmark is searched by reflection mechanism.
-BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
-
-# Probe point writer class name.
-# BENCHMARK_WRITER=
-
-# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
-SERVER_HOSTS=localhost,localhost
-
-# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
-DRIVER_HOSTS=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`))
-
-# Run configuration.
-# 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 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndex1Benchmark -sn IgniteNode -ds atomic-indexed1-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndex2Benchmark -sn IgniteNode -ds atomic-indexed2-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndex8Benchmark -sn IgniteNode -ds atomic-indexed8-put\
-"
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/config/benchmark-put-indexed-val.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-put-indexed-val.properties b/modules/yardstick/config/benchmark-put-indexed-val.properties
new file mode 100644
index 0000000..8f3a505
--- /dev/null
+++ b/modules/yardstick/config/benchmark-put-indexed-val.properties
@@ -0,0 +1,64 @@
+# 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 benchmarks for SQL queries.
+#
+
+# 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}" -DIGNITE_QUIET=false" \
+ -XX:+UseParNewGC \
+ -XX:+UseConcMarkSweepGC \
+ -XX:+UseTLAB \
+ -XX:NewSize=128m \
+ -XX:MaxNewSize=128m \
+ -XX:MaxTenuringThreshold=0 \
+ -XX:SurvivorRatio=1024 \
+ -XX:+UseCMSInitiatingOccupancyOnly \
+ -XX:CMSInitiatingOccupancyFraction=60 \
+"
+
+# List of default probes.
+# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
+
+# Packages where the specified benchmark is searched by reflection mechanism.
+BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+
+# Probe point writer class name.
+# BENCHMARK_WRITER=
+
+# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
+SERVER_HOSTS=localhost,localhost
+
+# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
+DRIVER_HOSTS=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`))
+
+# Run configuration.
+# 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 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndexedValue1Benchmark -sn IgniteNode -ds atomic-put-indexed-val-1,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndexedValue2Benchmark -sn IgniteNode -ds atomic-put-indexed-val-2,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndexedValue8Benchmark -sn IgniteNode -ds atomic-put-indexed-val-8\
+"
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java
deleted file mode 100644
index 65dd39a..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 org.apache.ignite.*;
-import org.apache.ignite.yardstick.cache.model.*;
-
-import java.util.*;
-
-/**
- * Ignite benchmark that performs put operations for entity with indexed fields.
- */
-public class IgnitePutIndex1Benchmark extends IgniteCacheAbstractBenchmark {
- /** {@inheritDoc} */
- @Override public boolean test(Map<Object, Object> ctx) throws Exception {
- int key = nextRandom(args.range());
-
- cache.put(key, new Person1(key));
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-index");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java
deleted file mode 100644
index b4cf86f..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 org.apache.ignite.*;
-import org.apache.ignite.yardstick.cache.model.*;
-
-import java.util.*;
-
-/**
- * Ignite benchmark that performs put operations for entity with indexed fields.
- */
-public class IgnitePutIndex2Benchmark extends IgniteCacheAbstractBenchmark {
- /** {@inheritDoc} */
- @Override public boolean test(Map<Object, Object> ctx) throws Exception {
- int key = nextRandom(args.range());
-
- cache.put(key, new Person2(key, key + 1));
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-index");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue1Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue1Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue1Benchmark.java
new file mode 100644
index 0000000..68de785
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue1Benchmark.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.*;
+
+import java.util.*;
+
+/**
+ * Ignite benchmark that performs put operations for entity with indexed fields.
+ */
+public class IgnitePutIndexedValue1Benchmark extends IgniteCacheAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ int key = nextRandom(args.range());
+
+ cache.put(key, new Person1(key));
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("atomic-index");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue2Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue2Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue2Benchmark.java
new file mode 100644
index 0000000..3256ee3
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue2Benchmark.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.*;
+
+import java.util.*;
+
+/**
+ * Ignite benchmark that performs put operations for entity with indexed fields.
+ */
+public class IgnitePutIndexedValue2Benchmark extends IgniteCacheAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ int key = nextRandom(args.range());
+
+ cache.put(key, new Person2(key));
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("atomic-index");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java
index b51ff34..42aa67d 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java
@@ -30,7 +30,7 @@ public class IgnitePutIndexedValue8Benchmark extends IgniteCacheAbstractBenchmar
@Override public boolean test(Map<Object, Object> ctx) throws Exception {
int key = nextRandom(args.range());
- cache.put(key, new Person8(key, key + 1, key + 2, key + 3, key + 4, key + 5, key + 6, key + 7));
+ cache.put(key, new Person8(key));
return true;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java
index 0b2a0bf..91d1ccc 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java
@@ -30,35 +30,12 @@ public class Person1 implements Serializable {
private int val1;
/**
- * Empty constructor.
- */
- public Person1() {
- // No-op.
- }
-
- /**
* Constructs.
*
- * @param val1 Indexed value.
- */
- public Person1(int val1) {
- this.val1 = val1;
- }
-
- /**
- * @return Get value.
- */
- public int getVal1() {
- return val1;
- }
-
- /**
- * Set value.
- *
- * @param val1 Value.
+ * @param val Indexed value.
*/
- public void setVal1(int val1) {
- this.val1 = val1;
+ public Person1(int val) {
+ this.val1 = val;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java
index 3b1cb9e..dc5729c 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java
@@ -34,50 +34,13 @@ public class Person2 implements Serializable {
private int val2;
/**
- * Empty constructor.
- */
- public Person2() {
- // No-op.
- }
-
- /**
* Constructs.
- */
- public Person2(int val1, int val2) {
- this.val1 = val1;
- this.val2 = val2;
- }
-
- /**
- * @return Get value.
- */
- public int getVal1() {
- return val1;
- }
-
- /**
- * Set value.
- *
- * @param val1 Value.
- */
- public void setVal1(int val1) {
- this.val1 = val1;
- }
-
- /**
- * @return Get value.
- */
- public int getVal2() {
- return val2;
- }
-
- /**
- * Set value.
*
- * @param val2 Value.
+ * @param val Value.
*/
- public void setVal2(int val2) {
- this.val2 = val2;
+ public Person2(int val) {
+ this.val1 = val;
+ this.val2 = val + 1;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1a6948e8/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java
index b8e3f7c..92d65ac 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java
@@ -58,152 +58,19 @@ public class Person8 implements Serializable {
private int val8;
/**
- * Empty constructor.
- */
- public Person8() {
- // No-op.
- }
-
- /**
* Constructs.
- */
- public Person8(int val1, int val2, int val3, int val4, int val5, int val6, int val7, int val8) {
- this.val1 = val1;
- this.val2 = val2;
- this.val3 = val3;
- this.val4 = val4;
- this.val5 = val5;
- this.val6 = val6;
- this.val7 = val7;
- this.val8 = val8;
- }
-
- /**
- * @return Get value.
- */
- public int getVal1() {
- return val1;
- }
-
- /**
- * Set value.
- *
- * @param val1 Value.
- */
- public void setVal1(int val1) {
- this.val1 = val1;
- }
-
- /**
- * @return Get value.
- */
- public int getVal2() {
- return val2;
- }
-
- /**
- * Set value.
- *
- * @param val2 Value.
- */
- public void setVal2(int val2) {
- this.val2 = val2;
- }
-
- /**
- * @return Get value.
- */
- public int getVal3() {
- return val3;
- }
-
- /**
- * Set value.
- *
- * @param val3 Value.
- */
- public void setVal3(int val3) {
- this.val3 = val3;
- }
-
- /**
- * @return Get value.
- */
- public int getVal4() {
- return val4;
- }
-
- /**
- * Set value.
- *
- * @param val4 Value.
- */
- public void setVal4(int val4) {
- this.val4 = val4;
- }
-
- /**
- * @return Get value.
- */
- public int getVal5() {
- return val5;
- }
-
- /**
- * Set value.
- *
- * @param val5 Value.
- */
- public void setVal5(int val5) {
- this.val5 = val5;
- }
-
- /**
- * @return Get value.
- */
- public int getVal6() {
- return val6;
- }
-
- /**
- * Set value.
*
- * @param val6 Value.
- */
- public void setVal6(int val6) {
- this.val6 = val6;
- }
-
- /**
- * @return Get value.
- */
- public int getVal7() {
- return val7;
- }
-
- /**
- * Set value.
- *
- * @param val7 Value.
- */
- public void setVal7(int val7) {
- this.val7 = val7;
- }
-
- /**
- * @return Get value.
- */
- public int getVal8() {
- return val8;
- }
-
- /**
- * Set value.
- *
- * @param val8 Value.
- */
- public void setVal8(int val8) {
- this.val8 = val8;
+ * @param val Indexed value.
+ */
+ public Person8(int val) {
+ this.val1 = val;
+ this.val2 = val + 1;
+ this.val3 = val + 2;
+ this.val4 = val + 3;
+ this.val5 = val + 4;
+ this.val6 = val + 5;
+ this.val7 = val + 6;
+ this.val8 = val + 7;
}
/** {@inheritDoc} */
[47/50] incubator-ignite git commit: #ignite-1101: Add test for cache
future runtime exception.
Posted by sb...@apache.org.
#ignite-1101: Add test for cache future runtime exception.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/94a42a48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/94a42a48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/94a42a48
Branch: refs/heads/ignite-gg-10052
Commit: 94a42a48530998da9895e217c99eec69db71d8c9
Parents: 44b52b4
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed Jul 8 14:45:49 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed Jul 8 14:45:49 2015 +0300
----------------------------------------------------------------------
.../cache/CacheFutureExceptionSelfTest.java | 121 ++++---------------
1 file changed, 26 insertions(+), 95 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94a42a48/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
index 27bfe17..34d2daa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
@@ -19,16 +19,11 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.lang.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.apache.ignite.testframework.junits.common.*;
import javax.cache.*;
import java.io.*;
-import java.util.*;
import java.util.concurrent.*;
import static java.util.concurrent.TimeUnit.*;
@@ -39,9 +34,11 @@ import static java.util.concurrent.TimeUnit.*;
public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration cfg = StartNode.createConfiguration();
+ IgniteConfiguration cfg = new IgniteConfiguration();
+ cfg.setGridName(gridName);
- cfg.setClientMode(true);
+ if (gridName.equals(getTestGridName(1)))
+ cfg.setClientMode(true);
return cfg;
}
@@ -50,68 +47,39 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testAsyncCacheFuture() throws Exception {
- final CountDownLatch readyLatch = new CountDownLatch(1);
+ Ignite srv = startGrid(0);
- GridJavaProcess node1 = null;
+ IgniteCache<String, NotSerializableClass> cache = srv.getOrCreateCache("CACHE");
+ cache.put("key", new NotSerializableClass());
- Collection<String> jvmArgs = Arrays.asList("-ea", "-DIGNITE_QUIET=false");
+ Ignite client = startGrid(1);
- try {
- node1 = GridJavaProcess.exec(
- StartNode.class.getName(), null,
- log,
- new CI1<String>() {
- @Override public void apply(String s) {
- info("Server node1: " + s);
+ IgniteCache<String, NotSerializableClass> asyncCache = client.<String, NotSerializableClass>cache("CACHE").withAsync();
- if (s.contains("Topology snapshot"))
- readyLatch.countDown();
- }
- },
- null,
- jvmArgs,
- null
- );
+ System.setProperty("FAIL", "true");
- assertTrue(readyLatch.await(60, SECONDS));
+ asyncCache.get("key");
- Ignite client = startGrid(0);
+ final CountDownLatch futLatch = new CountDownLatch(1);
- IgniteCache<String, NotSerializableClass> cache = client.getOrCreateCache("CACHE");
+ asyncCache.future().listen(new IgniteInClosure<IgniteFuture<Object>>() {
+ @Override public void apply(IgniteFuture<Object> fut) {
+ assertTrue(fut.isDone());
- cache.put("key", new NotSerializableClass());
+ try {
+ fut.get();
- System.setProperty("FAIL", "true");
-
- IgniteCache<String, NotSerializableClass> asyncCache = cache.withAsync();
-
- asyncCache.get("key");
-
- final CountDownLatch futLatch = new CountDownLatch(1);
-
- asyncCache.future().listen(new IgniteInClosure<IgniteFuture<Object>>() {
- @Override public void apply(IgniteFuture<Object> fut) {
- assertTrue(fut.isDone());
-
- try {
- fut.get();
-
- fail();
- }
- catch (CacheException e) {
- log.info("Expected error: " + e);
+ fail();
+ }
+ catch (CacheException e) {
+ log.info("Expected error: " + e);
- futLatch.countDown();
- }
+ futLatch.countDown();
}
- });
+ }
+ });
- assertTrue(futLatch.await(60, SECONDS));
- }
- finally {
- if (node1 != null)
- node1.killProcess();
- }
+ assertTrue(futLatch.await(60, SECONDS));
}
/**
@@ -131,41 +99,4 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
in.readObject();
}
}
-
- /**
- * Test class.
- */
- public static class StartNode {
- /**
- * @return Configuration.
- */
- public static IgniteConfiguration createConfiguration() {
- IgniteConfiguration cfg = new IgniteConfiguration();
-
- cfg.setPeerClassLoadingEnabled(true);
-
- cfg.setLocalHost("127.0.0.1");
-
- TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
- disco.setIpFinderCleanFrequency(1000);
-
- TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
-
- ipFinder.setAddresses(Collections.singletonList("127.0.0.1:47500..47509"));
-
- disco.setIpFinder(ipFinder);
-
- cfg.setDiscoverySpi(disco);
-
- return cfg;
- }
-
- /**
- * @param args Main parameters.
- */
- public static void main(String[] args) {
- Ignition.start(createConfiguration());
- }
- }
-}
\ No newline at end of file
+}
\ No newline at end of file
[39/50] incubator-ignite git commit: # review
Posted by sb...@apache.org.
# review
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/839fe79f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/839fe79f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/839fe79f
Branch: refs/heads/ignite-gg-10052
Commit: 839fe79fa5ff0ee91b528b43d6a7834aa1ea719f
Parents: cd01e4c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 06:16:48 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 06:16:48 2015 +0300
----------------------------------------------------------------------
.../processors/cache/jta/CacheJtaManager.java | 24 ++++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/839fe79f/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index 09d856b..ace5fe7 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -35,7 +35,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
private final ThreadLocal<GridCacheXAResource> xaRsrc = new ThreadLocal<>();
/** */
- private volatile TransactionManager jtaTm;
+ private TransactionManager jtaTm;
/** */
private final AtomicReference<CacheTmLookup> tmLookupRef = new AtomicReference<>();
@@ -46,7 +46,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
if (cctx.txConfig() != null) {
String txLookupClsName = cctx.txConfig().getTxManagerLookupClassName();
-
+
if (txLookupClsName != null)
tmLookupRef.set(createTmLookup(txLookupClsName));
}
@@ -55,7 +55,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
/** {@inheritDoc} */
@Override protected void stop0(boolean cancel) {
CacheTmLookup tmLookup = tmLookupRef.get();
-
+
if (tmLookup instanceof LifecycleAware)
((LifecycleAware)tmLookup).stop();
}
@@ -70,10 +70,10 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
CacheTmLookup res = (CacheTmLookup)cls.newInstance();
cctx.kernalContext().resource().injectGeneric(res);
-
+
if (res instanceof LifecycleAware)
((LifecycleAware)res).start();
-
+
return res;
}
catch (Exception e) {
@@ -86,10 +86,10 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
if (jtaTm == null) {
try {
CacheTmLookup tmLookup = tmLookupRef.get();
-
+
if (tmLookup == null)
return;
-
+
jtaTm = tmLookup.getTm();
}
catch (Exception e) {
@@ -144,23 +144,23 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
/** {@inheritDoc} */
@Override public void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException {
String cacheLookupClsName = cfg.getTransactionManagerLookupClassName();
-
+
if (cacheLookupClsName != null) {
CacheTmLookup tmLookup = tmLookupRef.get();
-
+
if (tmLookup == null) {
tmLookup = createTmLookup(cacheLookupClsName);
-
+
if (tmLookupRef.compareAndSet(null, tmLookup))
return;
-
+
tmLookup = tmLookupRef.get();
}
if (!cacheLookupClsName.equals(tmLookup.getClass().getName()))
throw new IgniteCheckedException("Failed to start cache with CacheTmLookup that specified in cache " +
"configuration, because node uses another CacheTmLookup [cache" + cfg.getName() +
- ", tmLookupClassName=" + cacheLookupClsName + ", tmLookupUsedByNode="
+ ", tmLookupClassName=" + cacheLookupClsName + ", tmLookupUsedByNode="
+ tmLookup.getClass().getName() + ']');
}
}
[27/50] incubator-ignite git commit: ignite-1070 Zombie entries in
cache with SortedEvictionPolicy
Posted by sb...@apache.org.
ignite-1070 Zombie entries in cache with SortedEvictionPolicy
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9d0aa6f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9d0aa6f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9d0aa6f1
Branch: refs/heads/ignite-gg-10052
Commit: 9d0aa6f1244e13187b64dec81b8d33d94f3db2af
Parents: 44506c3
Author: agura <ag...@gridgain.com>
Authored: Tue Jul 7 14:49:13 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Tue Jul 7 14:49:13 2015 +0300
----------------------------------------------------------------------
.../cache/eviction/fifo/FifoEvictionPolicy.java | 5 -----
.../cache/eviction/lru/LruEvictionPolicy.java | 5 -----
.../eviction/sorted/SortedEvictionPolicy.java | 19 +++++--------------
...cheConcurrentEvictionConsistencySelfTest.java | 15 +++++++++++++--
4 files changed, 18 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d0aa6f1/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
index 221bc39..1e06ffd 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
@@ -216,11 +216,6 @@ public class FifoEvictionPolicy<K, V> implements EvictionPolicy<K, V>, FifoEvict
// If node was unlinked by concurrent shrink() call, we must repeat the whole cycle.
else if (!entry.removeMeta(node))
return false;
- else {
- memSize.add(-entry.size());
-
- return true;
- }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d0aa6f1/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
index 0be26c8..ba6f88a 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
@@ -200,11 +200,6 @@ public class LruEvictionPolicy<K, V> implements EvictionPolicy<K, V>, LruEvictio
// If node was unlinked by concurrent shrink() call, we must repeat the whole cycle.
else if (!entry.removeMeta(node))
return false;
- else {
- memSize.add(-entry.size());
-
- return true;
- }
}
}
else if (queue.unlinkx(node)) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d0aa6f1/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
index b8b82fa..d99b3b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
@@ -224,21 +224,17 @@ public class SortedEvictionPolicy<K, V> implements EvictionPolicy<K, V>, SortedE
private boolean touch(EvictableEntry<K, V> entry) {
Holder<K, V> holder = entry.meta();
- // Entry has not been add yet to backed queue..
+ // Entry has not been added yet to backed queue.
if (holder == null) {
while (true) {
holder = new Holder<>(entry, orderCnt.incrementAndGet());
- set.add(holder);
+ if (entry.putMetaIfAbsent(holder) != null)
+ return false; // Set has not been changed.
- if (entry.putMetaIfAbsent(holder) != null) {
- // Was concurrently added, need to remove it from queue.
- removeHolder(holder);
+ set.add(holder);
- // Set has not been changed.
- return false;
- }
- else if (holder.order > 0) {
+ if (holder.order > 0) {
if (!entry.isCached()) {
// Was concurrently evicted, need to remove it from queue.
removeHolder(holder);
@@ -253,11 +249,6 @@ public class SortedEvictionPolicy<K, V> implements EvictionPolicy<K, V>, SortedE
// If holder was removed by concurrent shrink() call, we must repeat the whole cycle.
else if (!entry.removeMeta(holder))
return false;
- else {
- memSize.add(-entry.size());
-
- return true;
- }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d0aa6f1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
index 921422e..91e9ecc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.cache.eviction.lru.*;
import org.apache.ignite.cache.eviction.sorted.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -273,15 +274,25 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
info("Test results [threadCnt=" + threadCnt + ", iterCnt=" + ITERATION_CNT + ", cacheSize=" + cache.size() +
", internalQueueSize" + queue.size() + ", duration=" + (System.currentTimeMillis() - start) + ']');
+ boolean detached = false;
+
for (Cache.Entry<Integer, Integer> e : queue) {
Integer rmv = cache.getAndRemove(e.getKey());
- if (rmv == null)
- fail("Eviction policy contains key that is not present in cache: " + e);
+ CacheEvictableEntryImpl unwrapped = e.unwrap(CacheEvictableEntryImpl.class);
+
+ if (rmv == null && (unwrapped.meta() != null || unwrapped.isCached())) {
+ U.warn(log, "Detached entry: " + e);
+
+ detached = true;
+ }
else
info("Entry removed: " + rmv);
}
+ if (detached)
+ fail("Eviction policy contains keys that are not present in cache");
+
if (!(cache.localSize() == 0)) {
boolean zombies = false;
[16/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4ff352f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4ff352f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4ff352f5
Branch: refs/heads/ignite-gg-10052
Commit: 4ff352f523e59f862e31dcfa0da5b894da55ac85
Parents: 335a7bb 8fc9e4e
Author: Anton <av...@gridgain.com>
Authored: Mon Jul 6 14:30:32 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Mon Jul 6 14:30:32 2015 +0300
----------------------------------------------------------------------
.../internal/interop/InteropIgnition.java | 31 +++++++++++++-------
1 file changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[41/50] incubator-ignite git commit: Added benchmarks.
Posted by sb...@apache.org.
Added benchmarks.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/946b08ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/946b08ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/946b08ba
Branch: refs/heads/ignite-gg-10052
Commit: 946b08ba435813881920f8547d7cff36a9faf9a2
Parents: 4031db7
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Wed Jul 8 12:30:41 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Wed Jul 8 12:30:41 2015 +0300
----------------------------------------------------------------------
.../config/benchmark-index-put.properties | 64 +++++
modules/yardstick/config/ignite-base-config.xml | 23 ++
.../cache/IgnitePutIndex1Benchmark.java | 42 ++++
.../cache/IgnitePutIndex2Benchmark.java | 42 ++++
.../cache/IgnitePutIndex8Benchmark.java | 42 ++++
.../ignite/yardstick/cache/model/Person1.java | 78 ++++++
.../ignite/yardstick/cache/model/Person2.java | 104 ++++++++
.../ignite/yardstick/cache/model/Person8.java | 242 +++++++++++++++++++
8 files changed, 637 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/config/benchmark-index-put.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-index-put.properties b/modules/yardstick/config/benchmark-index-put.properties
new file mode 100644
index 0000000..fb73656
--- /dev/null
+++ b/modules/yardstick/config/benchmark-index-put.properties
@@ -0,0 +1,64 @@
+# 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 benchmarks for SQL queries.
+#
+
+# 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}" -DIGNITE_QUIET=false" \
+ -XX:+UseParNewGC \
+ -XX:+UseConcMarkSweepGC \
+ -XX:+UseTLAB \
+ -XX:NewSize=128m \
+ -XX:MaxNewSize=128m \
+ -XX:MaxTenuringThreshold=0 \
+ -XX:SurvivorRatio=1024 \
+ -XX:+UseCMSInitiatingOccupancyOnly \
+ -XX:CMSInitiatingOccupancyFraction=60 \
+"
+
+# List of default probes.
+# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
+
+# Packages where the specified benchmark is searched by reflection mechanism.
+BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+
+# Probe point writer class name.
+# BENCHMARK_WRITER=
+
+# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
+SERVER_HOSTS=localhost,localhost
+
+# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
+DRIVER_HOSTS=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`))
+
+# Run configuration.
+# 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 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndex1Benchmark -sn IgniteNode -ds atomic-indexed1-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndex2Benchmark -sn IgniteNode -ds atomic-indexed2-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutIndex8Benchmark -sn IgniteNode -ds atomic-indexed8-put\
+"
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/config/ignite-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-config.xml b/modules/yardstick/config/ignite-base-config.xml
index 9d28774..b2c976a 100644
--- a/modules/yardstick/config/ignite-base-config.xml
+++ b/modules/yardstick/config/ignite-base-config.xml
@@ -104,6 +104,29 @@
</bean>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="name" value="atomic-index"/>
+
+ <property name="cacheMode" value="PARTITIONED"/>
+
+ <property name="atomicityMode" value="ATOMIC"/>
+
+ <property name="swapEnabled" value="false"/>
+
+ <property name="indexedTypes">
+ <list>
+ <value>java.lang.Integer</value>
+ <value>org.apache.ignite.yardstick.cache.model.Person1</value>
+
+ <value>java.lang.Integer</value>
+ <value>org.apache.ignite.yardstick.cache.model.Person2</value>
+
+ <value>java.lang.Integer</value>
+ <value>org.apache.ignite.yardstick.cache.model.Person8</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="query"/>
<property name="cacheMode" value="PARTITIONED"/>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java
new file mode 100644
index 0000000..65dd39a
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex1Benchmark.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.*;
+
+import java.util.*;
+
+/**
+ * Ignite benchmark that performs put operations for entity with indexed fields.
+ */
+public class IgnitePutIndex1Benchmark extends IgniteCacheAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ int key = nextRandom(args.range());
+
+ cache.put(key, new Person1(key));
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("atomic-index");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java
new file mode 100644
index 0000000..b4cf86f
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex2Benchmark.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.*;
+
+import java.util.*;
+
+/**
+ * Ignite benchmark that performs put operations for entity with indexed fields.
+ */
+public class IgnitePutIndex2Benchmark extends IgniteCacheAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ int key = nextRandom(args.range());
+
+ cache.put(key, new Person2(key, key + 1));
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("atomic-index");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java
new file mode 100644
index 0000000..542a139
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.*;
+
+import java.util.*;
+
+/**
+ * Ignite benchmark that performs put operations for entity with indexed fields.
+ */
+public class IgnitePutIndex8Benchmark extends IgniteCacheAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ int key = nextRandom(args.range());
+
+ cache.put(key, new Person8(key, key + 1, key + 2, key + 3, key + 4, key + 5, key + 6, key + 7));
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("atomic-index");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java
new file mode 100644
index 0000000..0b2a0bf
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person1.java
@@ -0,0 +1,78 @@
+/*
+ * 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.model;
+
+import org.apache.ignite.cache.query.annotations.*;
+
+import java.io.*;
+
+/**
+ * Value used for indexed put test.
+ */
+public class Person1 implements Serializable {
+ /** Value. */
+ @QuerySqlField(index = true)
+ private int val1;
+
+ /**
+ * Empty constructor.
+ */
+ public Person1() {
+ // No-op.
+ }
+
+ /**
+ * Constructs.
+ *
+ * @param val1 Indexed value.
+ */
+ public Person1(int val1) {
+ this.val1 = val1;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal1() {
+ return val1;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val1 Value.
+ */
+ public void setVal1(int val1) {
+ this.val1 = val1;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean equals(Object o) {
+ return this == o || (o instanceof Person1) && val1 == ((Person1)o).val1;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ return val1;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return "IndexedValue1 [val1=" + val1 + ']';
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java
new file mode 100644
index 0000000..3b1cb9e
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person2.java
@@ -0,0 +1,104 @@
+/*
+ * 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.model;
+
+import org.apache.ignite.cache.query.annotations.*;
+
+import java.io.*;
+
+/**
+ * Value used for indexed put test.
+ */
+public class Person2 implements Serializable {
+ /** Value 1. */
+ @QuerySqlField(index = true)
+ private int val1;
+
+ /** Value 2. */
+ @QuerySqlField(index = true)
+ private int val2;
+
+ /**
+ * Empty constructor.
+ */
+ public Person2() {
+ // No-op.
+ }
+
+ /**
+ * Constructs.
+ */
+ public Person2(int val1, int val2) {
+ this.val1 = val1;
+ this.val2 = val2;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal1() {
+ return val1;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val1 Value.
+ */
+ public void setVal1(int val1) {
+ this.val1 = val1;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal2() {
+ return val2;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val2 Value.
+ */
+ public void setVal2(int val2) {
+ this.val2 = val2;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ Person2 value2 = (Person2)o;
+
+ return val1 == value2.val1 && val2 == value2.val2;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ return 31 * val1 + val2;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return "IndexedValue2 [val1=" + val1 + ", val2=" + val2 + ']';
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/946b08ba/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java
new file mode 100644
index 0000000..b8e3f7c
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person8.java
@@ -0,0 +1,242 @@
+/*
+ * 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.model;
+
+import org.apache.ignite.cache.query.annotations.*;
+
+import java.io.*;
+
+/**
+ * Value used for indexed put test.
+ */
+public class Person8 implements Serializable {
+ /** Value 1. */
+ @QuerySqlField(index = true)
+ private int val1;
+
+ /** Value 2. */
+ @QuerySqlField(index = true)
+ private int val2;
+
+ /** Value 3. */
+ @QuerySqlField(index = true)
+ private int val3;
+
+ /** Value 4. */
+ @QuerySqlField(index = true)
+ private int val4;
+
+ /** Value 5. */
+ @QuerySqlField(index = true)
+ private int val5;
+
+ /** Value 6. */
+ @QuerySqlField(index = true)
+ private int val6;
+
+ /** Value 7. */
+ @QuerySqlField(index = true)
+ private int val7;
+
+ /** Value 8. */
+ @QuerySqlField(index = true)
+ private int val8;
+
+ /**
+ * Empty constructor.
+ */
+ public Person8() {
+ // No-op.
+ }
+
+ /**
+ * Constructs.
+ */
+ public Person8(int val1, int val2, int val3, int val4, int val5, int val6, int val7, int val8) {
+ this.val1 = val1;
+ this.val2 = val2;
+ this.val3 = val3;
+ this.val4 = val4;
+ this.val5 = val5;
+ this.val6 = val6;
+ this.val7 = val7;
+ this.val8 = val8;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal1() {
+ return val1;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val1 Value.
+ */
+ public void setVal1(int val1) {
+ this.val1 = val1;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal2() {
+ return val2;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val2 Value.
+ */
+ public void setVal2(int val2) {
+ this.val2 = val2;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal3() {
+ return val3;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val3 Value.
+ */
+ public void setVal3(int val3) {
+ this.val3 = val3;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal4() {
+ return val4;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val4 Value.
+ */
+ public void setVal4(int val4) {
+ this.val4 = val4;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal5() {
+ return val5;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val5 Value.
+ */
+ public void setVal5(int val5) {
+ this.val5 = val5;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal6() {
+ return val6;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val6 Value.
+ */
+ public void setVal6(int val6) {
+ this.val6 = val6;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal7() {
+ return val7;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val7 Value.
+ */
+ public void setVal7(int val7) {
+ this.val7 = val7;
+ }
+
+ /**
+ * @return Get value.
+ */
+ public int getVal8() {
+ return val8;
+ }
+
+ /**
+ * Set value.
+ *
+ * @param val8 Value.
+ */
+ public void setVal8(int val8) {
+ this.val8 = val8;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ Person8 p8 = (Person8)o;
+
+ return val1 == p8.val1 && val2 == p8.val2 && val3 == p8.val3 && val4 == p8.val4
+ && val5 == p8.val5 && val6 == p8.val6 && val7 == p8.val7 && val8 == p8.val8;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ int result = val1;
+
+ result = 31 * result + val2;
+ result = 31 * result + val3;
+ result = 31 * result + val4;
+ result = 31 * result + val5;
+ result = 31 * result + val6;
+ result = 31 * result + val7;
+ result = 31 * result + val8;
+
+ return result;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return "Person8 [val1=" + val1 + ", val2=" + val2 + ", val3=" + val3 + ", val4=" + val4 + ", val5=" + val5 +
+ ", val6=" + val6 + ", val7=" + val7 + ", val8=" + val8 +']';
+ }
+}
[17/50] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b87f1385
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b87f1385
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b87f1385
Branch: refs/heads/ignite-gg-10052
Commit: b87f1385dc0cdc323bdea0b304d7d92e6ac5b653
Parents: f9fe999 4ff352f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jul 6 16:56:36 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jul 6 16:56:36 2015 +0300
----------------------------------------------------------------------
assembly/dependencies-fabric.xml | 1 +
bin/ignite.bat | 8 +-
bin/ignite.sh | 6 +-
bin/include/parseargs.bat | 1 +
bin/include/parseargs.sh | 3 +
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
.../ClientAbstractConnectivitySelfTest.java | 4 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 6 +-
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../org/apache/ignite/cluster/ClusterGroup.java | 18 +-
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../configuration/CacheConfiguration.java | 105 +--
.../configuration/IgniteReflectionFactory.java | 81 +-
.../configuration/NearCacheConfiguration.java | 10 +-
.../ignite/internal/GridKernalContextImpl.java | 5 +-
.../apache/ignite/internal/IgniteKernal.java | 1 -
.../internal/cluster/ClusterGroupAdapter.java | 50 +-
.../cluster/IgniteClusterAsyncImpl.java | 12 +-
.../internal/interop/InteropIgnition.java | 31 +-
.../managers/communication/GridIoManager.java | 173 ++--
.../managers/communication/GridIoMessage.java | 15 +-
.../managers/communication/GridIoPolicy.java | 32 +-
.../discovery/GridDiscoveryManager.java | 32 +-
.../eventstorage/GridEventStorageManager.java | 2 +-
.../processors/cache/CacheOperationContext.java | 44 +-
.../internal/processors/cache/CacheType.java | 8 +-
.../processors/cache/GridCacheAdapter.java | 91 ++-
.../processors/cache/GridCacheAtomicFuture.java | 12 +-
.../processors/cache/GridCacheContext.java | 6 +-
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheIoManager.java | 12 +-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../GridCachePartitionExchangeManager.java | 6 +-
.../processors/cache/GridCacheProcessor.java | 62 +-
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/GridCacheSwapManager.java | 257 +++---
.../processors/cache/GridCacheUtils.java | 42 +
.../processors/cache/IgniteCacheFutureImpl.java | 42 +
.../processors/cache/IgniteCacheProxy.java | 38 +-
.../GridDistributedTxFinishRequest.java | 11 +-
.../GridDistributedTxPrepareRequest.java | 9 +-
.../GridDistributedTxRemoteAdapter.java | 3 +-
.../distributed/dht/GridDhtLocalPartition.java | 3 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 3 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 3 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 5 +-
.../dht/atomic/GridDhtAtomicCache.java | 27 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 15 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 177 ++++-
.../GridDhtPartitionsExchangeFuture.java | 46 +-
.../near/GridNearTxFinishRequest.java | 3 +-
.../cache/distributed/near/GridNearTxLocal.java | 3 +-
.../distributed/near/GridNearTxRemote.java | 5 +-
.../cache/transactions/IgniteInternalTx.java | 3 +-
.../cache/transactions/IgniteTxAdapter.java | 11 +-
.../transactions/IgniteTxLocalAdapter.java | 3 +-
.../processors/clock/GridClockServer.java | 21 +-
.../datastructures/DataStructuresProcessor.java | 64 +-
.../datastructures/GridCacheAtomicLongImpl.java | 25 +-
.../GridCacheAtomicSequenceImpl.java | 11 +-
.../GridCacheAtomicStampedImpl.java | 21 +-
.../GridCacheCountDownLatchImpl.java | 16 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../internal/processors/igfs/IgfsContext.java | 5 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../plugin/IgnitePluginProcessor.java | 3 +-
.../processors/rest/GridRestProcessor.java | 4 +-
.../handlers/task/GridTaskCommandHandler.java | 12 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../processors/task/GridTaskWorker.java | 4 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../ignite/internal/util/IgniteUtils.java | 12 +-
.../internal/util/future/IgniteFutureImpl.java | 18 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../util/nio/GridNioMessageTracker.java | 23 +-
.../apache/ignite/internal/visor/VisorJob.java | 2 +
.../internal/visor/log/VisorLogSearchTask.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 4 +
.../visor/query/VisorQueryCleanupTask.java | 14 +
.../util/VisorClusterGroupEmptyException.java | 37 +
.../plugin/extensions/communication/IoPool.java | 42 +
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 156 ++--
.../ignite/spi/discovery/tcp/ServerImpl.java | 110 ++-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 3 +-
.../TcpDiscoveryMulticastIpFinder.java | 76 +-
.../startup/cmdline/CommandLineStartup.java | 3 +-
.../startup/cmdline/CommandLineTransformer.java | 9 +
.../core/src/main/resources/ignite.properties | 2 +-
.../core/src/test/config/spark/spark-config.xml | 46 ++
modules/core/src/test/config/tests.properties | 6 +-
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../internal/ClusterGroupHostsSelfTest.java | 141 ++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridDiscoveryEventSelfTest.java | 12 +-
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 2 +-
.../GridTaskFailoverAffinityRunTest.java | 170 ++++
.../communication/GridIoManagerSelfTest.java | 2 +-
.../IgniteTopologyPrintFormatSelfTest.java | 289 +++++++
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../cache/GridCacheAbstractSelfTest.java | 2 +-
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ---
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
.../cache/IgniteInternalCacheTypesTest.java | 3 +-
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
...ridCachePartitionNotLoadedEventSelfTest.java | 82 ++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 2 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
.../IgniteCachePutRetryAbstractSelfTest.java | 147 ++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 +
...gniteCachePutRetryTransactionalSelfTest.java | 74 ++
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
.../GridCachePartitionedFailoverSelfTest.java | 5 +
...achePartitionedMultiNodeFullApiSelfTest.java | 53 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
...acheAtomicReplicatedNodeRestartSelfTest.java | 10 +
.../GridCacheEvictionFilterSelfTest.java | 2 -
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../GridP2PContinuousDeploymentSelfTest.java | 2 -
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++-
.../TcpDiscoveryNodeConsistentIdSelfTest.java | 80 ++
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 7 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../IgniteCacheFailoverTestSuite.java | 3 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 4 +-
.../testsuites/IgniteCacheTestSuite3.java | 1 -
.../testsuites/IgniteCacheTestSuite4.java | 8 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
.../testsuites/IgniteKernalSelfTestSuite.java | 1 +
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
modules/core/src/test/resources/helloworld.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/readme.txt | 6 -
modules/docker/Dockerfile | 55 ++
modules/docker/README.txt | 11 +
modules/docker/build_users_libs.sh | 39 +
modules/docker/download_ignite.sh | 49 ++
modules/docker/execute.sh | 62 ++
modules/docker/run.sh | 34 +
modules/extdata/p2p/pom.xml | 4 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
modules/extdata/uri/META-INF/ignite.xml | 38 +
.../extdata/uri/modules/uri-dependency/pom.xml | 42 +
.../deployment/uri/tasks/GarHelloWorldBean.java | 60 ++
.../src/main/resources/gar-example.properties | 18 +
modules/extdata/uri/pom.xml | 62 +-
.../deployment/uri/tasks/GarHelloWorldTask.java | 81 ++
.../deployment/uri/tasks/gar-spring-bean.xml | 29 +
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 80 +-
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 8 +-
.../processors/query/h2/opt/GridH2Table.java | 2 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 2 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 4 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 5 +
.../IgniteCacheQuerySelfTestSuite.java | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/kafka/pom.xml | 116 +++
.../ignite/stream/kafka/KafkaStreamer.java | 220 ++++++
.../kafka/IgniteKafkaStreamerSelfTestSuite.java | 37 +
.../stream/kafka/KafkaEmbeddedBroker.java | 378 +++++++++
.../kafka/KafkaIgniteStreamerSelfTest.java | 227 ++++++
.../ignite/stream/kafka/SimplePartitioner.java | 53 ++
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 3 +-
modules/rest-http/pom.xml | 14 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
.../ignite/schema/model/PojoDescriptor.java | 2 +
.../apache/ignite/schema/model/PojoField.java | 1 +
.../parser/dialect/OracleMetadataDialect.java | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
.../org/apache/ignite/spark/IgniteContext.scala | 50 +-
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +
modules/spring/pom.xml | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 72 +-
.../IgniteExcludeInConfigurationTest.java | 78 ++
.../org/apache/ignite/spring/sprint-exclude.xml | 57 ++
.../testsuites/IgniteSpringTestSuite.java | 2 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 10 +-
.../GridTaskUriDeploymentDeadlockSelfTest.java | 13 +-
.../ignite/p2p/GridP2PDisabledSelfTest.java | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../ignite/visor/commands/VisorConsole.scala | 3 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
.../visor/commands/open/VisorOpenCommand.scala | 319 ++++++++
.../scala/org/apache/ignite/visor/visor.scala | 230 +-----
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +
.../commands/kill/VisorKillCommandSpec.scala | 1 +
.../commands/start/VisorStartCommandSpec.scala | 1 +
.../commands/tasks/VisorTasksCommandSpec.scala | 1 +
.../commands/vvm/VisorVvmCommandSpec.scala | 1 +
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 6 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 1 +
pom.xml | 15 +-
scripts/git-patch-prop.sh | 2 +-
259 files changed, 8315 insertions(+), 2609 deletions(-)
----------------------------------------------------------------------
[08/50] incubator-ignite git commit: # IGNITE-591 Comment broken test
Posted by sb...@apache.org.
# IGNITE-591 Comment broken test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e54f5729
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e54f5729
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e54f5729
Branch: refs/heads/ignite-gg-10052
Commit: e54f5729b710c04d4a72b2ffabcc5c08cf21aaa2
Parents: 006209c
Author: sevdokimov <se...@jetbrains.com>
Authored: Sat Jul 4 17:34:58 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sat Jul 4 17:34:58 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheJtaSelfTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e54f5729/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index 29836ef..7302f7e 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -193,7 +193,12 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
assertEquals(1, (int)cache2.get("key"));
}
+ /**
+ *
+ */
public void testUncompatibleTmLookup() {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1094");
+
final IgniteEx ignite = grid(0);
final CacheConfiguration cacheCfg = new CacheConfiguration();
[48/50] incubator-ignite git commit: # Fixed unmarshalling error
handling for cache 'get'
Posted by sb...@apache.org.
# Fixed unmarshalling error handling for cache 'get'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6d6ec778
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6d6ec778
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6d6ec778
Branch: refs/heads/ignite-gg-10052
Commit: 6d6ec778b43d730dd19001011aaaa49ec86c5d20
Parents: 94a42a4
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jul 8 15:08:33 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jul 8 15:08:33 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheIoManager.java | 8 ++-
.../distributed/near/GridNearGetFuture.java | 4 +-
.../cache/CacheFutureExceptionSelfTest.java | 72 +++++++++++++++++---
3 files changed, 71 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 0707096..29e3551 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -445,8 +445,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
case 50: {
GridNearGetResponse res = (GridNearGetResponse)msg;
- GridPartitionedGetFuture fut = (GridPartitionedGetFuture)ctx.mvcc().future(
- res.version(), res.futureId());
+ GridCacheFuture fut = ctx.mvcc().future(res.version(), res.futureId());
if (fut == null) {
if (log.isDebugEnabled())
@@ -457,7 +456,10 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
res.error(res.classError());
- fut.onResult(nodeId, res);
+ if (fut instanceof GridNearGetFuture)
+ ((GridNearGetFuture)fut).onResult(nodeId, res);
+ else
+ ((GridPartitionedGetFuture)fut).onResult(nodeId, res);
}
break;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 74438bb..58f6fe5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -223,7 +223,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
* @param nodeId Sender.
* @param res Result.
*/
- void onResult(UUID nodeId, GridNearGetResponse res) {
+ public void onResult(UUID nodeId, GridNearGetResponse res) {
for (IgniteInternalFuture<Map<K, V>> fut : futures())
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -649,7 +649,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
if (log.isDebugEnabled())
log.debug("Got removed entry while processing get response (will not retry).");
}
- catch (IgniteCheckedException e) {
+ catch (Exception e) {
// Fail.
onDone(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
index 34d2daa..372c859 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
@@ -20,6 +20,9 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.apache.ignite.testframework.junits.common.*;
import javax.cache.*;
@@ -32,31 +35,82 @@ import static java.util.concurrent.TimeUnit.*;
* Cache future self test.
*/
public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
+ /** */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** */
+ private static volatile boolean fail;
+
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = new IgniteConfiguration();
+
cfg.setGridName(gridName);
+ TcpDiscoverySpi spi = new TcpDiscoverySpi();
+
+ spi.setIpFinder(IP_FINDER);
+
+ cfg.setDiscoverySpi(spi);
+
if (gridName.equals(getTestGridName(1)))
cfg.setClientMode(true);
return cfg;
}
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllGrids();
+ }
+
/**
* @throws Exception If failed.
*/
public void testAsyncCacheFuture() throws Exception {
- Ignite srv = startGrid(0);
+ startGrid(0);
+
+ startGrid(1);
+
+ testGet(false, false);
+
+ testGet(false, true);
+
+ testGet(true, false);
+
+ testGet(true, true);
+ }
+
+ /**
+ * @param nearCache If {@code true} creates near cache on client.
+ * @param cpyOnRead Cache copy on read flag.
+ * @throws Exception If failed.
+ */
+ private void testGet(boolean nearCache, boolean cpyOnRead) throws Exception {
+ fail = false;
+
+ Ignite srv = grid(0);
+
+ Ignite client = grid(1);
+
+ final String cacheName = nearCache ? ("NEAR-CACHE-" + cpyOnRead) : ("CACHE-" + cpyOnRead);
+
+ CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+
+ ccfg.setCopyOnRead(cpyOnRead);
+
+ ccfg.setName(cacheName);
+
+ IgniteCache<Object, Object> cache = srv.createCache(ccfg);
- IgniteCache<String, NotSerializableClass> cache = srv.getOrCreateCache("CACHE");
cache.put("key", new NotSerializableClass());
- Ignite client = startGrid(1);
+ IgniteCache<Object, Object> clientCache = nearCache ? client.createNearCache(cacheName,
+ new NearCacheConfiguration<>()) : client.cache(cacheName);
- IgniteCache<String, NotSerializableClass> asyncCache = client.<String, NotSerializableClass>cache("CACHE").withAsync();
+ IgniteCache<Object, Object> asyncCache = clientCache.withAsync();
- System.setProperty("FAIL", "true");
+ fail = true;
asyncCache.get("key");
@@ -79,7 +133,9 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
}
});
- assertTrue(futLatch.await(60, SECONDS));
+ assertTrue(futLatch.await(5, SECONDS));
+
+ srv.destroyCache(cache.getName());
}
/**
@@ -93,10 +149,10 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc}*/
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- if (System.getProperty("FAIL") != null)
+ if (fail)
throw new RuntimeException("Deserialization failed.");
in.readObject();
}
}
-}
\ No newline at end of file
+}
\ No newline at end of file
[37/50] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9a51cdf8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9a51cdf8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9a51cdf8
Branch: refs/heads/ignite-gg-10052
Commit: 9a51cdf8d051dd0a6c0159fe1a2bc4bf56201da7
Parents: bc29797 0f1b31a
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Tue Jul 7 19:09:30 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Tue Jul 7 19:09:30 2015 -0700
----------------------------------------------------------------------
dev-tools/slurp.sh | 2 +-
.../internal/interop/InteropIgnition.java | 17 +-
.../internal/interop/InteropProcessor.java | 7 +
.../cache/query/GridCacheQueryAdapter.java | 35 ++++-
.../processors/query/GridQueryProcessor.java | 5 +
.../CacheAbstractQueryMetricsSelfTest.java | 157 ++++++++++++++++++-
.../cache/CacheLocalQueryMetricsSelfTest.java | 33 ++++
...titionedQueryMetricsDistributedSelfTest.java | 33 ++++
...chePartitionedQueryMetricsLocalSelfTest.java | 33 ++++
.../CachePartitionedQueryMetricsSelfTest.java | 32 ----
...plicatedQueryMetricsDistributedSelfTest.java | 33 ++++
...acheReplicatedQueryMetricsLocalSelfTest.java | 33 ++++
.../CacheReplicatedQueryMetricsSelfTest.java | 32 ----
.../IgniteCacheQuerySelfTestSuite.java | 7 +-
scripts/git-patch-prop.sh | 2 +-
15 files changed, 386 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
[49/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-591'
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-591'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/23dc8fc8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/23dc8fc8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/23dc8fc8
Branch: refs/heads/ignite-gg-10052
Commit: 23dc8fc87352bdb38a0ff7d01dab048c22ceae77
Parents: 6d6ec77 cfeec2d
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Jul 8 15:57:06 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed Jul 8 15:57:06 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 4 ++
.../configuration/TransactionConfiguration.java | 23 +++++++
.../processors/cache/GridCacheAttributes.java | 3 +
.../processors/cache/GridCacheContext.java | 8 +--
.../processors/cache/GridCacheProcessor.java | 21 +++---
.../cache/GridCacheSharedContext.java | 15 +++-
.../cache/jta/CacheJtaManagerAdapter.java | 17 +++--
.../cache/jta/CacheNoopJtaManager.java | 2 +-
.../visor/cache/VisorCacheConfiguration.java | 11 ---
.../loadtests/hashmap/GridCacheTestContext.java | 4 +-
.../HibernateTransactionalDataRegion.java | 12 +++-
.../hibernate/HibernateL2CacheSelfTest.java | 7 +-
.../HibernateL2CacheTransactionalSelfTest.java | 5 --
.../apache/ignite/cache/jta/CacheTmLookup.java | 3 +-
.../processors/cache/jta/CacheJtaManager.java | 72 ++++++++++++++++++--
.../cache/jta/GridCacheXAResource.java | 16 ++---
.../processors/cache/GridCacheJtaSelfTest.java | 52 ++++++++++----
.../GridTmLookupLifecycleAwareSelfTest.java | 29 ++++++--
.../commands/cache/VisorCacheCommand.scala | 2 -
19 files changed, 211 insertions(+), 95 deletions(-)
----------------------------------------------------------------------
[14/50] incubator-ignite git commit: GG-10501: Fixed.
Posted by sb...@apache.org.
GG-10501: Fixed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2acacd98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2acacd98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2acacd98
Branch: refs/heads/ignite-gg-10052
Commit: 2acacd98c99210ac97ac2841f37268348e55c946
Parents: f72b291
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Jul 6 12:30:36 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Jul 6 12:30:36 2015 +0300
----------------------------------------------------------------------
.../internal/interop/InteropIgnition.java | 31 +++++++++++++-------
1 file changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2acacd98/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
index fb0d6e1..2989a17 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
@@ -50,24 +50,33 @@ public class InteropIgnition {
*/
public static synchronized InteropProcessor start(@Nullable String springCfgPath, @Nullable String gridName,
int factoryId, long envPtr, long dataPtr) {
- IgniteConfiguration cfg = configuration(springCfgPath);
+ ClassLoader oldClsLdr = Thread.currentThread().getContextClassLoader();
- if (gridName != null)
- cfg.setGridName(gridName);
- else
- gridName = cfg.getGridName();
+ Thread.currentThread().setContextClassLoader(InteropIgnition.class.getClassLoader());
+
+ try {
+ IgniteConfiguration cfg = configuration(springCfgPath);
- InteropBootstrap bootstrap = bootstrap(factoryId);
+ if (gridName != null)
+ cfg.setGridName(gridName);
+ else
+ gridName = cfg.getGridName();
- InteropProcessor proc = bootstrap.start(cfg, envPtr, dataPtr);
+ InteropBootstrap bootstrap = bootstrap(factoryId);
- trackFinalization(proc);
+ InteropProcessor proc = bootstrap.start(cfg, envPtr, dataPtr);
- InteropProcessor old = instances.put(gridName, proc);
+ trackFinalization(proc);
- assert old == null;
+ InteropProcessor old = instances.put(gridName, proc);
- return proc;
+ assert old == null;
+
+ return proc;
+ }
+ finally {
+ Thread.currentThread().setContextClassLoader(oldClsLdr);
+ }
}
/**
[06/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-7' into ignite-591
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-591
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b84fdaa5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b84fdaa5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b84fdaa5
Branch: refs/heads/ignite-gg-10052
Commit: b84fdaa508592ad9950fd17718301ae4be22953f
Parents: bb8dcf9 f72b291
Author: sevdokimov <se...@jetbrains.com>
Authored: Sat Jul 4 16:07:19 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sat Jul 4 16:07:19 2015 +0300
----------------------------------------------------------------------
assembly/dependencies-fabric.xml | 1 +
bin/ignite.bat | 8 +-
bin/ignite.sh | 6 +-
bin/include/parseargs.bat | 1 +
bin/include/parseargs.sh | 3 +
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/CacheConfiguration.java | 105 +++---
.../configuration/NearCacheConfiguration.java | 10 +-
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../apache/ignite/internal/IgniteKernal.java | 1 -
.../managers/communication/GridIoManager.java | 173 ++++++---
.../managers/communication/GridIoMessage.java | 15 +-
.../managers/communication/GridIoPolicy.java | 32 +-
.../discovery/GridDiscoveryManager.java | 32 +-
.../eventstorage/GridEventStorageManager.java | 2 +-
.../processors/cache/CacheOperationContext.java | 44 ++-
.../internal/processors/cache/CacheType.java | 8 +-
.../processors/cache/GridCacheAdapter.java | 91 +++--
.../processors/cache/GridCacheAtomicFuture.java | 12 +-
.../processors/cache/GridCacheContext.java | 4 +-
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheIoManager.java | 12 +-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../processors/cache/GridCacheProcessor.java | 62 ++-
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/GridCacheSwapManager.java | 257 ++++++++-----
.../processors/cache/GridCacheUtils.java | 42 +++
.../processors/cache/IgniteCacheFutureImpl.java | 42 +++
.../processors/cache/IgniteCacheProxy.java | 38 +-
.../GridDistributedTxFinishRequest.java | 11 +-
.../GridDistributedTxPrepareRequest.java | 9 +-
.../GridDistributedTxRemoteAdapter.java | 3 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 3 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 3 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 5 +-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 15 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 177 ++++++++-
.../near/GridNearTxFinishRequest.java | 3 +-
.../cache/distributed/near/GridNearTxLocal.java | 3 +-
.../distributed/near/GridNearTxRemote.java | 5 +-
.../cache/transactions/IgniteInternalTx.java | 3 +-
.../cache/transactions/IgniteTxAdapter.java | 11 +-
.../transactions/IgniteTxLocalAdapter.java | 3 +-
.../processors/clock/GridClockServer.java | 21 +-
.../datastructures/GridCacheAtomicLongImpl.java | 25 +-
.../GridCacheAtomicSequenceImpl.java | 11 +-
.../GridCacheAtomicStampedImpl.java | 21 +-
.../GridCacheCountDownLatchImpl.java | 16 +-
.../internal/processors/igfs/IgfsContext.java | 5 +-
.../plugin/IgnitePluginProcessor.java | 3 +-
.../internal/util/future/IgniteFutureImpl.java | 18 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../util/nio/GridNioMessageTracker.java | 23 +-
.../plugin/extensions/communication/IoPool.java | 42 +++
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 7 +-
.../TcpDiscoveryMulticastIpFinder.java | 76 +++-
.../startup/cmdline/CommandLineStartup.java | 3 +-
.../startup/cmdline/CommandLineTransformer.java | 9 +
.../core/src/main/resources/ignite.properties | 2 +-
.../core/src/test/config/spark/spark-config.xml | 46 +++
modules/core/src/test/config/tests.properties | 6 +-
.../communication/GridIoManagerSelfTest.java | 2 +-
.../IgniteTopologyPrintFormatSelfTest.java | 289 ++++++++++++++
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 ------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 ++++++++++
.../cache/IgniteInternalCacheTypesTest.java | 3 +-
.../IgniteCachePutRetryAbstractSelfTest.java | 147 ++++++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 ++
...gniteCachePutRetryTransactionalSelfTest.java | 74 ++++
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
.../GridCachePartitionedFailoverSelfTest.java | 5 +
.../GridCacheEvictionFilterSelfTest.java | 2 -
.../GridP2PContinuousDeploymentSelfTest.java | 2 -
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../IgniteCacheFailoverTestSuite.java | 3 +
.../testsuites/IgniteCacheTestSuite3.java | 1 -
.../testsuites/IgniteKernalSelfTestSuite.java | 1 +
modules/core/src/test/resources/helloworld.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/readme.txt | 6 -
modules/docker/Dockerfile | 55 +++
modules/docker/README.txt | 11 +
modules/docker/build_users_libs.sh | 39 ++
modules/docker/download_ignite.sh | 49 +++
modules/docker/execute.sh | 62 +++
modules/docker/run.sh | 34 ++
modules/extdata/p2p/pom.xml | 4 +-
modules/extdata/uri/META-INF/ignite.xml | 38 ++
.../extdata/uri/modules/uri-dependency/pom.xml | 42 +++
.../deployment/uri/tasks/GarHelloWorldBean.java | 60 +++
.../src/main/resources/gar-example.properties | 18 +
modules/extdata/uri/pom.xml | 62 ++-
.../deployment/uri/tasks/GarHelloWorldTask.java | 81 ++++
.../deployment/uri/tasks/gar-spring-bean.xml | 29 ++
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 8 +-
.../processors/query/h2/opt/GridH2Table.java | 2 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 2 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 4 +-
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 -
.../IgniteCacheQueryNodeRestartSelfTest2.java | 5 +
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/kafka/pom.xml | 116 ++++++
.../ignite/stream/kafka/KafkaStreamer.java | 220 +++++++++++
.../kafka/IgniteKafkaStreamerSelfTestSuite.java | 37 ++
.../stream/kafka/KafkaEmbeddedBroker.java | 378 +++++++++++++++++++
.../kafka/KafkaIgniteStreamerSelfTest.java | 227 +++++++++++
.../ignite/stream/kafka/SimplePartitioner.java | 53 +++
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
.../ignite/schema/model/PojoDescriptor.java | 2 +
.../apache/ignite/schema/model/PojoField.java | 1 +
.../parser/dialect/OracleMetadataDialect.java | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
.../org/apache/ignite/spark/IgniteContext.scala | 50 ++-
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +
modules/spring/pom.xml | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 72 +++-
.../IgniteExcludeInConfigurationTest.java | 78 ++++
.../org/apache/ignite/spring/sprint-exclude.xml | 57 +++
.../testsuites/IgniteSpringTestSuite.java | 2 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
.../GridTaskUriDeploymentDeadlockSelfTest.java | 13 +-
.../ignite/p2p/GridP2PDisabledSelfTest.java | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../ignite/visor/commands/VisorConsole.scala | 3 +-
.../visor/commands/open/VisorOpenCommand.scala | 319 ++++++++++++++++
.../scala/org/apache/ignite/visor/visor.scala | 230 +----------
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +
.../commands/kill/VisorKillCommandSpec.scala | 1 +
.../commands/start/VisorStartCommandSpec.scala | 1 +
.../commands/tasks/VisorTasksCommandSpec.scala | 1 +
.../commands/vvm/VisorVvmCommandSpec.scala | 1 +
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 15 +-
166 files changed, 4204 insertions(+), 929 deletions(-)
----------------------------------------------------------------------
[23/50] incubator-ignite git commit: #ignite-1101: Add test for cache
future runtime exception.
Posted by sb...@apache.org.
#ignite-1101: Add test for cache future runtime exception.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8c1ba5af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8c1ba5af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8c1ba5af
Branch: refs/heads/ignite-gg-10052
Commit: 8c1ba5afe37d1e9f38d99738874046076556915f
Parents: 96c9695
Author: ivasilinets <iv...@gridgain.com>
Authored: Tue Jul 7 13:40:11 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Tue Jul 7 13:40:11 2015 +0300
----------------------------------------------------------------------
.../cache/CacheFutureExceptionSelfTest.java | 171 +++++++++++++++++++
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
2 files changed, 172 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c1ba5af/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
new file mode 100644
index 0000000..27bfe17
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
@@ -0,0 +1,171 @@
+/*
+ * 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.configuration.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.*;
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+import static java.util.concurrent.TimeUnit.*;
+
+/**
+ * Cache future self test.
+ */
+public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = StartNode.createConfiguration();
+
+ cfg.setClientMode(true);
+
+ return cfg;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testAsyncCacheFuture() throws Exception {
+ final CountDownLatch readyLatch = new CountDownLatch(1);
+
+ GridJavaProcess node1 = null;
+
+ Collection<String> jvmArgs = Arrays.asList("-ea", "-DIGNITE_QUIET=false");
+
+ try {
+ node1 = GridJavaProcess.exec(
+ StartNode.class.getName(), null,
+ log,
+ new CI1<String>() {
+ @Override public void apply(String s) {
+ info("Server node1: " + s);
+
+ if (s.contains("Topology snapshot"))
+ readyLatch.countDown();
+ }
+ },
+ null,
+ jvmArgs,
+ null
+ );
+
+ assertTrue(readyLatch.await(60, SECONDS));
+
+ Ignite client = startGrid(0);
+
+ IgniteCache<String, NotSerializableClass> cache = client.getOrCreateCache("CACHE");
+
+ cache.put("key", new NotSerializableClass());
+
+ System.setProperty("FAIL", "true");
+
+ IgniteCache<String, NotSerializableClass> asyncCache = cache.withAsync();
+
+ asyncCache.get("key");
+
+ final CountDownLatch futLatch = new CountDownLatch(1);
+
+ asyncCache.future().listen(new IgniteInClosure<IgniteFuture<Object>>() {
+ @Override public void apply(IgniteFuture<Object> fut) {
+ assertTrue(fut.isDone());
+
+ try {
+ fut.get();
+
+ fail();
+ }
+ catch (CacheException e) {
+ log.info("Expected error: " + e);
+
+ futLatch.countDown();
+ }
+ }
+ });
+
+ assertTrue(futLatch.await(60, SECONDS));
+ }
+ finally {
+ if (node1 != null)
+ node1.killProcess();
+ }
+ }
+
+ /**
+ * Test class.
+ */
+ private static class NotSerializableClass implements Serializable {
+ /** {@inheritDoc}*/
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.writeObject(this);
+ }
+
+ /** {@inheritDoc}*/
+ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+ if (System.getProperty("FAIL") != null)
+ throw new RuntimeException("Deserialization failed.");
+
+ in.readObject();
+ }
+ }
+
+ /**
+ * Test class.
+ */
+ public static class StartNode {
+ /**
+ * @return Configuration.
+ */
+ public static IgniteConfiguration createConfiguration() {
+ IgniteConfiguration cfg = new IgniteConfiguration();
+
+ cfg.setPeerClassLoadingEnabled(true);
+
+ cfg.setLocalHost("127.0.0.1");
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinderCleanFrequency(1000);
+
+ TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
+
+ ipFinder.setAddresses(Collections.singletonList("127.0.0.1:47500..47509"));
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ return cfg;
+ }
+
+ /**
+ * @param args Main parameters.
+ */
+ public static void main(String[] args) {
+ Ignition.start(createConfiguration());
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c1ba5af/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 0a31f49..39702a3 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -132,6 +132,7 @@ public class IgniteCacheTestSuite extends TestSuite {
suite.addTestSuite(GridCacheObjectToStringSelfTest.class);
suite.addTestSuite(GridCacheLoadOnlyStoreAdapterSelfTest.class);
suite.addTestSuite(GridCacheGetStoreErrorSelfTest.class);
+ suite.addTestSuite(CacheFutureExceptionSelfTest.class);
suite.addTestSuite(GridCacheAsyncOperationsLimitSelfTest.class);
suite.addTestSuite(GridCacheTtlManagerSelfTest.class);
suite.addTestSuite(GridCacheLifecycleAwareSelfTest.class);
[15/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-7' into ignite-sprint-7
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-7' into ignite-sprint-7
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8fc9e4eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8fc9e4eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8fc9e4eb
Branch: refs/heads/ignite-gg-10052
Commit: 8fc9e4ebf391562686b4159fe52ab045fd47279a
Parents: 2acacd9 a577d27
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Jul 6 12:31:02 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Jul 6 12:31:02 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/IgniteUtils.java | 6 +-
...acheAtomicReplicatedNodeRestartSelfTest.java | 10 +++
.../TcpDiscoveryNodeConsistentIdSelfTest.java | 80 ++++++++++++++++++++
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +
4 files changed, 97 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[28/50] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/25c349f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/25c349f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/25c349f4
Branch: refs/heads/ignite-gg-10052
Commit: 25c349f47f70c9824c8d4ba9c4ee679ff597051e
Parents: 5dc2d2b 9d0aa6f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 16:01:47 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 16:01:47 2015 +0300
----------------------------------------------------------------------
.../cache/eviction/fifo/FifoEvictionPolicy.java | 5 -----
.../cache/eviction/lru/LruEvictionPolicy.java | 5 -----
.../eviction/sorted/SortedEvictionPolicy.java | 19 +++++--------------
...cheConcurrentEvictionConsistencySelfTest.java | 15 +++++++++++++--
4 files changed, 18 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
[33/50] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4f46ee88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4f46ee88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4f46ee88
Branch: refs/heads/ignite-gg-10052
Commit: 4f46ee886d4b1a40c71d0cbdab273b9eb38e3717
Parents: c04cba9 6ed5c1c
Author: agura <ag...@gridgain.com>
Authored: Tue Jul 7 19:29:18 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Tue Jul 7 19:29:18 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/interop/InteropIgnition.java | 17 ++++++++++++++++-
.../ignite/internal/interop/InteropProcessor.java | 7 +++++++
2 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[19/50] incubator-ignite git commit: minor fix
Posted by sb...@apache.org.
minor fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7b3cdc85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7b3cdc85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7b3cdc85
Branch: refs/heads/ignite-gg-10052
Commit: 7b3cdc852893cb78e7a92daf4e68a2cca053f735
Parents: 3c4499c
Author: Anton <av...@gridgain.com>
Authored: Mon Jul 6 20:25:22 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Mon Jul 6 20:25:22 2015 +0300
----------------------------------------------------------------------
parent/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b3cdc85/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 3ec880e..bfa9f62 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -41,7 +41,7 @@
<maven.build.timestamp.format>MMMM d yyyy</maven.build.timestamp.format>
<doxygen.exec>doxygen</doxygen.exec>
<git.exec>git</git.exec>
- <jetty.version>9.0.5.v20130815</jetty.version>
+ <jetty.version>9.2.11.v20150529</jetty.version>
</properties>
<groupId>org.apache.ignite</groupId>
[50/50] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10052
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10052
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/89be5f7d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/89be5f7d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/89be5f7d
Branch: refs/heads/ignite-gg-10052
Commit: 89be5f7de91b13b4a69cb1370077d984d546c058
Parents: 1cda3b1 23dc8fc
Author: iveselovskiy <iv...@gridgain.com>
Authored: Wed Jul 8 16:30:24 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Wed Jul 8 16:30:24 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 4 +
.../configuration/TransactionConfiguration.java | 23 +++
.../processors/cache/GridCacheAttributes.java | 3 +
.../processors/cache/GridCacheContext.java | 8 +-
.../processors/cache/GridCacheIoManager.java | 8 +-
.../processors/cache/GridCacheProcessor.java | 21 +-
.../cache/GridCacheSharedContext.java | 15 +-
.../distributed/near/GridNearGetFuture.java | 4 +-
.../cache/jta/CacheJtaManagerAdapter.java | 17 +-
.../cache/jta/CacheNoopJtaManager.java | 2 +-
.../visor/cache/VisorCacheConfiguration.java | 11 -
.../ignite/spi/discovery/tcp/ServerImpl.java | 20 ++
.../tcp/internal/TcpDiscoveryNode.java | 2 +-
.../tcp/internal/TcpDiscoveryNodesRing.java | 8 +-
.../tcp/internal/TcpDiscoveryStatistics.java | 10 +-
.../cache/CacheFutureExceptionSelfTest.java | 161 +++++++--------
...acheAtomicReplicatedNodeRestartSelfTest.java | 8 +-
.../loadtests/hashmap/GridCacheTestContext.java | 4 +-
.../tcp/TcpDiscoveryMultiThreadedTest.java | 38 ++++
.../IgniteSpiDiscoverySelfTestSuite.java | 3 +
.../HibernateTransactionalDataRegion.java | 12 +-
.../hibernate/HibernateL2CacheSelfTest.java | 7 +-
.../HibernateL2CacheTransactionalSelfTest.java | 5 -
.../apache/ignite/cache/jta/CacheTmLookup.java | 3 +-
.../processors/cache/jta/CacheJtaManager.java | 72 ++++++-
.../cache/jta/GridCacheXAResource.java | 16 +-
.../processors/cache/GridCacheJtaSelfTest.java | 52 +++--
.../GridTmLookupLifecycleAwareSelfTest.java | 29 ++-
modules/kafka/licenses/apache-2.0.txt | 202 +++++++++++++++++++
.../commands/cache/VisorCacheCommand.scala | 2 -
.../config/benchmark-put-indexed-val.properties | 64 ++++++
modules/yardstick/config/ignite-base-config.xml | 23 +++
.../cache/IgnitePutIndexedValue1Benchmark.java | 42 ++++
.../cache/IgnitePutIndexedValue2Benchmark.java | 42 ++++
.../cache/IgnitePutIndexedValue8Benchmark.java | 42 ++++
.../ignite/yardstick/cache/model/Person1.java | 55 +++++
.../ignite/yardstick/cache/model/Person2.java | 67 ++++++
.../ignite/yardstick/cache/model/Person8.java | 109 ++++++++++
38 files changed, 1019 insertions(+), 195 deletions(-)
----------------------------------------------------------------------
[10/50] incubator-ignite git commit: disable failing test
Posted by sb...@apache.org.
disable failing test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b1342ba1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b1342ba1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b1342ba1
Branch: refs/heads/ignite-gg-10052
Commit: b1342ba19078bd8f742d4d1d605bd9ccc19c82b5
Parents: 334fee9
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Jul 6 10:30:23 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Jul 6 10:30:23 2015 +0300
----------------------------------------------------------------------
.../IgniteCacheAtomicReplicatedNodeRestartSelfTest.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b1342ba1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
index 52d8871..c802d7c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
@@ -27,7 +27,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
public class IgniteCacheAtomicReplicatedNodeRestartSelfTest extends GridCacheReplicatedNodeRestartSelfTest {
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-747");
+ //fail("https://issues.apache.org/jira/browse/IGNITE-747");
}
/** {@inheritDoc} */
@@ -36,6 +36,11 @@ public class IgniteCacheAtomicReplicatedNodeRestartSelfTest extends GridCacheRep
}
/** {@inheritDoc} */
+ @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1095");
+ }
+
+ /** {@inheritDoc} */
@Override protected CacheAtomicityMode atomicityMode() {
return ATOMIC;
}
[07/50] incubator-ignite git commit: # IGNITE-591 Deprecate
CacheConfiguration.transactionLookupClassName,
create TransactionConfiguration.txLookupClassName instead.
Posted by sb...@apache.org.
# IGNITE-591 Deprecate CacheConfiguration.transactionLookupClassName, create TransactionConfiguration.txLookupClassName instead.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/006209c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/006209c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/006209c6
Branch: refs/heads/ignite-gg-10052
Commit: 006209c6f4dff212c3aa7b48acb3bca9b303d5f8
Parents: b84fdaa
Author: sevdokimov <se...@jetbrains.com>
Authored: Sat Jul 4 17:09:48 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sat Jul 4 17:09:48 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 4 +
.../configuration/TransactionConfiguration.java | 23 +++
.../processors/cache/GridCacheAttributes.java | 3 +
.../processors/cache/GridCacheContext.java | 7 +-
.../processors/cache/GridCacheProcessor.java | 21 +--
.../cache/GridCacheSharedContext.java | 15 +-
.../cache/jta/CacheJtaManagerAdapter.java | 17 +-
.../cache/jta/CacheNoopJtaManager.java | 2 +-
.../visor/cache/VisorCacheConfiguration.java | 11 --
.../loadtests/hashmap/GridCacheTestContext.java | 5 +-
.../HibernateTransactionalDataRegion.java | 12 +-
.../apache/ignite/cache/jta/CacheTmLookup.java | 3 +-
.../processors/cache/jta/CacheJtaManager.java | 167 +++++++++++--------
.../processors/cache/GridCacheJtaSelfTest.java | 43 ++++-
.../GridTmLookupLifecycleAwareSelfTest.java | 30 +++-
.../commands/cache/VisorCacheCommand.scala | 2 -
16 files changed, 234 insertions(+), 131 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index e2308f2..63c7269 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -967,7 +967,9 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* Gets class name of transaction manager finder for integration for JEE app servers.
*
* @return Transaction manager finder.
+ * @deprecated Use {@link TransactionConfiguration#getTxManagerLookupClassName()} instead.
*/
+ @Deprecated
public String getTransactionManagerLookupClassName() {
return tmLookupClsName;
}
@@ -978,7 +980,9 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* @param tmLookupClsName Name of class implementing GridCacheTmLookup interface that is used to
* receive JTA transaction manager.
* @return {@code this} for chaining.
+ * @deprecated Use {@link TransactionConfiguration#setTxManagerLookupClassName(String)} instead.
*/
+ @Deprecated
public CacheConfiguration<K, V> setTransactionManagerLookupClassName(String tmLookupClsName) {
this.tmLookupClsName = tmLookupClsName;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
index 9a4114b..5fed59f 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
@@ -61,6 +61,9 @@ public class TransactionConfiguration implements Serializable {
/** Pessimistic tx log linger. */
private int pessimisticTxLogLinger = DFLT_PESSIMISTIC_TX_LOG_LINGER;
+ /** Name of class implementing GridCacheTmLookup. */
+ private String tmLookupClsName;
+
/**
* Empty constructor.
*/
@@ -78,6 +81,7 @@ public class TransactionConfiguration implements Serializable {
pessimisticTxLogLinger = cfg.getPessimisticTxLogLinger();
pessimisticTxLogSize = cfg.getPessimisticTxLogSize();
txSerEnabled = cfg.isTxSerializableEnabled();
+ tmLookupClsName = cfg.getTxManagerLookupClassName();
}
/**
@@ -202,4 +206,23 @@ public class TransactionConfiguration implements Serializable {
public void setPessimisticTxLogLinger(int pessimisticTxLogLinger) {
this.pessimisticTxLogLinger = pessimisticTxLogLinger;
}
+
+ /**
+ * Gets class name of transaction manager finder for integration for JEE app servers.
+ *
+ * @return Transaction manager finder.
+ */
+ public String getTxManagerLookupClassName() {
+ return tmLookupClsName;
+ }
+
+ /**
+ * Sets look up mechanism for available {@code TransactionManager} implementation, if any.
+ *
+ * @param tmLookupClsName Name of class implementing GridCacheTmLookup interface that is used to
+ * receive JTA transaction manager.
+ */
+ public void setTxManagerLookupClassName(String tmLookupClsName) {
+ this.tmLookupClsName = tmLookupClsName;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
index 755b89a..78c4722 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
@@ -186,7 +186,10 @@ public class GridCacheAttributes implements Serializable {
/**
* @return Transaction manager lookup class name.
+ * @deprecated Transaction manager lookup must be configured in
+ * {@link TransactionConfiguration#getTxManagerLookupClassName()}.
*/
+ @Deprecated
public String transactionManagerLookupClassName() {
return ccfg.getTransactionManagerLookupClassName();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 580e452..c454da9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -133,9 +133,6 @@ public class GridCacheContext<K, V> implements Externalizable {
/** Replication manager. */
private GridCacheDrManager drMgr;
- /** JTA manager. */
- private CacheJtaManagerAdapter jtaMgr;
-
/** Conflict resolver manager. */
private CacheConflictResolutionManager rslvrMgr;
@@ -251,7 +248,6 @@ public class GridCacheContext<K, V> implements Externalizable {
CacheDataStructuresManager dataStructuresMgr,
GridCacheTtlManager ttlMgr,
GridCacheDrManager drMgr,
- CacheJtaManagerAdapter jtaMgr,
CacheConflictResolutionManager<K, V> rslvrMgr,
CachePluginManager pluginMgr
) {
@@ -292,7 +288,6 @@ public class GridCacheContext<K, V> implements Externalizable {
this.dataStructuresMgr = add(dataStructuresMgr);
this.ttlMgr = add(ttlMgr);
this.drMgr = add(drMgr);
- this.jtaMgr = add(jtaMgr);
this.rslvrMgr = add(rslvrMgr);
this.pluginMgr = add(pluginMgr);
@@ -1018,7 +1013,7 @@ public class GridCacheContext<K, V> implements Externalizable {
* @return JTA manager.
*/
public CacheJtaManagerAdapter jta() {
- return jtaMgr;
+ return sharedCtx.jta();
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 8124594..1acb351 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -495,7 +495,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cleanup(cfg, cfg.getEvictionPolicy(), false);
cleanup(cfg, cfg.getAffinity(), false);
cleanup(cfg, cfg.getAffinityMapper(), false);
- cleanup(cfg, cctx.jta().tmLookup(), false);
cleanup(cfg, cctx.store().configuredStore(), false);
NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
@@ -1001,8 +1000,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
ctx.kernalContext().query().onCacheStop(ctx);
ctx.kernalContext().continuous().onCacheStop(ctx);
- U.stopLifecycleAware(log, lifecycleAwares(cache.configuration(), ctx.jta().tmLookup(),
- ctx.store().configuredStore()));
+ U.stopLifecycleAware(log, lifecycleAwares(cache.configuration(), ctx.store().configuredStore()));
if (log.isInfoEnabled())
log.info("Stopped cache: " + cache.name());
@@ -1120,9 +1118,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
pluginMgr.validate();
- CacheJtaManagerAdapter jta = JTA.create(cfg.getTransactionManagerLookupClassName() == null);
-
- jta.createTmLookup(cfg);
+ sharedCtx.jta().registerCache(cfg);
// Skip suggestions for internal caches.
if (cacheType.userCache())
@@ -1130,8 +1126,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
Collection<Object> toPrepare = new ArrayList<>();
- toPrepare.add(jta.tmLookup());
-
if (cfgStore instanceof GridCacheLoaderWriterStore) {
toPrepare.add(((GridCacheLoaderWriterStore)cfgStore).loader());
toPrepare.add(((GridCacheLoaderWriterStore)cfgStore).writer());
@@ -1141,7 +1135,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
prepare(cfg, toPrepare);
- U.startLifecycleAware(lifecycleAwares(cfg, jta.tmLookup(), cfgStore));
+ U.startLifecycleAware(lifecycleAwares(cfg, cfgStore));
GridCacheAffinityManager affMgr = new GridCacheAffinityManager();
GridCacheEventManager evtMgr = new GridCacheEventManager();
@@ -1181,7 +1175,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
dataStructuresMgr,
ttlMgr,
drMgr,
- jta,
rslvrMgr,
pluginMgr
);
@@ -1311,7 +1304,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
dataStructuresMgr,
ttlMgr,
drMgr,
- jta,
rslvrMgr,
pluginMgr
);
@@ -1632,7 +1624,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
*/
@SuppressWarnings("unchecked")
private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx,
- Collection<CacheStoreSessionListener> storeSesLsnrs) {
+ Collection<CacheStoreSessionListener> storeSesLsnrs) throws IgniteCheckedException {
IgniteTxManager tm = new IgniteTxManager();
GridCacheMvccManager mvccMgr = new GridCacheMvccManager();
GridCacheVersionManager verMgr = new GridCacheVersionManager();
@@ -1640,6 +1632,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
GridCachePartitionExchangeManager exchMgr = new GridCachePartitionExchangeManager();
GridCacheIoManager ioMgr = new GridCacheIoManager();
+ CacheJtaManagerAdapter jta = JTA.createOptional();
+
return new GridCacheSharedContext(
kernalCtx,
tm,
@@ -1648,7 +1642,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
depMgr,
exchMgr,
ioMgr,
- storeSesLsnrs
+ storeSesLsnrs,
+ jta
);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index 1071ef2..7f4daff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.managers.deployment.*;
import org.apache.ignite.internal.managers.discovery.*;
import org.apache.ignite.internal.managers.eventstorage.*;
import org.apache.ignite.internal.processors.affinity.*;
+import org.apache.ignite.internal.processors.cache.jta.*;
import org.apache.ignite.internal.processors.cache.store.*;
import org.apache.ignite.internal.processors.cache.transactions.*;
import org.apache.ignite.internal.processors.cache.version.*;
@@ -54,6 +55,9 @@ public class GridCacheSharedContext<K, V> {
/** Cache transaction manager. */
private IgniteTxManager txMgr;
+ /** JTA manager. */
+ private CacheJtaManagerAdapter jtaMgr;
+
/** Partition exchange manager. */
private GridCachePartitionExchangeManager<K, V> exchMgr;
@@ -94,12 +98,14 @@ public class GridCacheSharedContext<K, V> {
GridCacheDeploymentManager<K, V> depMgr,
GridCachePartitionExchangeManager<K, V> exchMgr,
GridCacheIoManager ioMgr,
- Collection<CacheStoreSessionListener> storeSesLsnrs
+ Collection<CacheStoreSessionListener> storeSesLsnrs,
+ CacheJtaManagerAdapter jtaMgr
) {
this.kernalCtx = kernalCtx;
this.mvccMgr = add(mvccMgr);
this.verMgr = add(verMgr);
this.txMgr = add(txMgr);
+ this.jtaMgr = add(jtaMgr);
this.depMgr = add(depMgr);
this.exchMgr = add(exchMgr);
this.ioMgr = add(ioMgr);
@@ -281,6 +287,13 @@ public class GridCacheSharedContext<K, V> {
}
/**
+ * @return JTA manager.
+ */
+ public CacheJtaManagerAdapter jta() {
+ return jtaMgr;
+ }
+
+ /**
* @return Exchange manager.
*/
public GridCachePartitionExchangeManager<K, V> exchange() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
index ef9204d..85fa4b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
@@ -25,15 +25,7 @@ import org.jetbrains.annotations.*;
/**
* Provides possibility to integrate cache transactions with JTA.
*/
-public abstract class CacheJtaManagerAdapter extends GridCacheManagerAdapter {
- /**
- * Creates transaction manager finder.
- *
- * @param ccfg Cache configuration.
- * @throws IgniteCheckedException If failed.
- */
- public abstract void createTmLookup(CacheConfiguration ccfg) throws IgniteCheckedException;
-
+public abstract class CacheJtaManagerAdapter extends GridCacheSharedManagerAdapter {
/**
* Checks if cache is working in JTA transaction and enlist cache as XAResource if necessary.
*
@@ -42,6 +34,13 @@ public abstract class CacheJtaManagerAdapter extends GridCacheManagerAdapter {
public abstract void checkJta() throws IgniteCheckedException;
/**
+ * @param cfg Cache configuration.
+ * @throws IgniteCheckedException If {@link CacheConfiguration#getTransactionManagerLookupClassName()} is incompatible with
+ * another caches or {@link TransactionConfiguration#getTxManagerLookupClassName()}.
+ */
+ public abstract void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException;
+
+ /**
* Gets transaction manager finder. Returns Object to avoid dependency on JTA library.
*
* @return Transaction manager finder.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
index 451357f..60e4102 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
@@ -31,7 +31,7 @@ public class CacheNoopJtaManager extends CacheJtaManagerAdapter {
}
/** {@inheritDoc} */
- @Override public void createTmLookup(CacheConfiguration ccfg) throws IgniteCheckedException {
+ @Override public void registerCache(CacheConfiguration<?, ?> cfg) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index 4097c4f..b983039 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -62,9 +62,6 @@ public class VisorCacheConfiguration implements Serializable {
/** Start size. */
private int startSize;
- /** Name of class implementing GridCacheTmLookup. */
- private String tmLookupClsName;
-
/** Off-heap max memory. */
private long offHeapMaxMemory;
@@ -134,7 +131,6 @@ public class VisorCacheConfiguration implements Serializable {
swapEnabled = ccfg.isSwapEnabled();
invalidate = ccfg.isInvalidate();
startSize = ccfg.getStartSize();
- tmLookupClsName = ccfg.getTransactionManagerLookupClassName();
offHeapMaxMemory = ccfg.getOffHeapMaxMemory();
maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations();
memoryMode = ccfg.getMemoryMode();
@@ -222,13 +218,6 @@ public class VisorCacheConfiguration implements Serializable {
}
/**
- * @return Name of class implementing GridCacheTmLookup.
- */
- @Nullable public String transactionManagerLookupClassName() {
- return tmLookupClsName;
- }
-
- /**
* @return Off-heap max memory.
*/
public long offsetHeapMaxMemory() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index 77d3905..f0d1af8 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -19,6 +19,7 @@ package org.apache.ignite.loadtests.hashmap;
import org.apache.ignite.cache.store.*;
import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.cache.datastructures.*;
import org.apache.ignite.internal.processors.cache.dr.*;
@@ -55,7 +56,8 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K, V> {
new GridCacheDeploymentManager<K, V>(),
new GridCachePartitionExchangeManager<K, V>(),
new GridCacheIoManager(),
- null
+ null,
+ new CacheNoopJtaManager()
),
defaultCacheConfiguration(),
CacheType.USER,
@@ -71,7 +73,6 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K, V> {
new CacheDataStructuresManager(),
new GridCacheTtlManager(),
new GridOsCacheDrManager(),
- new CacheNoopJtaManager(),
new CacheOsConflictResolutionManager<K, V>(),
new CachePluginManager(ctx, new CacheConfiguration())
);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
index 6a1fd2b..0e2526e 100644
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
@@ -18,6 +18,7 @@
package org.apache.ignite.cache.hibernate;
import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.processors.cache.*;
import org.hibernate.cache.*;
import org.hibernate.cache.spi.*;
@@ -83,9 +84,14 @@ public class HibernateTransactionalDataRegion extends HibernateRegion implements
throw new CacheException("Hibernate TRANSACTIONAL access strategy must have Ignite cache with " +
"'TRANSACTIONAL' atomicity mode: " + cache.name());
- if (cache.configuration().getTransactionManagerLookupClassName() == null)
- throw new CacheException("Hibernate TRANSACTIONAL access strategy must have Ignite cache with " +
- "TransactionManagerLookup configured: " + cache.name());
+ if (cache.configuration().getTransactionManagerLookupClassName() == null) {
+ TransactionConfiguration txCfg = ignite.configuration().getTransactionConfiguration();
+
+ if (txCfg == null || txCfg.getTxManagerLookupClassName() == null)
+ throw new CacheException("Hibernate TRANSACTIONAL access strategy must have Ignite with " +
+ "TransactionManagerLookup configured (see IgniteConfiguration." +
+ "getTransactionConfiguration().getTxManagerLookupClassName()): " + cache.name());
+ }
return new HibernateTransactionalAccessStrategy(ignite, cache);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
index c909c7c..5a38576 100644
--- a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
+++ b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
@@ -18,6 +18,7 @@
package org.apache.ignite.cache.jta;
import org.apache.ignite.*;
+import org.apache.ignite.configuration.TransactionConfiguration;
import org.jetbrains.annotations.*;
import javax.transaction.*;
@@ -25,7 +26,7 @@ import javax.transaction.*;
/**
* Allows grid to use different transactional systems. Implement this interface
* to look up native transaction manager within your environment. Transaction
- * manager lookup is configured via {@link org.apache.ignite.configuration.CacheConfiguration#getTransactionManagerLookupClassName()}
+ * manager lookup is configured via {@link TransactionConfiguration#getTxManagerLookupClassName()}
* method.
* <p>
* The following implementations are provided out of the box:
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index 2a0d46d..09d856b 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -21,37 +21,60 @@ import org.apache.ignite.*;
import org.apache.ignite.cache.jta.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.processors.cache.transactions.*;
+import org.apache.ignite.lifecycle.*;
import org.jetbrains.annotations.*;
import javax.transaction.*;
-import java.lang.ref.*;
-import java.util.*;
+import java.util.concurrent.atomic.*;
/**
* Implementation of {@link CacheJtaManagerAdapter}.
*/
public class CacheJtaManager extends CacheJtaManagerAdapter {
/** */
- private static final Map<TransactionManager, ThreadLocal<WeakReference<GridCacheXAResource>>> threadLocals =
- new WeakHashMap<>();
+ private final ThreadLocal<GridCacheXAResource> xaRsrc = new ThreadLocal<>();
/** */
private volatile TransactionManager jtaTm;
/** */
- private ThreadLocal<WeakReference<GridCacheXAResource>> xaRsrc;
+ private final AtomicReference<CacheTmLookup> tmLookupRef = new AtomicReference<>();
- /** */
- private CacheTmLookup tmLookup;
+ /** {@inheritDoc} */
+ @Override protected void start0() throws IgniteCheckedException {
+ super.start0();
+
+ if (cctx.txConfig() != null) {
+ String txLookupClsName = cctx.txConfig().getTxManagerLookupClassName();
+
+ if (txLookupClsName != null)
+ tmLookupRef.set(createTmLookup(txLookupClsName));
+ }
+ }
/** {@inheritDoc} */
- @Override public void createTmLookup(CacheConfiguration ccfg) throws IgniteCheckedException {
- assert ccfg.getTransactionManagerLookupClassName() != null;
+ @Override protected void stop0(boolean cancel) {
+ CacheTmLookup tmLookup = tmLookupRef.get();
+
+ if (tmLookup instanceof LifecycleAware)
+ ((LifecycleAware)tmLookup).stop();
+ }
+ /**
+ * @throws IgniteCheckedException
+ */
+ private CacheTmLookup createTmLookup(String tmLookupClsName) throws IgniteCheckedException {
try {
- Class<?> cls = Class.forName(ccfg.getTransactionManagerLookupClassName());
+ Class<?> cls = Class.forName(tmLookupClsName);
+
+ CacheTmLookup res = (CacheTmLookup)cls.newInstance();
- tmLookup = (CacheTmLookup)cls.newInstance();
+ cctx.kernalContext().resource().injectGeneric(res);
+
+ if (res instanceof LifecycleAware)
+ ((LifecycleAware)res).start();
+
+ return res;
}
catch (Exception e) {
throw new IgniteCheckedException("Failed to instantiate transaction manager lookup.", e);
@@ -60,82 +83,90 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
/** {@inheritDoc} */
@Override public void checkJta() throws IgniteCheckedException {
- TransactionManager jtaTm = this.jtaTm;
-
if (jtaTm == null) {
try {
- jtaTm = tmLookup.getTm();
-
- if (jtaTm == null)
+ CacheTmLookup tmLookup = tmLookupRef.get();
+
+ if (tmLookup == null)
return;
-
- synchronized (threadLocals) {
- if (this.jtaTm != null)
- jtaTm = this.jtaTm;
- else {
- xaRsrc = threadLocals.get(jtaTm);
-
- if (xaRsrc == null) {
- xaRsrc = new ThreadLocal<>();
-
- threadLocals.put(jtaTm, xaRsrc);
- }
-
- this.jtaTm = jtaTm;
- }
- }
+
+ jtaTm = tmLookup.getTm();
}
catch (Exception e) {
throw new IgniteCheckedException("Failed to get transaction manager: " + e, e);
}
}
- WeakReference<GridCacheXAResource> rsrcRef = xaRsrc.get();
-
- GridCacheXAResource rsrc = rsrcRef == null ? null : rsrcRef.get();
-
- if (rsrc == null || rsrc.isFinished()) {
- try {
- Transaction jtaTx = jtaTm.getTransaction();
-
- if (jtaTx != null) {
- IgniteInternalTx tx = cctx.tm().userTx();
-
- if (tx == null) {
- TransactionConfiguration tCfg = cctx.kernalContext().config()
- .getTransactionConfiguration();
-
- tx = cctx.tm().newTx(
- /*implicit*/false,
- /*implicit single*/false,
- null,
- tCfg.getDefaultTxConcurrency(),
- tCfg.getDefaultTxIsolation(),
- tCfg.getDefaultTxTimeout(),
- /*store enabled*/true,
- /*tx size*/0
- );
- }
+ if (jtaTm != null) {
+ GridCacheXAResource rsrc = xaRsrc.get();
+
+ if (rsrc == null || rsrc.isFinished()) {
+ try {
+ Transaction jtaTx = jtaTm.getTransaction();
+
+ if (jtaTx != null) {
+ IgniteInternalTx tx = cctx.tm().userTx();
+
+ if (tx == null) {
+ TransactionConfiguration tCfg = cctx.kernalContext().config()
+ .getTransactionConfiguration();
+
+ tx = cctx.tm().newTx(
+ /*implicit*/false,
+ /*implicit single*/false,
+ null,
+ tCfg.getDefaultTxConcurrency(),
+ tCfg.getDefaultTxIsolation(),
+ tCfg.getDefaultTxTimeout(),
+ /*store enabled*/true,
+ /*tx size*/0
+ );
+ }
- rsrc = new GridCacheXAResource(tx, cctx.kernalContext());
+ rsrc = new GridCacheXAResource(tx, cctx.kernalContext());
- if (!jtaTx.enlistResource(rsrc))
- throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");
+ if (!jtaTx.enlistResource(rsrc))
+ throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");
- xaRsrc.set(new WeakReference<>(rsrc));
+ xaRsrc.set(rsrc);
+ }
+ }
+ catch (SystemException e) {
+ throw new IgniteCheckedException("Failed to obtain JTA transaction.", e);
+ }
+ catch (RollbackException e) {
+ throw new IgniteCheckedException("Failed to enlist XAResource to JTA transaction.", e);
}
}
- catch (SystemException e) {
- throw new IgniteCheckedException("Failed to obtain JTA transaction.", e);
- }
- catch (RollbackException e) {
- throw new IgniteCheckedException("Failed to enlist XAResource to JTA transaction.", e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException {
+ String cacheLookupClsName = cfg.getTransactionManagerLookupClassName();
+
+ if (cacheLookupClsName != null) {
+ CacheTmLookup tmLookup = tmLookupRef.get();
+
+ if (tmLookup == null) {
+ tmLookup = createTmLookup(cacheLookupClsName);
+
+ if (tmLookupRef.compareAndSet(null, tmLookup))
+ return;
+
+ tmLookup = tmLookupRef.get();
}
+
+ if (!cacheLookupClsName.equals(tmLookup.getClass().getName()))
+ throw new IgniteCheckedException("Failed to start cache with CacheTmLookup that specified in cache " +
+ "configuration, because node uses another CacheTmLookup [cache" + cfg.getName() +
+ ", tmLookupClassName=" + cacheLookupClsName + ", tmLookupUsedByNode="
+ + tmLookup.getClass().getName() + ']');
}
}
/** {@inheritDoc} */
@Nullable @Override public Object tmLookup() {
- return tmLookup;
+ return tmLookupRef.get();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index e1c8a77..29836ef 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -22,11 +22,14 @@ import org.apache.ignite.cache.*;
import org.apache.ignite.cache.jta.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
+import org.apache.ignite.testframework.*;
import org.apache.ignite.transactions.Transaction;
import org.objectweb.jotm.*;
import javax.transaction.*;
+import java.util.concurrent.*;
+
import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.transactions.TransactionState.*;
@@ -65,18 +68,11 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
}
/** {@inheritDoc} */
- @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(gridName);
-
- cfg.setTransactionManagerLookupClassName(TestTmLookup.class.getName());
-
- return cfg;
- }
-
- /** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
+ cfg.getTransactionConfiguration().setTxManagerLookupClassName(TestTmLookup.class.getName());
+
CacheConfiguration cfg1 = cacheConfiguration(gridName);
CacheConfiguration cfg2 = cacheConfiguration(gridName);
@@ -100,6 +96,17 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
}
/**
+ *
+ */
+ @SuppressWarnings("PublicInnerClass")
+ public static class TestTmLookup2 implements CacheTmLookup {
+ /** {@inheritDoc} */
+ @Override public TransactionManager getTm() {
+ return null;
+ }
+ }
+
+ /**
* JUnit.
*
* @throws Exception If failed.
@@ -185,4 +192,22 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
assertEquals(1, (int)cache1.get("key"));
assertEquals(1, (int)cache2.get("key"));
}
+
+ public void testUncompatibleTmLookup() {
+ final IgniteEx ignite = grid(0);
+
+ final CacheConfiguration cacheCfg = new CacheConfiguration();
+
+ cacheCfg.setName("Foo");
+ cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
+ cacheCfg.setTransactionManagerLookupClassName(TestTmLookup2.class.getName());
+
+ GridTestUtils.assertThrows(log, new Callable<Object>() {
+ @Override public Object call() throws IgniteException {
+ ignite.createCache(cacheCfg);
+
+ return null;
+ }
+ }, IgniteException.class, null);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
index 5465a91..261765b 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
@@ -23,6 +23,7 @@ import org.apache.ignite.cache.jta.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.lifecycle.*;
+import org.apache.ignite.resources.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.testframework.junits.common.*;
import org.jetbrains.annotations.*;
@@ -41,15 +42,24 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
/** */
private boolean near;
+ /** */
+ private boolean configureGlobalTmLookup;
+
/**
*/
@SuppressWarnings("PublicInnerClass")
public static class TestTxLookup extends GridAbstractLifecycleAwareSelfTest.TestLifecycleAware
implements CacheTmLookup {
- /**
- */
- public TestTxLookup() {
- super(CACHE_NAME);
+
+ /** */
+ @IgniteInstanceResource
+ Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public void start() {
+ super.start();
+
+ assertNotNull(ignite);
}
/** {@inheritDoc} */
@@ -74,7 +84,10 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
ccfg.setName(CACHE_NAME);
- ccfg.setTransactionManagerLookupClassName(TestTxLookup.class.getName());
+ if (configureGlobalTmLookup)
+ cfg.getTransactionConfiguration().setTxManagerLookupClassName(TestTxLookup.class.getName());
+ else
+ ccfg.setTransactionManagerLookupClassName(TestTxLookup.class.getName());
cfg.setCacheConfiguration(ccfg);
@@ -99,4 +112,11 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
super.testLifecycleAware();
}
}
+
+ /** {@inheritDoc} */
+ public void testLifecycleAwareGlobal() throws Exception {
+ configureGlobalTmLookup = true;
+
+ super.testLifecycleAware();
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index 4c005af..90c2de0 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -833,8 +833,6 @@ object VisorCacheCommand {
cacheT += ("Invalidate", bool2Str(cfg.invalidate()))
cacheT += ("Start Size", cfg.startSize())
- cacheT += ("Transaction Manager Lookup", safe(cfg.transactionManagerLookupClassName()))
-
cacheT += ("Affinity Function", safe(affinityCfg.function()))
cacheT += ("Affinity Backups", affinityCfg.partitionedBackups())
cacheT += ("Affinity Partitions", safe(affinityCfg.partitions()))
[46/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/master' into ignite-591
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-591
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cfeec2dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cfeec2dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cfeec2dd
Branch: refs/heads/ignite-gg-10052
Commit: cfeec2ddb63770dfe28176c3916630753162631c
Parents: 839fe79 44b52b4
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Jul 8 14:32:52 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed Jul 8 14:32:52 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ServerImpl.java | 20 ++
.../tcp/internal/TcpDiscoveryNode.java | 2 +-
.../tcp/internal/TcpDiscoveryNodesRing.java | 8 +-
.../tcp/internal/TcpDiscoveryStatistics.java | 10 +-
...acheAtomicReplicatedNodeRestartSelfTest.java | 8 +-
.../tcp/TcpDiscoveryMultiThreadedTest.java | 38 ++++
.../IgniteSpiDiscoverySelfTestSuite.java | 3 +
modules/kafka/licenses/apache-2.0.txt | 202 +++++++++++++++++++
.../config/benchmark-put-indexed-val.properties | 64 ++++++
modules/yardstick/config/ignite-base-config.xml | 23 +++
.../cache/IgnitePutIndexedValue1Benchmark.java | 42 ++++
.../cache/IgnitePutIndexedValue2Benchmark.java | 42 ++++
.../cache/IgnitePutIndexedValue8Benchmark.java | 42 ++++
.../ignite/yardstick/cache/model/Person1.java | 55 +++++
.../ignite/yardstick/cache/model/Person2.java | 67 ++++++
.../ignite/yardstick/cache/model/Person8.java | 109 ++++++++++
16 files changed, 727 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
[35/50] incubator-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/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0f1b31a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0f1b31a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0f1b31a5
Branch: refs/heads/ignite-gg-10052
Commit: 0f1b31a5b89f7406bfe44e488a9a832567ee1ccb
Parents: 17ee8a6 4f46ee8
Author: ashutak <as...@gridgain.com>
Authored: Tue Jul 7 20:39:42 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Tue Jul 7 20:39:42 2015 +0300
----------------------------------------------------------------------
.../internal/interop/InteropIgnition.java | 17 +-
.../internal/interop/InteropProcessor.java | 7 +
.../cache/query/GridCacheQueryAdapter.java | 35 ++++-
.../processors/query/GridQueryProcessor.java | 5 +
.../CacheAbstractQueryMetricsSelfTest.java | 157 ++++++++++++++++++-
.../cache/CacheLocalQueryMetricsSelfTest.java | 33 ++++
...titionedQueryMetricsDistributedSelfTest.java | 33 ++++
...chePartitionedQueryMetricsLocalSelfTest.java | 33 ++++
.../CachePartitionedQueryMetricsSelfTest.java | 32 ----
...plicatedQueryMetricsDistributedSelfTest.java | 33 ++++
...acheReplicatedQueryMetricsLocalSelfTest.java | 33 ++++
.../CacheReplicatedQueryMetricsSelfTest.java | 32 ----
.../IgniteCacheQuerySelfTestSuite.java | 7 +-
13 files changed, 384 insertions(+), 73 deletions(-)
----------------------------------------------------------------------
[13/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-7' into ignite-1091
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-1091
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/335a7bba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/335a7bba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/335a7bba
Branch: refs/heads/ignite-gg-10052
Commit: 335a7bba58052812e04362791e2e114afb094f2c
Parents: ca92f1f a577d27
Author: Anton <av...@gridgain.com>
Authored: Mon Jul 6 12:09:31 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Mon Jul 6 12:09:31 2015 +0300
----------------------------------------------------------------------
bin/ignite.bat | 8 +-
bin/ignite.sh | 6 +-
bin/include/parseargs.bat | 1 +
bin/include/parseargs.sh | 3 +
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../startup/cmdline/CommandLineStartup.java | 3 +-
.../startup/cmdline/CommandLineTransformer.java | 9 +
...acheAtomicReplicatedNodeRestartSelfTest.java | 10 +
.../TcpDiscoveryNodeConsistentIdSelfTest.java | 80 ++++
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +
modules/kafka/pom.xml | 116 ++++++
.../ignite/stream/kafka/KafkaStreamer.java | 220 +++++++++++
.../kafka/IgniteKafkaStreamerSelfTestSuite.java | 37 ++
.../stream/kafka/KafkaEmbeddedBroker.java | 378 +++++++++++++++++++
.../kafka/KafkaIgniteStreamerSelfTest.java | 227 +++++++++++
.../ignite/stream/kafka/SimplePartitioner.java | 53 +++
pom.xml | 1 +
17 files changed, 1155 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
[12/50] incubator-ignite git commit: #ignite-1086:
ClusterNode.consistentId() should be the same after restart.
Posted by sb...@apache.org.
#ignite-1086: ClusterNode.consistentId() should be the same after restart.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a577d27b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a577d27b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a577d27b
Branch: refs/heads/ignite-gg-10052
Commit: a577d27b6a857e80d4ddf48a635dce09123eec8a
Parents: 3a4d008
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Jul 6 11:19:00 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Jul 6 11:19:00 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../TcpDiscoveryNodeConsistentIdSelfTest.java | 80 ++++++++++++++++++++
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +
3 files changed, 87 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a577d27b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index f457d6c..46a23d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -8048,9 +8048,13 @@ public abstract class IgniteUtils {
public static String consistentId(Collection<String> addrs, int port) {
assert !F.isEmpty(addrs);
+ List<String> sortedAddrs = new ArrayList<>(addrs);
+
+ Collections.sort(sortedAddrs);
+
StringBuilder sb = new StringBuilder();
- for (String addr : addrs)
+ for (String addr : sortedAddrs)
sb.append(addr).append(',');
sb.delete(sb.length() - 1, sb.length());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a577d27b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java
new file mode 100644
index 0000000..d159d72
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryNodeConsistentIdSelfTest.java
@@ -0,0 +1,80 @@
+/*
+ * 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.spi.discovery.tcp;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.spi.discovery.tcp.internal.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+/**
+ * Test for {@link TcpDiscoveryNode#consistentId()}
+ */
+public class TcpDiscoveryNodeConsistentIdSelfTest extends GridCommonAbstractTest {
+ /** IP finder. */
+ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ cfg.setLocalHost("0.0.0.0");
+
+ cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(ipFinder));
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ startGrids(1);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testConsistentId() throws Exception {
+ Object id0 = grid(0).localNode().consistentId();
+
+ int port0 = getDiscoveryPort(grid(0));
+
+ for (int i = 0; i < 10; ++i) {
+ stopAllGrids();
+
+ startGrids(1);
+
+ if (port0 == getDiscoveryPort(grid(0)))
+ assertEquals(id0, grid(0).localNode().consistentId());
+ }
+ }
+
+ /**
+ * @param ignite Ignite.
+ * @return Discovery port.
+ */
+ private int getDiscoveryPort(Ignite ignite) {
+ return ((TcpDiscoveryNode) ignite.cluster().localNode()).discoveryPort();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a577d27b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
index ea5a7ac..498f50c 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
@@ -55,6 +55,8 @@ public class IgniteSpiDiscoverySelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(TcpClientDiscoveryMarshallerCheckSelfTest.class));
suite.addTest(new TestSuite(TcpClientDiscoverySpiMulticastTest.class));
+ suite.addTest(new TestSuite(TcpDiscoveryNodeConsistentIdSelfTest.class));
+
return suite;
}
}
[02/50] incubator-ignite git commit: ignite-428 Implement
IgniteKafkaStreamer to stream data from Apache Kafka
Posted by sb...@apache.org.
ignite-428 Implement IgniteKafkaStreamer to stream data from Apache Kafka
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2c41739d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2c41739d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2c41739d
Branch: refs/heads/ignite-gg-10052
Commit: 2c41739dcd83751270b6bd30c6f2595edc68a1b1
Parents: 9f6a7f9
Author: vishal.garg <vi...@workday.com>
Authored: Mon Jun 22 19:35:08 2015 -0700
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 19:39:11 2015 +0300
----------------------------------------------------------------------
modules/kafka/pom.xml | 128 +++++++
.../ignite/stream/kafka/KafkaStreamer.java | 179 +++++++++
.../stream/kafka/KafkaEmbeddedBroker.java | 373 +++++++++++++++++++
.../kafka/KafkaIgniteStreamerSelfTest.java | 230 ++++++++++++
.../ignite/stream/kafka/SimplePartitioner.java | 46 +++
pom.xml | 1 +
6 files changed, 957 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
new file mode 100644
index 0000000..165ec1c
--- /dev/null
+++ b/modules/kafka/pom.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<!--
+ POM file.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-parent</artifactId>
+ <version>1</version>
+ <relativePath>../../parent</relativePath>
+ </parent>
+
+ <artifactId>ignite-kafka</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>kafka_2.10</artifactId>
+ <version>0.8.2.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.jmx</groupId>
+ <artifactId>jmxri</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jdmk</groupId>
+ <artifactId>jmxtools</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.sf.jopt-simple</groupId>
+ <artifactId>jopt-simple</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ <version>3.4.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-log4j</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-all</artifactId>
+ <version>4.2</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.gridgain</groupId>
+ <artifactId>ignite-shmem</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.8.3</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-spring</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
new file mode 100644
index 0000000..e0240ce
--- /dev/null
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
@@ -0,0 +1,179 @@
+/*
+ * 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.stream.kafka;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.stream.*;
+
+import kafka.consumer.*;
+import kafka.javaapi.consumer.ConsumerConnector;
+import kafka.message.*;
+import kafka.serializer.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Server that subscribes to topic messages from Kafka broker, streams its to key-value pairs into {@link
+ * org.apache.ignite.IgniteDataStreamer} instance.
+ * <p>
+ * Uses Kafka's High Level Consumer API to read messages from Kafka
+ *
+ * @see <a href="https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example">Consumer Consumer Group
+ * Example</a>
+ */
+public class KafkaStreamer<T, K, V>
+ extends StreamAdapter<T, K, V> {
+
+ /** Logger. */
+ private IgniteLogger log;
+
+ /** Executor used to submit kafka streams. */
+ private ExecutorService executor;
+
+ /** Topic. */
+ private String topic;
+
+ /** Number of threads to process kafka streams. */
+ private int threads;
+
+ /** Kafka Consumer Config. */
+ private ConsumerConfig consumerConfig;
+
+ /** Key Decoder. */
+ private Decoder<K> keyDecoder;
+
+ /** Value Decoder. */
+ private Decoder<V> valueDecoder;
+
+ /** Kafka Consumer connector. */
+ private ConsumerConnector consumer;
+
+ /**
+ * Sets the topic.
+ *
+ * @param topic Topic Name.
+ */
+ public void setTopic(final String topic) {
+ this.topic = topic;
+ }
+
+ /**
+ * Sets the threads.
+ *
+ * @param threads Number of Threads.
+ */
+ public void setThreads(final int threads) {
+ this.threads = threads;
+ }
+
+ /**
+ * Sets the consumer config.
+ *
+ * @param consumerConfig Consumer configuration.
+ */
+ public void setConsumerConfig(final ConsumerConfig consumerConfig) {
+ this.consumerConfig = consumerConfig;
+ }
+
+ /**
+ * Sets the key decoder.
+ *
+ * @param keyDecoder Key Decoder.
+ */
+ public void setKeyDecoder(final Decoder<K> keyDecoder) {
+ this.keyDecoder = keyDecoder;
+ }
+
+ /**
+ * Sets the value decoder.
+ *
+ * @param valueDecoder Value Decoder
+ */
+ public void setValueDecoder(final Decoder<V> valueDecoder) {
+ this.valueDecoder = valueDecoder;
+ }
+
+ /**
+ * Starts streamer.
+ *
+ * @throws IgniteException If failed.
+ */
+ public void start() {
+ A.notNull(getStreamer(), "streamer");
+ A.notNull(getIgnite(), "ignite");
+ A.notNull(topic, "topic");
+ A.notNull(keyDecoder, "key decoder");
+ A.notNull(valueDecoder, "value decoder");
+ A.notNull(consumerConfig, "kafka consumer config");
+ A.ensure(threads > 0, "threads > 0");
+
+ log = getIgnite().log();
+
+ consumer = kafka.consumer.Consumer.createJavaConsumerConnector(consumerConfig);
+
+ Map<String, Integer> topicCountMap = new HashMap<>();
+ topicCountMap.put(topic, threads);
+
+ Map<String, List<KafkaStream<K, V>>> consumerMap = consumer.createMessageStreams(topicCountMap, keyDecoder,
+ valueDecoder);
+
+ List<KafkaStream<K, V>> streams = consumerMap.get(topic);
+
+ // Now launch all the consumer threads.
+ executor = Executors.newFixedThreadPool(threads);
+
+ // Now create an object to consume the messages.
+ for (final KafkaStream<K,V> stream : streams) {
+ executor.submit(new Runnable() {
+ @Override public void run() {
+
+ ConsumerIterator<K, V> it = stream.iterator();
+
+ while (it.hasNext()) {
+ final MessageAndMetadata<K, V> messageAndMetadata = it.next();
+ getStreamer().addData(messageAndMetadata.key(), messageAndMetadata.message());
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Stops streamer.
+ */
+ public void stop() {
+ if (consumer != null)
+ consumer.shutdown();
+
+ if (executor != null) {
+ executor.shutdown();
+
+ try {
+ if (!executor.awaitTermination(5000, TimeUnit.MILLISECONDS))
+ if (log.isDebugEnabled())
+ log.debug("Timed out waiting for consumer threads to shut down, exiting uncleanly");
+ }
+ catch (InterruptedException e) {
+ if (log.isDebugEnabled())
+ log.debug("Interrupted during shutdown, exiting uncleanly");
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
new file mode 100644
index 0000000..28533f7
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaEmbeddedBroker.java
@@ -0,0 +1,373 @@
+/*
+ * 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.stream.kafka;
+
+import org.apache.commons.io.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.zookeeper.server.*;
+
+import kafka.admin.*;
+import kafka.api.*;
+import kafka.api.Request;
+import kafka.producer.*;
+import kafka.server.*;
+import kafka.utils.*;
+import org.I0Itec.zkclient.*;
+
+import java.io.*;
+import java.net.*;
+import java.nio.file.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Kafka Embedded Broker.
+ */
+public class KafkaEmbeddedBroker {
+
+ /** Default ZooKeeper Host. */
+ private static final String ZK_HOST = "localhost";
+
+ /** Broker Port. */
+ private static final int BROKER_PORT = 9092;
+
+ /** ZooKeeper Connection Timeout. */
+ private static final int ZK_CONNECTION_TIMEOUT = 6000;
+
+ /** ZooKeeper Session Timeout. */
+ private static final int ZK_SESSION_TIMEOUT = 6000;
+
+ /** ZooKeeper port. */
+ private static int zkPort = 0;
+
+ /** Is ZooKeeper Ready. */
+ private boolean zkReady;
+
+ /** Kafka Config. */
+ private KafkaConfig brokerConfig;
+
+ /** Kafka Server. */
+ private KafkaServer kafkaServer;
+
+ /** ZooKeeper Client. */
+ private ZkClient zkClient;
+
+ /** Embedded ZooKeeper. */
+ private EmbeddedZooKeeper zooKeeper;
+
+ /**
+ * Creates an embedded Kafka Broker.
+ */
+ public KafkaEmbeddedBroker() {
+ try {
+ setupEmbeddedZooKeeper();
+ setupEmbeddedKafkaServer();
+ }
+ catch (IOException | InterruptedException e) {
+ throw new RuntimeException("failed to start Kafka Broker " + e);
+ }
+
+ }
+
+ /**
+ * @return ZooKeeper Address.
+ */
+ public static String getZKAddress() {
+ return ZK_HOST + ":" + zkPort;
+ }
+
+ /**
+ * Creates a Topic.
+ *
+ * @param topic topic name
+ * @param partitions number of paritions for the topic
+ * @param replicationFactor replication factor
+ * @throws TimeoutException
+ * @throws InterruptedException
+ */
+ public void createTopic(String topic, final int partitions, final int replicationFactor)
+ throws TimeoutException, InterruptedException {
+ AdminUtils.createTopic(zkClient, topic, partitions, replicationFactor, new Properties());
+ waitUntilMetadataIsPropagated(topic, 0, 10000, 100);
+ }
+
+ /**
+ * Sends message to Kafka Broker.
+ *
+ * @param keyedMessages List of Keyed Messages.
+ * @return Producer used to send the message.
+ */
+ public Producer sendMessages(List<KeyedMessage<String, String>> keyedMessages) {
+ Producer<String, String> producer = new Producer<>(getProducerConfig());
+ producer.send(scala.collection.JavaConversions.asScalaBuffer(keyedMessages));
+ return producer;
+ }
+
+ /**
+ * Shuts down Kafka Broker.
+ *
+ * @throws IOException
+ */
+ public void shutdown()
+ throws IOException {
+
+ zkReady = false;
+
+ if (kafkaServer != null)
+ kafkaServer.shutdown();
+
+ List<String> logDirs = scala.collection.JavaConversions.asJavaList(brokerConfig.logDirs());
+
+ for (String logDir : logDirs) {
+ FileUtils.deleteDirectory(new File(logDir));
+ }
+
+ if (zkClient != null) {
+ zkClient.close();
+ zkClient = null;
+ }
+
+ if (zooKeeper != null) {
+
+ try {
+ zooKeeper.shutdown();
+ }
+ catch (IOException e) {
+ // ignore
+ }
+
+ zooKeeper = null;
+ }
+
+ }
+
+ /**
+ * @return the Zookeeper Client
+ */
+ private ZkClient getZkClient() {
+ A.ensure(zkReady, "Zookeeper not setup yet");
+ A.notNull(zkClient, "Zookeeper client is not yet initialized");
+
+ return zkClient;
+ }
+
+ /**
+ * Checks if topic metadata is propagated.
+ *
+ * @param topic topic name
+ * @param partition partition
+ * @return true if propagated otherwise false
+ */
+ private boolean isMetadataPropagated(final String topic, final int partition) {
+ final scala.Option<PartitionStateInfo> partitionStateOption = kafkaServer.apis().metadataCache().getPartitionInfo(
+ topic, partition);
+ if (partitionStateOption.isDefined()) {
+ final PartitionStateInfo partitionState = partitionStateOption.get();
+ final LeaderAndIsr leaderAndInSyncReplicas = partitionState.leaderIsrAndControllerEpoch().leaderAndIsr();
+
+ if (ZkUtils.getLeaderForPartition(getZkClient(), topic, partition) != null
+ && Request.isValidBrokerId(leaderAndInSyncReplicas.leader())
+ && leaderAndInSyncReplicas.isr().size() >= 1)
+ return true;
+
+ }
+ return false;
+ }
+
+ /**
+ * Waits until metadata is propagated.
+ *
+ * @param topic topic name
+ * @param partition partition
+ * @param timeout timeout value in millis
+ * @param interval interval in millis to sleep
+ * @throws TimeoutException
+ * @throws InterruptedException
+ */
+ private void waitUntilMetadataIsPropagated(final String topic, final int partition, final long timeout,
+ final long interval) throws TimeoutException, InterruptedException {
+ int attempt = 1;
+ final long startTime = System.currentTimeMillis();
+
+ while (true) {
+ if (isMetadataPropagated(topic, partition))
+ return;
+
+ final long duration = System.currentTimeMillis() - startTime;
+
+ if (duration < timeout)
+ Thread.sleep(interval);
+ else
+ throw new TimeoutException("metadata propagate timed out, attempt=" + attempt);
+
+ attempt++;
+ }
+
+ }
+
+ /**
+ * Sets up embedded Kafka Server
+ *
+ * @throws IOException
+ */
+ private void setupEmbeddedKafkaServer()
+ throws IOException {
+ A.ensure(zkReady, "Zookeeper should be setup before hand");
+
+ brokerConfig = new KafkaConfig(getBrokerConfig());
+ kafkaServer = new KafkaServer(brokerConfig, SystemTime$.MODULE$);
+ kafkaServer.startup();
+ }
+
+ /**
+ * Sets up embedded zooKeeper
+ *
+ * @throws IOException
+ * @throws InterruptedException
+ */
+ private void setupEmbeddedZooKeeper()
+ throws IOException, InterruptedException {
+ EmbeddedZooKeeper zooKeeper = new EmbeddedZooKeeper(ZK_HOST, zkPort);
+ zooKeeper.startup();
+ zkPort = zooKeeper.getActualPort();
+ zkClient = new ZkClient(getZKAddress(), ZK_SESSION_TIMEOUT, ZK_CONNECTION_TIMEOUT, ZKStringSerializer$.MODULE$);
+ zkReady = true;
+ }
+
+ /**
+ * @return Kafka Broker Address.
+ */
+ private static String getBrokerAddress() {
+ return ZK_HOST + ":" + BROKER_PORT;
+ }
+
+ /**
+ * Gets KafKa Brofer Config
+ *
+ * @return Kafka Broker Config
+ * @throws IOException
+ */
+ private static Properties getBrokerConfig()
+ throws IOException {
+ Properties props = new Properties();
+ props.put("broker.id", "0");
+ props.put("host.name", ZK_HOST);
+ props.put("port", "" + BROKER_PORT);
+ props.put("log.dir", createTempDir("_cfg").getAbsolutePath());
+ props.put("zookeeper.connect", getZKAddress());
+ props.put("log.flush.interval.messages", "1");
+ props.put("replica.socket.timeout.ms", "1500");
+ return props;
+ }
+
+ /**
+ * @return Kafka Producer Config
+ */
+ private static ProducerConfig getProducerConfig() {
+ Properties props = new Properties();
+ props.put("metadata.broker.list", getBrokerAddress());
+ props.put("serializer.class", "kafka.serializer.StringEncoder");
+ props.put("key.serializer.class", "kafka.serializer.StringEncoder");
+ props.put("partitioner.class", "org.apache.ignite.kafka.SimplePartitioner");
+ return new ProducerConfig(props);
+ }
+
+ /**
+ * Creates Temp Directory
+ *
+ * @param prefix prefix
+ * @return Created File.
+ * @throws IOException
+ */
+ private static File createTempDir(final String prefix)
+ throws IOException {
+ final Path path = Files.createTempDirectory(prefix);
+ return path.toFile();
+
+ }
+
+ /**
+ * Creates Embedded ZooKeeper.
+ */
+ private static class EmbeddedZooKeeper {
+ /** Default ZooKeeper Host. */
+ private final String zkHost;
+
+ /** Default ZooKeeper Port. */
+ private final int zkPort;
+
+ /** NIO Context Factory. */
+ private NIOServerCnxnFactory factory;
+
+ /** Snapshot Directory. */
+ private File snapshotDir;
+
+ /** Log Directory. */
+ private File logDir;
+
+ /**
+ * Creates an embedded Zookeeper
+ * @param zkHost zookeeper host
+ * @param zkPort zookeeper port
+ */
+ EmbeddedZooKeeper(final String zkHost, final int zkPort) {
+ this.zkHost = zkHost;
+ this.zkPort = zkPort;
+ }
+
+ /**
+ * Starts up ZooKeeper.
+ *
+ * @throws IOException
+ * @throws InterruptedException
+ */
+ void startup()
+ throws IOException, InterruptedException {
+ snapshotDir = createTempDir("_ss");
+ logDir = createTempDir("_log");
+ ZooKeeperServer zooServer = new ZooKeeperServer(snapshotDir, logDir, 500);
+ factory = new NIOServerCnxnFactory();
+ factory.configure(new InetSocketAddress(zkHost, zkPort), 16);
+ factory.startup(zooServer);
+ }
+
+ /**
+ *
+ * @return actual port zookeeper is started
+ */
+ int getActualPort() {
+ return factory.getLocalPort();
+ }
+
+ /**
+ * Shuts down ZooKeeper.
+ *
+ * @throws IOException
+ */
+ void shutdown()
+ throws IOException {
+ if (factory != null) {
+ factory.shutdown();
+
+ U.delete(snapshotDir);
+ U.delete(logDir);
+ }
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
new file mode 100644
index 0000000..5972639
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/KafkaIgniteStreamerSelfTest.java
@@ -0,0 +1,230 @@
+/*
+ * 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.stream.kafka;
+
+import org.apache.ignite.*;
+import org.apache.ignite.events.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import kafka.consumer.*;
+import kafka.producer.*;
+import kafka.serializer.*;
+import kafka.utils.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+import static org.apache.ignite.events.EventType.*;
+
+/**
+ * Tests {@link KafkaStreamer}.
+ */
+public class KafkaIgniteStreamerSelfTest
+ extends GridCommonAbstractTest {
+ /** Embedded Kafka. */
+ private KafkaEmbeddedBroker embeddedBroker;
+
+ /** Count. */
+ private static final int CNT = 100;
+
+ /** Test Topic. */
+ private static final String TOPIC_NAME = "page_visits";
+
+ /** Kafka Partition. */
+ private static final int PARTITIONS = 4;
+
+ /** Kafka Replication Factor. */
+ private static final int REPLICATION_FACTOR = 1;
+
+ /** Topic Message Key Prefix. */
+ private static final String KEY_PREFIX = "192.168.2.";
+
+ /** Topic Message Value Url. */
+ private static final String VALUE_URL = ",www.example.com,";
+
+ /** Constructor. */
+ public KafkaIgniteStreamerSelfTest() {
+ super(true);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ protected void beforeTest()
+ throws Exception {
+ grid().<Integer, String>getOrCreateCache(defaultCacheConfiguration());
+
+ embeddedBroker = new KafkaEmbeddedBroker();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ protected void afterTest()
+ throws Exception {
+ grid().cache(null).clear();
+
+ embeddedBroker.shutdown();
+ }
+
+ /**
+ * Tests Kafka streamer.
+ *
+ * @throws TimeoutException
+ * @throws InterruptedException
+ */
+ public void testKafkaStreamer()
+ throws TimeoutException, InterruptedException {
+ embeddedBroker.createTopic(TOPIC_NAME, PARTITIONS, REPLICATION_FACTOR);
+
+ Map<String, String> keyValueMap = produceStream(TOPIC_NAME);
+ consumerStream(TOPIC_NAME, keyValueMap);
+ }
+
+ /**
+ * Produces/Sends messages to Kafka.
+ *
+ * @param topic Topic name.
+ * @return Map of key value messages.
+ */
+ private Map<String, String> produceStream(final String topic) {
+ final Map<String, String> keyValueMap = new HashMap<>();
+
+ // Generate random subnets.
+ List<Integer> subnet = new ArrayList<>();
+
+ int i = 0;
+ while (i <= CNT)
+ subnet.add(++i);
+
+ Collections.shuffle(subnet);
+
+ final List<KeyedMessage<String, String>> messages = new ArrayList<>();
+ for (int event = 0; event < CNT; event++) {
+ long runtime = new Date().getTime();
+ String ip = KEY_PREFIX + subnet.get(event);
+ String msg = runtime + VALUE_URL + ip;
+ messages.add(new KeyedMessage<>(topic, ip, msg));
+ keyValueMap.put(ip, msg);
+ }
+
+ final Producer<String, String> producer = embeddedBroker.sendMessages(messages);
+ producer.close();
+
+ return keyValueMap;
+ }
+
+ /**
+ * Consumes Kafka Stream via ignite.
+ *
+ * @param topic Topic name.
+ * @param keyValueMap Expected key value map.
+ * @throws TimeoutException TimeoutException.
+ * @throws InterruptedException InterruptedException.
+ */
+ private void consumerStream(final String topic, final Map<String, String> keyValueMap)
+ throws TimeoutException, InterruptedException {
+
+ KafkaStreamer<String, String, String> kafkaStmr = null;
+
+ final Ignite ignite = grid();
+ try (IgniteDataStreamer<String, String> stmr = ignite.dataStreamer(null)) {
+
+ stmr.allowOverwrite(true);
+ stmr.autoFlushFrequency(10);
+
+ // Configure socket streamer.
+ kafkaStmr = new KafkaStreamer<>();
+
+ // Get the cache.
+ IgniteCache<String, String> cache = ignite.cache(null);
+
+ // Set ignite instance.
+ kafkaStmr.setIgnite(ignite);
+
+ // Set data streamer instance.
+ kafkaStmr.setStreamer(stmr);
+
+ // Set the topic.
+ kafkaStmr.setTopic(topic);
+
+ // Set the number of threads.
+ kafkaStmr.setThreads(4);
+
+ // Set the consumer configuration.
+ kafkaStmr.setConsumerConfig(createDefaultConsumerConfig(KafkaEmbeddedBroker.getZKAddress(),
+ "groupX"));
+
+ // Set the decoders.
+ StringDecoder stringDecoder = new StringDecoder(new VerifiableProperties());
+ kafkaStmr.setKeyDecoder(stringDecoder);
+ kafkaStmr.setValueDecoder(stringDecoder);
+
+ // Start kafka streamer.
+ kafkaStmr.start();
+
+ final CountDownLatch latch = new CountDownLatch(CNT);
+ IgniteBiPredicate<UUID, CacheEvent> locLsnr = new IgniteBiPredicate<UUID, CacheEvent>() {
+ @Override
+ public boolean apply(UUID uuid, CacheEvent evt) {
+ latch.countDown();
+ return true;
+ }
+ };
+
+ ignite.events(ignite.cluster().forCacheNodes(null)).remoteListen(locLsnr, null, EVT_CACHE_OBJECT_PUT);
+ latch.await();
+
+ for (Map.Entry<String, String> entry : keyValueMap.entrySet()) {
+ final String key = entry.getKey();
+ final String value = entry.getValue();
+
+ final String cacheValue = cache.get(key);
+ assertEquals(value, cacheValue);
+ }
+ }
+
+ finally {
+ // Shutdown kafka streamer.
+ kafkaStmr.stop();
+ }
+ }
+
+ /**
+ * Creates default consumer config.
+ *
+ * @param zooKeeper Zookeeper address <server:port>.
+ * @param groupId Group Id for kafka subscriber.
+ * @return {@link ConsumerConfig} kafka consumer configuration.
+ */
+ private ConsumerConfig createDefaultConsumerConfig(String zooKeeper, String groupId) {
+ A.notNull(zooKeeper, "zookeeper");
+ A.notNull(groupId, "groupId");
+
+ Properties props = new Properties();
+ props.put("zookeeper.connect", zooKeeper);
+ props.put("group.id", groupId);
+ props.put("zookeeper.session.timeout.ms", "400");
+ props.put("zookeeper.sync.time.ms", "200");
+ props.put("auto.commit.interval.ms", "1000");
+ props.put("auto.offset.reset", "smallest");
+
+ return new ConsumerConfig(props);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
new file mode 100644
index 0000000..b836b44
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/SimplePartitioner.java
@@ -0,0 +1,46 @@
+/*
+ * 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.stream.kafka;
+
+import kafka.producer.*;
+
+/**
+ * Simple Partitioner for Kafka.
+ */
+@SuppressWarnings("UnusedDeclaration")
+public class SimplePartitioner
+ implements Partitioner {
+
+ /**
+ * Partitions the key based on the key value.
+ *
+ * @param key Key.
+ * @param partitionSize Partition size.
+ * @return partition Partition.
+ */
+ public int partition(Object key, int partitionSize) {
+ int partition = 0;
+ String keyStr = (String)key;
+ String[] keyValues = keyStr.split("\\.");
+ Integer intKey = Integer.parseInt(keyValues[3]);
+ if (intKey > 0) {
+ partition = intKey % partitionSize;
+ }
+ return partition;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c41739d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a6d1609..b47d34b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,6 +70,7 @@
<module>modules/gce</module>
<module>modules/cloud</module>
<module>modules/mesos</module>
+ <module>modules/kafka</module>
</modules>
<profiles>
[45/50] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/44b52b4a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/44b52b4a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/44b52b4a
Branch: refs/heads/ignite-gg-10052
Commit: 44b52b4a8968808ad7c17d510e56c8defe8ee837
Parents: 1cf479b 1a6948e
Author: agura <ag...@gridgain.com>
Authored: Wed Jul 8 13:31:12 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Wed Jul 8 13:31:12 2015 +0300
----------------------------------------------------------------------
.../config/benchmark-index-put.properties | 64 --------
.../config/benchmark-put-indexed-val.properties | 64 ++++++++
.../cache/IgnitePutIndex1Benchmark.java | 42 -----
.../cache/IgnitePutIndex2Benchmark.java | 42 -----
.../cache/IgnitePutIndexedValue1Benchmark.java | 42 +++++
.../cache/IgnitePutIndexedValue2Benchmark.java | 42 +++++
.../cache/IgnitePutIndexedValue8Benchmark.java | 2 +-
.../ignite/yardstick/cache/model/Person1.java | 29 +---
.../ignite/yardstick/cache/model/Person2.java | 45 +-----
.../ignite/yardstick/cache/model/Person8.java | 155 ++-----------------
10 files changed, 167 insertions(+), 360 deletions(-)
----------------------------------------------------------------------
[09/50] incubator-ignite git commit: disable failing test
Posted by sb...@apache.org.
disable failing test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/334fee9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/334fee9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/334fee9e
Branch: refs/heads/ignite-gg-10052
Commit: 334fee9e300342c0a9613fdcaba5aa97ef1a86a4
Parents: f72b291
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Jul 6 10:19:18 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Jul 6 10:19:18 2015 +0300
----------------------------------------------------------------------
.../IgniteCacheAtomicReplicatedNodeRestartSelfTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/334fee9e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
index 379ed65..52d8871 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
@@ -31,6 +31,11 @@ public class IgniteCacheAtomicReplicatedNodeRestartSelfTest extends GridCacheRep
}
/** {@inheritDoc} */
+ @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1095");
+ }
+
+ /** {@inheritDoc} */
@Override protected CacheAtomicityMode atomicityMode() {
return ATOMIC;
}
[29/50] incubator-ignite git commit: # review
Posted by sb...@apache.org.
# review
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bc297978
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bc297978
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bc297978
Branch: refs/heads/ignite-gg-10052
Commit: bc2979788d7f728766e5b70314ae45c62c9596b2
Parents: 25c349f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 16:51:30 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 16:51:30 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/loadtests/hashmap/GridCacheTestContext.java | 1 -
.../ignite/cache/hibernate/HibernateL2CacheSelfTest.java | 2 --
.../main/java/org/apache/ignite/cache/jta/CacheTmLookup.java | 2 +-
.../processors/cache/GridTmLookupLifecycleAwareSelfTest.java | 7 +++----
4 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index f0d1af8..e9d7a45 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -19,7 +19,6 @@ package org.apache.ignite.loadtests.hashmap;
import org.apache.ignite.cache.store.*;
import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.cache.datastructures.*;
import org.apache.ignite.internal.processors.cache.dr.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
index 91d5c26..c819ec9 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
@@ -46,8 +46,6 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
import static org.apache.ignite.cache.hibernate.HibernateRegionFactory.*;
import static org.hibernate.cfg.Environment.*;
-import org.apache.ignite.cache.hibernate.HibernateL2CacheSelfTest.Entity;
-
/**
*
* Tests Hibernate L2 cache.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
index 5a38576..f16d6d2 100644
--- a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
+++ b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
@@ -18,7 +18,7 @@
package org.apache.ignite.cache.jta;
import org.apache.ignite.*;
-import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.configuration.*;
import org.jetbrains.annotations.*;
import javax.transaction.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
index 261765b..f7d3902 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
@@ -44,21 +44,20 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
/** */
private boolean configureGlobalTmLookup;
-
+
/**
*/
@SuppressWarnings("PublicInnerClass")
public static class TestTxLookup extends GridAbstractLifecycleAwareSelfTest.TestLifecycleAware
implements CacheTmLookup {
-
/** */
@IgniteInstanceResource
Ignite ignite;
-
+
/** {@inheritDoc} */
@Override public void start() {
super.start();
-
+
assertNotNull(ignite);
}
[20/50] incubator-ignite git commit: jetty 9.2.x support (to be
replaced by tomcat-servlet-api)
Posted by sb...@apache.org.
jetty 9.2.x support (to be replaced by tomcat-servlet-api)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b8a4b5ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b8a4b5ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b8a4b5ad
Branch: refs/heads/ignite-gg-10052
Commit: b8a4b5ad4d561eba63d79f2a0b56cd6a590734ae
Parents: 7b3cdc8
Author: Anton <av...@gridgain.com>
Authored: Mon Jul 6 20:34:42 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Mon Jul 6 20:34:42 2015 +0300
----------------------------------------------------------------------
modules/rest-http/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b8a4b5ad/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 406585d..bf4b216 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -43,7 +43,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
+ <version>3.1.0</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b8a4b5ad/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index be946d7..0509af2 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -43,7 +43,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
+ <version>3.1.0</version>
</dependency>
<dependency>
[22/50] incubator-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/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/96c96952
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/96c96952
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/96c96952
Branch: refs/heads/ignite-gg-10052
Commit: 96c969527d6b0d3508c535c097c8a9cef774dc85
Parents: f2aa6ab b8a4b5a
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 10:35:22 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 10:35:22 2015 +0300
----------------------------------------------------------------------
modules/rest-http/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[24/50] incubator-ignite git commit: merge from ignite-882
Posted by sb...@apache.org.
merge from ignite-882
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9314a68e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9314a68e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9314a68e
Branch: refs/heads/ignite-gg-10052
Commit: 9314a68e31f1b449665a26335868e39478ff2f98
Parents: 96c9695
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Jul 7 14:13:19 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Jul 7 14:13:19 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ServerImpl.java | 26 ++++++++++++++++++++
.../GridCachePartitionedNodeRestartTest.java | 5 ----
...ePartitionedOptimisticTxNodeRestartTest.java | 2 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 ----
.../GridCacheReplicatedNodeRestartSelfTest.java | 5 ----
5 files changed, 27 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9314a68e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 94a2290..f8fae34 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -2076,6 +2076,9 @@ class ServerImpl extends TcpDiscoveryImpl {
boolean nextNew = (msg instanceof TcpDiscoveryNodeAddedMessage &&
((TcpDiscoveryNodeAddedMessage)msg).node().id().equals(nextId));
+ if (!nextNew)
+ nextNew = hasPendingAddMessage(nextId);
+
if (!nextNew) {
if (log.isDebugEnabled())
log.debug("Failed to restore ring because next node order received " +
@@ -2364,6 +2367,29 @@ class ServerImpl extends TcpDiscoveryImpl {
}
/**
+ * Checks whether pending messages queue contains unprocessed {@link TcpDiscoveryNodeAddedMessage} for
+ * the node with {@code nodeId}.
+ *
+ * @param nodeId Node ID.
+ * @return {@code true} if contains, {@code false} otherwise.
+ */
+ private boolean hasPendingAddMessage(UUID nodeId) {
+ if (pendingMsgs.msgs.isEmpty())
+ return false;
+
+ for (TcpDiscoveryAbstractMessage pendingMsg : pendingMsgs.msgs) {
+ if (pendingMsg instanceof TcpDiscoveryNodeAddedMessage) {
+ TcpDiscoveryNodeAddedMessage addMsg = (TcpDiscoveryNodeAddedMessage)pendingMsg;
+
+ if (addMsg.node().id().equals(nodeId) && addMsg.id().compareTo(pendingMsgs.discardId) > 0)
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
* Processes join request message.
*
* @param msg Join request message.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9314a68e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
index 9529f9d..2096836 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
@@ -30,11 +30,6 @@ import static org.apache.ignite.transactions.TransactionConcurrency.*;
*/
public class GridCachePartitionedNodeRestartTest extends GridCacheAbstractNodeRestartSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-882");
- }
-
- /** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration c = super.getConfiguration(gridName);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9314a68e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java
index 62cc6b1..2d8f431 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java
@@ -32,7 +32,7 @@ import static org.apache.ignite.transactions.TransactionConcurrency.*;
public class GridCachePartitionedOptimisticTxNodeRestartTest extends GridCacheAbstractNodeRestartSelfTest {
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-882");
+ fail("https://issues.apache.org/jira/browse/IGNITE-1090");
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9314a68e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
index 4269ea6..3461dd4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFailoverSelfTest.java
@@ -28,11 +28,6 @@ import static org.apache.ignite.cache.CacheMode.*;
*/
public class GridCacheReplicatedFailoverSelfTest extends GridCacheAbstractFailoverTxSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-882");
- }
-
- /** {@inheritDoc} */
@Override protected CacheMode cacheMode() {
return REPLICATED;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9314a68e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
index dfdfd7e..8ce96cd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
@@ -29,11 +29,6 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
*/
public class GridCacheReplicatedNodeRestartSelfTest extends GridCacheAbstractNodeRestartSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-882");
- }
-
- /** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration c = super.getConfiguration(gridName);
[04/50] incubator-ignite git commit: Kafka module version changed
Posted by sb...@apache.org.
Kafka module version changed
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b6803e7e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b6803e7e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b6803e7e
Branch: refs/heads/ignite-gg-10052
Commit: b6803e7e1d71d6f6b54b0e9cd769ec6ca91d0564
Parents: 63fce5a
Author: agura <ag...@gridgain.com>
Authored: Fri Jul 3 19:54:19 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 19:54:19 2015 +0300
----------------------------------------------------------------------
modules/kafka/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6803e7e/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index 43909bc..d0e9cd9 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -31,7 +31,7 @@
</parent>
<artifactId>ignite-kafka</artifactId>
- <version>1.1.6-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
<dependencies>
<dependency>
[38/50] incubator-ignite git commit: #IGNITE-591 - Minor
Posted by sb...@apache.org.
#IGNITE-591 - Minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cd01e4c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cd01e4c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cd01e4c3
Branch: refs/heads/ignite-gg-10052
Commit: cd01e4c39362e5c27fe749fcd1cf2788b50bcc3d
Parents: 9a51cdf
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Tue Jul 7 19:21:15 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Tue Jul 7 19:21:15 2015 -0700
----------------------------------------------------------------------
.../apache/ignite/internal/processors/cache/GridCacheContext.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd01e4c3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index c454da9..eb813c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -220,7 +220,6 @@ public class GridCacheContext<K, V> implements Externalizable {
* @param dataStructuresMgr Cache dataStructures manager.
* @param ttlMgr TTL manager.
* @param drMgr Data center replication manager.
- * @param jtaMgr JTA manager.
* @param rslvrMgr Conflict resolution manager.
* @param pluginMgr Cache plugin manager.
*/
[26/50] incubator-ignite git commit: Merge branches 'ignite-591' and
'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into
ignite-591
Posted by sb...@apache.org.
Merge branches 'ignite-591' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5dc2d2bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5dc2d2bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5dc2d2bc
Branch: refs/heads/ignite-gg-10052
Commit: 5dc2d2bc41bf04d0b7c538dd1a37b3cbc67c45e6
Parents: e54f572 44506c3
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 14:23:41 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 14:23:41 2015 +0300
----------------------------------------------------------------------
modules/core/pom.xml | 4 +-
.../internal/interop/InteropIgnition.java | 31 ++--
.../processors/cache/CacheObjectImpl.java | 1 -
.../dht/GridPartitionedGetFuture.java | 13 +-
.../ignite/internal/util/IgniteUtils.java | 6 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 26 +++
.../cache/CacheFutureExceptionSelfTest.java | 171 +++++++++++++++++++
.../GridCachePartitionedNodeRestartTest.java | 5 -
...ePartitionedOptimisticTxNodeRestartTest.java | 2 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 -
.../GridCacheReplicatedNodeRestartSelfTest.java | 5 -
...acheAtomicReplicatedNodeRestartSelfTest.java | 10 ++
.../TcpDiscoveryNodeConsistentIdSelfTest.java | 80 +++++++++
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +
modules/mesos/pom.xml | 1 -
modules/rest-http/pom.xml | 14 +-
modules/urideploy/pom.xml | 8 +-
modules/web/pom.xml | 6 +-
parent/pom.xml | 1 +
20 files changed, 343 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
[44/50] incubator-ignite git commit: Apache license added to
ignite-kafka modeule
Posted by sb...@apache.org.
Apache license added to ignite-kafka modeule
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1cf479bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1cf479bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1cf479bc
Branch: refs/heads/ignite-gg-10052
Commit: 1cf479bca360f7381e38f7e1e8ec5e19511d0a33
Parents: 82f4992
Author: agura <ag...@gridgain.com>
Authored: Wed Jul 8 13:30:42 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Wed Jul 8 13:30:42 2015 +0300
----------------------------------------------------------------------
modules/kafka/licenses/apache-2.0.txt | 202 +++++++++++++++++++++++++++++
1 file changed, 202 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1cf479bc/modules/kafka/licenses/apache-2.0.txt
----------------------------------------------------------------------
diff --git a/modules/kafka/licenses/apache-2.0.txt b/modules/kafka/licenses/apache-2.0.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/modules/kafka/licenses/apache-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
[40/50] incubator-ignite git commit: merge from ignite-747
Posted by sb...@apache.org.
merge from ignite-747
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4031db76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4031db76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4031db76
Branch: refs/heads/ignite-gg-10052
Commit: 4031db76d2bd9992001a5b63f17af7739e82cff0
Parents: 0f1b31a
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 8 10:19:11 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 8 10:19:11 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ServerImpl.java | 20 +++++++++++
.../tcp/internal/TcpDiscoveryNode.java | 2 +-
.../tcp/internal/TcpDiscoveryNodesRing.java | 8 ++++-
.../tcp/internal/TcpDiscoveryStatistics.java | 10 ++++--
...acheAtomicReplicatedNodeRestartSelfTest.java | 8 ++---
.../tcp/TcpDiscoveryMultiThreadedTest.java | 38 ++++++++++++++++++++
.../IgniteSpiDiscoverySelfTestSuite.java | 3 ++
7 files changed, 81 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4031db76/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index f8fae34..d51293e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -2881,6 +2881,24 @@ class ServerImpl extends TcpDiscoveryImpl {
msg.verify(locNodeId);
}
+ else if (!locNodeId.equals(node.id()) && ring.node(node.id()) != null) {
+ // Local node already has node from message in local topology.
+ // Just pass it to coordinator via the ring.
+ if (ring.hasRemoteNodes())
+ sendMessageAcrossRing(msg);
+
+ if (log.isDebugEnabled())
+ log.debug("Local node already has node being added. Passing TcpDiscoveryNodeAddedMessage to " +
+ "coordinator for final processing [ring=" + ring + ", node=" + node + ", locNode="
+ + locNode + ", msg=" + msg + ']');
+
+ if (debugMode)
+ debugLog("Local node already has node being added. Passing TcpDiscoveryNodeAddedMessage to " +
+ "coordinator for final processing [ring=" + ring + ", node=" + node + ", locNode="
+ + locNode + ", msg=" + msg + ']');
+
+ return;
+ }
if (msg.verified() && !locNodeId.equals(node.id())) {
if (node.internalOrder() <= ring.maxInternalOrder()) {
@@ -3163,6 +3181,8 @@ class ServerImpl extends TcpDiscoveryImpl {
if (msg.verified() && locNodeId.equals(nodeId) && spiStateCopy() == CONNECTING) {
assert node != null;
+ assert topVer > 0 : "Invalid topology version: " + msg;
+
ring.topologyVersion(topVer);
node.order(topVer);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4031db76/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
index 36ae39e..4b4df45 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
@@ -300,7 +300,7 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements Cluste
* @param order Order of the node.
*/
public void order(long order) {
- assert order >= 0 : "Order is invalid: " + this;
+ assert order > 0 : "Order is invalid: " + this;
this.order = order;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4031db76/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
index e9eaa1d..acb479d 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
@@ -34,7 +34,13 @@ public class TcpDiscoveryNodesRing {
/** Visible nodes filter. */
public static final IgnitePredicate<TcpDiscoveryNode> VISIBLE_NODES = new P1<TcpDiscoveryNode>() {
@Override public boolean apply(TcpDiscoveryNode node) {
- return node.visible();
+ if (node.visible()) {
+ assert node.order() > 0 : "Invalid node order: " + node;
+
+ return true;
+ }
+
+ return false;
}
};
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4031db76/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
index da8c4ea..377d8a8 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
@@ -256,7 +256,10 @@ public class TcpDiscoveryStatistics {
if (maxMsgQueueTime < duration)
maxMsgQueueTime = duration;
- avgMsgQueueTime = (avgMsgQueueTime * (totalReceivedMessages() -1)) / totalProcessedMessages();
+ int totalProcMsgs = totalProcessedMessages();
+
+ if (totalProcMsgs != 0)
+ avgMsgQueueTime = (avgMsgQueueTime * (totalProcMsgs - 1)) / totalProcMsgs;
}
msgsProcStartTs.put(msg.id(), U.currentTimeMillis());
@@ -275,7 +278,10 @@ public class TcpDiscoveryStatistics {
if (startTs != null) {
long duration = U.currentTimeMillis() - startTs;
- avgMsgProcTime = (avgMsgProcTime * (totalProcessedMessages() - 1) + duration) / totalProcessedMessages();
+ int totalProcMsgs = totalProcessedMessages();
+
+ if (totalProcMsgs != 0)
+ avgMsgProcTime = (avgMsgProcTime * (totalProcMsgs - 1) + duration) / totalProcMsgs;
if (duration > maxMsgProcTime) {
maxMsgProcTime = duration;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4031db76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
index 54409d1..b4ed18d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
@@ -26,17 +26,17 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
*/
public class IgniteCacheAtomicReplicatedNodeRestartSelfTest extends GridCacheReplicatedNodeRestartSelfTest {
/** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-747");
+ @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1095");
}
/** {@inheritDoc} */
- @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable {
+ @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
fail("https://issues.apache.org/jira/browse/IGNITE-1095");
}
/** {@inheritDoc} */
- @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable {
+ @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable {
fail("https://issues.apache.org/jira/browse/IGNITE-1095");
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4031db76/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
index cfefff4..0bf7cad 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
@@ -21,8 +21,10 @@ import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
import org.apache.ignite.testframework.junits.common.*;
import java.util.concurrent.*;
@@ -100,6 +102,8 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
* @throws Exception If any error occurs.
*/
public void testMultiThreaded() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1100");
+
execute();
}
@@ -126,6 +130,40 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
}
/**
+ * @throws Exception If any error occurs.
+ */
+ public void testMultipleStartOnCoordinatorStop() throws Exception{
+ startGrids(GRID_CNT);
+
+ final CyclicBarrier barrier = new CyclicBarrier(GRID_CNT + 4);
+
+ final AtomicInteger startIdx = new AtomicInteger(GRID_CNT);
+
+ IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ barrier.await();
+
+ Ignite ignite = startGrid(startIdx.getAndIncrement());
+
+ assertFalse(ignite.configuration().isClientMode());
+
+ log.info("Started node: " + ignite.name());
+
+ return null;
+ }
+ }, GRID_CNT + 3, "start-thread");
+
+ barrier.await();
+
+ U.sleep(ThreadLocalRandom.current().nextInt(10, 100));
+
+ for (int i = 0; i < GRID_CNT; i++)
+ stopGrid(i);
+
+ fut.get();
+ }
+
+ /**
* @throws Exception If failed.
*/
private void execute() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4031db76/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
index 498f50c..6f59f14 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
@@ -57,6 +57,9 @@ public class IgniteSpiDiscoverySelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(TcpDiscoveryNodeConsistentIdSelfTest.class));
+ suite.addTest(new TestSuite(TcpDiscoveryRestartTest.class));
+ suite.addTest(new TestSuite(TcpDiscoveryMultiThreadedTest.class));
+
return suite;
}
}
[05/50] incubator-ignite git commit: Kafka streamer test suite added
Posted by sb...@apache.org.
Kafka streamer test suite added
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f72b2914
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f72b2914
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f72b2914
Branch: refs/heads/ignite-gg-10052
Commit: f72b291498d413d870669e8dcd7cc2a5f3b81b51
Parents: b6803e7
Author: agura <ag...@gridgain.com>
Authored: Fri Jul 3 21:18:57 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Fri Jul 3 21:18:57 2015 +0300
----------------------------------------------------------------------
.../kafka/IgniteKafkaStreamerSelfTestSuite.java | 37 ++++++++++++++++++++
1 file changed, 37 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f72b2914/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java
new file mode 100644
index 0000000..a2dfd17
--- /dev/null
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/IgniteKafkaStreamerSelfTestSuite.java
@@ -0,0 +1,37 @@
+/*
+ * 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.stream.kafka;
+
+import junit.framework.*;
+
+/**
+ * Apache Kafka streamer tests.
+ */
+public class IgniteKafkaStreamerSelfTestSuite extends TestSuite {
+ /**
+ * @return Test suite.
+ * @throws Exception Thrown in case of the failure.
+ */
+ public static TestSuite suite() throws Exception {
+ TestSuite suite = new TestSuite("Apache Kafka streamer Test Suite");
+
+ suite.addTest(new TestSuite(KafkaIgniteStreamerSelfTest.class));
+
+ return suite;
+ }
+}
[32/50] incubator-ignite git commit: ignite-1031 Query metrics
updated incorrectly
Posted by sb...@apache.org.
ignite-1031 Query metrics updated incorrectly
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c04cba9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c04cba9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c04cba9e
Branch: refs/heads/ignite-gg-10052
Commit: c04cba9e82d3f9a7a5d851047de92322c54cc568
Parents: 9d0aa6f
Author: agura <ag...@gridgain.com>
Authored: Tue Jul 7 19:28:38 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Tue Jul 7 19:28:38 2015 +0300
----------------------------------------------------------------------
.../cache/query/GridCacheQueryAdapter.java | 35 ++++-
.../processors/query/GridQueryProcessor.java | 5 +
.../CacheAbstractQueryMetricsSelfTest.java | 157 ++++++++++++++++++-
.../cache/CacheLocalQueryMetricsSelfTest.java | 33 ++++
...titionedQueryMetricsDistributedSelfTest.java | 33 ++++
...chePartitionedQueryMetricsLocalSelfTest.java | 33 ++++
.../CachePartitionedQueryMetricsSelfTest.java | 32 ----
...plicatedQueryMetricsDistributedSelfTest.java | 33 ++++
...acheReplicatedQueryMetricsLocalSelfTest.java | 33 ++++
.../CacheReplicatedQueryMetricsSelfTest.java | 32 ----
.../IgniteCacheQuerySelfTestSuite.java | 7 +-
11 files changed, 361 insertions(+), 72 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index 5b82c34..c2425f0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -36,6 +36,7 @@ import org.jetbrains.annotations.*;
import java.util.*;
+import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.*;
/**
@@ -413,12 +414,19 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> {
@SuppressWarnings("IfMayBeConditional")
private <R> CacheQueryFuture<R> execute(@Nullable IgniteReducer<T, R> rmtReducer,
@Nullable IgniteClosure<T, R> rmtTransform, @Nullable Object... args) {
- Collection<ClusterNode> nodes = nodes();
+ Collection<ClusterNode> nodes;
+
+ try {
+ nodes = nodes();
+ }
+ catch (IgniteCheckedException e) {
+ return queryErrorFuture(cctx, e, log);
+ }
cctx.checkSecurity(SecurityPermission.CACHE_READ);
if (nodes.isEmpty())
- return new GridCacheQueryErrorFuture<>(cctx.kernalContext(), new ClusterGroupEmptyCheckedException());
+ return queryErrorFuture(cctx, new ClusterGroupEmptyCheckedException(), log);
if (log.isDebugEnabled())
log.debug("Executing query [query=" + this + ", nodes=" + nodes + ']');
@@ -429,7 +437,7 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> {
cctx.deploy().registerClasses(args);
}
catch (IgniteCheckedException e) {
- return new GridCacheQueryErrorFuture<>(cctx.kernalContext(), e);
+ return queryErrorFuture(cctx, e, log);
}
}
@@ -457,7 +465,7 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> {
/**
* @return Nodes to execute on.
*/
- private Collection<ClusterNode> nodes() {
+ private Collection<ClusterNode> nodes() throws IgniteCheckedException {
CacheMode cacheMode = cctx.config().getCacheMode();
switch (cacheMode) {
@@ -466,6 +474,10 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> {
U.warn(log, "Ignoring query projection because it's executed over LOCAL cache " +
"(only local node will be queried): " + this);
+ if (type == SCAN && cctx.config().getCacheMode() == LOCAL &&
+ partition() != null && partition() >= cctx.affinity().partitions())
+ throw new IgniteCheckedException("Invalid partition number: " + partition());
+
return Collections.singletonList(cctx.localNode());
case REPLICATED:
@@ -513,6 +525,21 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> {
});
}
+ /**
+ * @param cctx Cache context.
+ * @param e Exception.
+ * @param log Logger.
+ */
+ private static <T> GridCacheQueryErrorFuture<T> queryErrorFuture(GridCacheContext<?, ?> cctx,
+ Exception e, IgniteLogger log) {
+
+ GridCacheQueryMetricsAdapter metrics = (GridCacheQueryMetricsAdapter)cctx.queries().metrics();
+
+ GridQueryProcessor.onExecuted(cctx, metrics, null, e, 0, 0, log);
+
+ return new GridCacheQueryErrorFuture<>(cctx.kernalContext(), e);
+ }
+
/** {@inheritDoc} */
@Override public String toString() {
return S.toString(GridCacheQueryAdapter.class, this);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index e080c6d..6af0f40 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -1453,6 +1453,11 @@ public class GridQueryProcessor extends GridProcessorAdapter {
throw (IgniteCheckedException)err;
}
+ catch (Exception e) {
+ err = e;
+
+ throw new IgniteCheckedException(e);
+ }
finally {
GridCacheQueryMetricsAdapter metrics = (GridCacheQueryMetricsAdapter)cctx.queries().metrics();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java
index 63912bf..3eb96b6 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java
@@ -33,7 +33,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
*/
public abstract class CacheAbstractQueryMetricsSelfTest extends GridCommonAbstractTest {
/** Grid count. */
- private static final int GRID_CNT = 2;
+ protected int gridCnt;
/** Cache mode. */
protected CacheMode cacheMode;
@@ -43,7 +43,7 @@ public abstract class CacheAbstractQueryMetricsSelfTest extends GridCommonAbstra
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
- startGridsMultiThreaded(GRID_CNT);
+ startGridsMultiThreaded(gridCnt);
}
/** {@inheritDoc} */
@@ -122,6 +122,57 @@ public abstract class CacheAbstractQueryMetricsSelfTest extends GridCommonAbstra
}
/**
+ * Test metrics for failed SQL queries.
+ *
+ * @throws Exception In case of error.
+ */
+ public void testSqlFieldsQueryFailedMetrics() throws Exception {
+ IgniteCache<String, Integer> cache = grid(0).context().cache().jcache("A");
+
+ // Execute query.
+ SqlFieldsQuery qry = new SqlFieldsQuery("select * from UNKNOWN");
+
+ try {
+ cache.query(qry).getAll();
+ }
+ catch (Exception e) {
+ // No-op.
+ }
+
+ QueryMetrics m = cache.queryMetrics();
+
+ assert m != null;
+
+ info("Metrics: " + m);
+
+ assertEquals(1, m.executions());
+ assertEquals(1, m.fails());
+ assertTrue(m.averageTime() >= 0);
+ assertTrue(m.maximumTime() >= 0);
+ assertTrue(m.minimumTime() >= 0);
+
+ // Execute again with the same parameters.
+ try {
+ cache.query(qry).getAll();
+ }
+ catch (Exception e) {
+ // No-op.
+ }
+
+ m = cache.queryMetrics();
+
+ assert m != null;
+
+ info("Metrics: " + m);
+
+ assertEquals(2, m.executions());
+ assertEquals(2, m.fails());
+ assertTrue(m.averageTime() >= 0);
+ assertTrue(m.maximumTime() >= 0);
+ assertTrue(m.minimumTime() >= 0);
+ }
+
+ /**
* Test metrics for Scan queries.
*
* @throws Exception In case of error.
@@ -163,6 +214,57 @@ public abstract class CacheAbstractQueryMetricsSelfTest extends GridCommonAbstra
}
/**
+ * Test metrics for failed Scan queries.
+ *
+ * @throws Exception In case of error.
+ */
+ public void testScanQueryFailedMetrics() throws Exception {
+ IgniteCache<String, Integer> cache = grid(0).context().cache().jcache("A");
+
+ // Execute query.
+ ScanQuery<String, Integer> qry = new ScanQuery<>(Integer.MAX_VALUE);
+
+ try {
+ cache.query(qry).getAll();
+ }
+ catch (Exception e) {
+ // No-op.
+ }
+
+ QueryMetrics m = cache.queryMetrics();
+
+ assert m != null;
+
+ info("Metrics: " + m);
+
+ assertEquals(1, m.executions());
+ assertEquals(1, m.fails());
+ assertTrue(m.averageTime() >= 0);
+ assertTrue(m.maximumTime() >= 0);
+ assertTrue(m.minimumTime() >= 0);
+
+ // Execute again with the same parameters.
+ try {
+ cache.query(qry).getAll();
+ }
+ catch (Exception e) {
+ // No-op.
+ }
+
+ m = cache.queryMetrics();
+
+ assert m != null;
+
+ info("Metrics: " + m);
+
+ assertEquals(2, m.executions());
+ assertEquals(2, m.fails());
+ assertTrue(m.averageTime() >= 0);
+ assertTrue(m.maximumTime() >= 0);
+ assertTrue(m.minimumTime() >= 0);
+ }
+
+ /**
* Test metrics for SQL cross cache queries.
*
* @throws Exception In case of error.
@@ -202,4 +304,55 @@ public abstract class CacheAbstractQueryMetricsSelfTest extends GridCommonAbstra
assertTrue(m.maximumTime() >= 0);
assertTrue(m.minimumTime() >= 0);
}
+
+ /**
+ * Test metrics for failed SQL cross cache queries.
+ *
+ * @throws Exception In case of error.
+ */
+ public void testSqlCrossCacheQueryFailedMetrics() throws Exception {
+ IgniteCache<String, Integer> cache = grid(0).context().cache().jcache("A");
+
+ // Execute query.
+ SqlFieldsQuery qry = new SqlFieldsQuery("select * from \"G\".Integer");
+
+ try {
+ cache.query(qry).getAll();
+ }
+ catch (Exception e) {
+ // No-op
+ }
+
+ QueryMetrics m = cache.queryMetrics();
+
+ assert m != null;
+
+ info("Metrics: " + m);
+
+ assertEquals(1, m.executions());
+ assertEquals(1, m.fails());
+ assertTrue(m.averageTime() >= 0);
+ assertTrue(m.maximumTime() >= 0);
+ assertTrue(m.minimumTime() >= 0);
+
+ // Execute again with the same parameters.
+ try {
+ cache.query(qry).getAll();
+ }
+ catch (Exception e) {
+ // No-op.
+ }
+
+ m = cache.queryMetrics();
+
+ assert m != null;
+
+ info("Metrics: " + m);
+
+ assertEquals(2, m.executions());
+ assertEquals(2, m.fails());
+ assertTrue(m.averageTime() >= 0);
+ assertTrue(m.maximumTime() >= 0);
+ assertTrue(m.minimumTime() >= 0);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheLocalQueryMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheLocalQueryMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheLocalQueryMetricsSelfTest.java
new file mode 100644
index 0000000..d28d3a0
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheLocalQueryMetricsSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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 static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Tests for local cache query metrics.
+ */
+public class CacheLocalQueryMetricsSelfTest extends CacheAbstractQueryMetricsSelfTest {
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ gridCnt = 1;
+ cacheMode = LOCAL;
+
+ super.beforeTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsDistributedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsDistributedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsDistributedSelfTest.java
new file mode 100644
index 0000000..f54a091
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsDistributedSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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 static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Tests for partitioned distributed cache query metrics.
+ */
+public class CachePartitionedQueryMetricsDistributedSelfTest extends CacheAbstractQueryMetricsSelfTest {
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ gridCnt = 2;
+ cacheMode = PARTITIONED;
+
+ super.beforeTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsLocalSelfTest.java
new file mode 100644
index 0000000..efeb5d3
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsLocalSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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 static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Tests for partitioned local cache query metrics.
+ */
+public class CachePartitionedQueryMetricsLocalSelfTest extends CacheAbstractQueryMetricsSelfTest {
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ gridCnt = 1;
+ cacheMode = PARTITIONED;
+
+ super.beforeTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsSelfTest.java
deleted file mode 100644
index 666acfb..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CachePartitionedQueryMetricsSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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 static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Tests for partitioned cache query metrics.
- */
-public class CachePartitionedQueryMetricsSelfTest extends CacheAbstractQueryMetricsSelfTest {
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- cacheMode = PARTITIONED;
-
- super.beforeTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsDistributedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsDistributedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsDistributedSelfTest.java
new file mode 100644
index 0000000..ae2a420
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsDistributedSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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 static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Tests for replicated distributed cache query metrics.
+ */
+public class CacheReplicatedQueryMetricsDistributedSelfTest extends CacheAbstractQueryMetricsSelfTest {
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ gridCnt = 2;
+ cacheMode = REPLICATED;
+
+ super.beforeTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsLocalSelfTest.java
new file mode 100644
index 0000000..d411f9c
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsLocalSelfTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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 static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Tests for replicated local cache query metrics.
+ */
+public class CacheReplicatedQueryMetricsLocalSelfTest extends CacheAbstractQueryMetricsSelfTest {
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ gridCnt = 1;
+ cacheMode = REPLICATED;
+
+ super.beforeTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsSelfTest.java
deleted file mode 100644
index 2be6dd3..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheReplicatedQueryMetricsSelfTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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 static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Tests for replicated cache query metrics.
- */
-public class CacheReplicatedQueryMetricsSelfTest extends CacheAbstractQueryMetricsSelfTest {
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- cacheMode = REPLICATED;
-
- super.beforeTest();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c04cba9e/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 181ff0c..2d7d0ce 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -116,8 +116,11 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
suite.addTestSuite(H2CompareBigQueryTest.class);
// Cache query metrics.
- suite.addTestSuite(CachePartitionedQueryMetricsSelfTest.class);
- suite.addTestSuite(CacheReplicatedQueryMetricsSelfTest.class);
+ suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class);
+ suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class);
+ suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class);
+ suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class);
+ suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class);
//Unmarshallig query test.
suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class);
[25/50] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/44506c39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/44506c39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/44506c39
Branch: refs/heads/ignite-gg-10052
Commit: 44506c39da5baf887b72711795cdf50d01b87372
Parents: 9314a68 8c1ba5a
Author: Denis Magda <dm...@gridgain.com>
Authored: Tue Jul 7 14:13:57 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Tue Jul 7 14:13:57 2015 +0300
----------------------------------------------------------------------
.../cache/CacheFutureExceptionSelfTest.java | 171 +++++++++++++++++++
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
2 files changed, 172 insertions(+)
----------------------------------------------------------------------
[31/50] incubator-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/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6ed5c1c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6ed5c1c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6ed5c1c6
Branch: refs/heads/ignite-gg-10052
Commit: 6ed5c1c694dbdf40840aaf7457f883959e8aa917
Parents: 96fa300 9d0aa6f
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Jul 7 18:07:55 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Jul 7 18:07:55 2015 +0300
----------------------------------------------------------------------
.../cache/eviction/fifo/FifoEvictionPolicy.java | 5 -
.../cache/eviction/lru/LruEvictionPolicy.java | 5 -
.../eviction/sorted/SortedEvictionPolicy.java | 19 +--
.../ignite/spi/discovery/tcp/ServerImpl.java | 26 +++
.../cache/CacheFutureExceptionSelfTest.java | 171 +++++++++++++++++++
.../GridCachePartitionedNodeRestartTest.java | 5 -
...ePartitionedOptimisticTxNodeRestartTest.java | 2 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 -
.../GridCacheReplicatedNodeRestartSelfTest.java | 5 -
...heConcurrentEvictionConsistencySelfTest.java | 15 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
11 files changed, 217 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
[34/50] incubator-ignite git commit: # master: update DEFAULT_BRANCH
to master.
Posted by sb...@apache.org.
# master: update DEFAULT_BRANCH to master.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/17ee8a6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/17ee8a6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/17ee8a6b
Branch: refs/heads/ignite-gg-10052
Commit: 17ee8a6b837c6266b5065b956df0918305ec8814
Parents: 9d0aa6f
Author: ashutak <as...@gridgain.com>
Authored: Tue Jul 7 20:39:14 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Tue Jul 7 20:39:14 2015 +0300
----------------------------------------------------------------------
dev-tools/slurp.sh | 2 +-
scripts/git-patch-prop.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17ee8a6b/dev-tools/slurp.sh
----------------------------------------------------------------------
diff --git a/dev-tools/slurp.sh b/dev-tools/slurp.sh
index 7edc776..ad7bc01 100755
--- a/dev-tools/slurp.sh
+++ b/dev-tools/slurp.sh
@@ -24,7 +24,7 @@
#
# Default branch name. Need to use last version of "jiraslurp" scripts.
#
-DEFAULT_BRANCH='ignite-sprint-5'
+DEFAULT_BRANCH='master'
#
# TC URL. It is 10.30.0.229 for public TC from agents.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17ee8a6b/scripts/git-patch-prop.sh
----------------------------------------------------------------------
diff --git a/scripts/git-patch-prop.sh b/scripts/git-patch-prop.sh
index 16f907e..1b531fa 100644
--- a/scripts/git-patch-prop.sh
+++ b/scripts/git-patch-prop.sh
@@ -19,6 +19,6 @@
#
# Git patch-file maker/applier properties.
#
-IGNITE_DEFAULT_BRANCH='ignite-sprint-7'
+IGNITE_DEFAULT_BRANCH='master'
PATCHES_HOME=${IGNITE_HOME}
[30/50] incubator-ignite git commit: GG-10469: Done.
Posted by sb...@apache.org.
GG-10469: Done.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/96fa3002
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/96fa3002
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/96fa3002
Branch: refs/heads/ignite-gg-10052
Commit: 96fa3002904fcad50dafc1f19655c2d44eaece40
Parents: 96c9695
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Jul 7 18:07:05 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Jul 7 18:07:05 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/interop/InteropIgnition.java | 17 ++++++++++++++++-
.../ignite/internal/interop/InteropProcessor.java | 7 +++++++
2 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/96fa3002/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
index 2989a17..faae72b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropIgnition.java
@@ -50,6 +50,9 @@ public class InteropIgnition {
*/
public static synchronized InteropProcessor start(@Nullable String springCfgPath, @Nullable String gridName,
int factoryId, long envPtr, long dataPtr) {
+ if (envPtr <= 0)
+ throw new IgniteException("Environment pointer must be positive.");
+
ClassLoader oldClsLdr = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(InteropIgnition.class.getClassLoader());
@@ -83,13 +86,25 @@ public class InteropIgnition {
* Get instance by environment pointer.
*
* @param gridName Grid name.
- * @return Instance or {@code null} if it doesn't exists (never started or stopped).
+ * @return Instance or {@code null} if it doesn't exist (never started or stopped).
*/
@Nullable public static synchronized InteropProcessor instance(@Nullable String gridName) {
return instances.get(gridName);
}
/**
+ * Get environment pointer of the given instance.
+ *
+ * @param gridName Grid name.
+ * @return Environment pointer or {@code 0} in case grid with such name doesn't exist.
+ */
+ public static synchronized long environmentPointer(@Nullable String gridName) {
+ InteropProcessor proc = instance(gridName);
+
+ return proc != null ? proc.environmentPointer() : 0;
+ }
+
+ /**
* Stop single instance.
*
* @param gridName Grid name,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/96fa3002/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropProcessor.java
index 325a464..94b733f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/interop/InteropProcessor.java
@@ -32,6 +32,13 @@ public interface InteropProcessor {
public Ignite ignite();
/**
+ * Get environment pointer associated with this processor.
+ *
+ * @return Environment pointer.
+ */
+ public long environmentPointer();
+
+ /**
* Get stop runnable to perform cleanup when interop is not longer used.
* <p/>
* <b>NOTE!</b> This runnable is called when current instance of interop processor is eligible for garbage
[11/50] incubator-ignite git commit: disable failing test
Posted by sb...@apache.org.
disable failing test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3a4d008b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3a4d008b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3a4d008b
Branch: refs/heads/ignite-gg-10052
Commit: 3a4d008b07ec9971e229e5bdb99bab38858634e5
Parents: b1342ba
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Jul 6 10:32:06 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Jul 6 10:32:06 2015 +0300
----------------------------------------------------------------------
.../replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a4d008b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
index c802d7c..54409d1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheAtomicReplicatedNodeRestartSelfTest.java
@@ -27,7 +27,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
public class IgniteCacheAtomicReplicatedNodeRestartSelfTest extends GridCacheReplicatedNodeRestartSelfTest {
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
- //fail("https://issues.apache.org/jira/browse/IGNITE-747");
+ fail("https://issues.apache.org/jira/browse/IGNITE-747");
}
/** {@inheritDoc} */
[36/50] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10052
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10052
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1cda3b19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1cda3b19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1cda3b19
Branch: refs/heads/ignite-gg-10052
Commit: 1cda3b190e115bf93dea5c1656e0de064b09e7c7
Parents: fe12ad3 0f1b31a
Author: iveselovskiy <iv...@gridgain.com>
Authored: Tue Jul 7 20:58:43 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Tue Jul 7 20:58:43 2015 +0300
----------------------------------------------------------------------
assembly/dependencies-fabric.xml | 1 +
bin/ignite.bat | 8 +-
bin/ignite.sh | 6 +-
bin/include/parseargs.bat | 1 +
bin/include/parseargs.sh | 3 +
dev-tools/slurp.sh | 2 +-
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
.../s3/S3CheckpointManagerSelfTest.java | 2 +-
.../checkpoint/s3/S3CheckpointSpiSelfTest.java | 4 +-
.../s3/S3CheckpointSpiStartStopSelfTest.java | 2 +-
.../s3/S3SessionCheckpointSelfTest.java | 2 +-
.../s3/TcpDiscoveryS3IpFinderSelfTest.java | 2 +-
modules/clients/pom.xml | 2 +-
.../ClientAbstractConnectivitySelfTest.java | 4 +-
modules/cloud/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 6 +-
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../apache/ignite/IgniteSystemProperties.java | 6 +
.../cache/eviction/fifo/FifoEvictionPolicy.java | 5 -
.../cache/eviction/lru/LruEvictionPolicy.java | 5 -
.../eviction/sorted/SortedEvictionPolicy.java | 19 +-
.../org/apache/ignite/cluster/ClusterGroup.java | 18 +-
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../configuration/CacheConfiguration.java | 105 +--
.../configuration/IgniteReflectionFactory.java | 81 +-
.../configuration/NearCacheConfiguration.java | 10 +-
.../ignite/internal/GridKernalContextImpl.java | 5 +-
.../apache/ignite/internal/IgniteKernal.java | 1 -
.../ignite/internal/MarshallerContextImpl.java | 12 +-
.../client/GridClientConfiguration.java | 4 +-
.../internal/cluster/ClusterGroupAdapter.java | 50 +-
.../cluster/IgniteClusterAsyncImpl.java | 12 +-
.../internal/interop/InteropIgnition.java | 48 +-
.../internal/interop/InteropProcessor.java | 7 +
.../internal/managers/GridManagerAdapter.java | 8 +-
.../managers/communication/GridIoManager.java | 173 ++--
.../managers/communication/GridIoMessage.java | 15 +-
.../managers/communication/GridIoPolicy.java | 32 +-
.../discovery/GridDiscoveryManager.java | 62 +-
.../eventstorage/GridEventStorageManager.java | 2 +-
.../affinity/AffinityTopologyVersion.java | 7 -
.../processors/cache/CacheObjectImpl.java | 1 -
.../processors/cache/CacheOperationContext.java | 44 +-
.../internal/processors/cache/CacheType.java | 8 +-
.../processors/cache/GridCacheAdapter.java | 95 ++-
.../processors/cache/GridCacheAtomicFuture.java | 12 +-
.../processors/cache/GridCacheContext.java | 6 +-
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheIoManager.java | 74 +-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../GridCachePartitionExchangeManager.java | 77 +-
.../processors/cache/GridCacheProcessor.java | 62 +-
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/GridCacheSwapManager.java | 261 +++---
.../processors/cache/GridCacheUtils.java | 51 ++
.../processors/cache/IgniteCacheFutureImpl.java | 42 +
.../processors/cache/IgniteCacheProxy.java | 50 +-
.../GridDistributedTxFinishRequest.java | 11 +-
.../GridDistributedTxPrepareRequest.java | 9 +-
.../GridDistributedTxRemoteAdapter.java | 3 +-
.../distributed/dht/GridDhtLocalPartition.java | 59 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/GridDhtPartitionTopologyImpl.java | 4 +-
.../dht/GridDhtPartitionsReservation.java | 292 +++++++
.../dht/GridDhtTransactionalCacheAdapter.java | 2 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 3 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 3 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 5 +-
.../dht/GridPartitionedGetFuture.java | 13 +-
.../cache/distributed/dht/GridReservable.java | 35 +
.../dht/atomic/GridDhtAtomicCache.java | 27 +-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 15 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 177 ++++-
.../dht/preloader/GridDhtPartitionMap.java | 26 +-
.../GridDhtPartitionsExchangeFuture.java | 95 ++-
.../near/GridNearTxFinishRequest.java | 3 +-
.../cache/distributed/near/GridNearTxLocal.java | 3 +-
.../distributed/near/GridNearTxRemote.java | 5 +-
.../cache/query/GridCacheQueryAdapter.java | 35 +-
.../cache/query/GridCacheQueryManager.java | 33 -
.../cache/query/GridCacheTwoStepQuery.java | 22 +-
.../continuous/CacheContinuousQueryHandler.java | 8 +
.../cache/transactions/IgniteInternalTx.java | 3 +-
.../cache/transactions/IgniteTxAdapter.java | 11 +-
.../cache/transactions/IgniteTxHandler.java | 2 +-
.../transactions/IgniteTxLocalAdapter.java | 15 +-
.../processors/clock/GridClockServer.java | 21 +-
.../datastructures/DataStructuresProcessor.java | 64 +-
.../datastructures/GridCacheAtomicLongImpl.java | 25 +-
.../GridCacheAtomicSequenceImpl.java | 11 +-
.../GridCacheAtomicStampedImpl.java | 21 +-
.../GridCacheCountDownLatchImpl.java | 16 +-
.../dr/IgniteDrDataStreamerCacheUpdater.java | 7 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../internal/processors/igfs/IgfsContext.java | 5 +-
.../offheap/GridOffHeapProcessor.java | 19 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../plugin/IgnitePluginProcessor.java | 3 +-
.../processors/query/GridQueryIndexing.java | 14 +-
.../processors/query/GridQueryProcessor.java | 26 +-
.../messages/GridQueryNextPageResponse.java | 34 +-
.../h2/twostep/messages/GridQueryRequest.java | 111 ++-
.../processors/rest/GridRestProcessor.java | 4 +-
.../handlers/task/GridTaskCommandHandler.java | 12 +-
.../processors/task/GridTaskProcessor.java | 23 +-
.../processors/task/GridTaskWorker.java | 4 +-
.../internal/util/GridConfigurationFinder.java | 55 +-
.../apache/ignite/internal/util/GridDebug.java | 48 +-
.../ignite/internal/util/IgniteUtils.java | 12 +-
.../internal/util/future/IgniteFutureImpl.java | 18 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../util/nio/GridNioMessageTracker.java | 23 +-
.../ignite/internal/util/nio/GridNioServer.java | 64 +-
.../apache/ignite/internal/visor/VisorJob.java | 2 +
.../internal/visor/log/VisorLogSearchTask.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 4 +
.../visor/query/VisorQueryCleanupTask.java | 14 +
.../util/VisorClusterGroupEmptyException.java | 37 +
.../plugin/extensions/communication/IoPool.java | 42 +
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 7 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 9 +-
.../communication/tcp/TcpCommunicationSpi.java | 148 +++-
.../tcp/TcpCommunicationSpiMBean.java | 19 +
.../ignite/spi/discovery/DiscoverySpi.java | 3 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 234 ++++--
.../ignite/spi/discovery/tcp/ServerImpl.java | 186 ++++-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 3 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 51 +-
.../tcp/internal/TcpDiscoveryNode.java | 18 +
.../TcpDiscoveryMulticastIpFinder.java | 76 +-
.../messages/TcpDiscoveryNodeFailedMessage.java | 18 +
.../startup/cmdline/CommandLineStartup.java | 3 +-
.../startup/cmdline/CommandLineTransformer.java | 9 +
.../core/src/main/resources/ignite.properties | 2 +-
.../core/src/test/config/spark/spark-config.xml | 46 ++
modules/core/src/test/config/tests.properties | 6 +-
.../internal/ClusterGroupAbstractTest.java | 777 ++++++++++++++++++
.../internal/ClusterGroupHostsSelfTest.java | 141 ++++
.../ignite/internal/ClusterGroupSelfTest.java | 251 ++++++
.../internal/GridDiscoveryEventSelfTest.java | 12 +-
...ridFailFastNodeFailureDetectionSelfTest.java | 17 +-
.../internal/GridProjectionAbstractTest.java | 784 -------------------
.../ignite/internal/GridProjectionSelfTest.java | 251 ------
.../apache/ignite/internal/GridSelfTest.java | 22 +-
.../GridTaskFailoverAffinityRunTest.java | 170 ++++
.../IgniteSlowClientDetectionSelfTest.java | 187 +++++
.../communication/GridIoManagerSelfTest.java | 2 +-
.../IgniteTopologyPrintFormatSelfTest.java | 289 +++++++
.../cache/CacheFutureExceptionSelfTest.java | 171 ++++
.../CacheReadThroughAtomicRestartSelfTest.java | 32 +
...heReadThroughLocalAtomicRestartSelfTest.java | 32 +
.../CacheReadThroughLocalRestartSelfTest.java | 32 +
...dThroughReplicatedAtomicRestartSelfTest.java | 32 +
...cheReadThroughReplicatedRestartSelfTest.java | 32 +
.../cache/CacheReadThroughRestartSelfTest.java | 133 ++++
.../CacheStoreUsageMultinodeAbstractTest.java | 305 ++++++++
...eUsageMultinodeDynamicStartAbstractTest.java | 169 ++++
...oreUsageMultinodeDynamicStartAtomicTest.java | 32 +
...heStoreUsageMultinodeDynamicStartTxTest.java | 32 +
...reUsageMultinodeStaticStartAbstractTest.java | 158 ++++
...toreUsageMultinodeStaticStartAtomicTest.java | 32 +
...cheStoreUsageMultinodeStaticStartTxTest.java | 32 +
.../GridCacheAbstractFailoverSelfTest.java | 6 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 24 +-
.../cache/GridCacheAbstractSelfTest.java | 2 +-
.../IgniteCacheAbstractStopBusySelfTest.java | 30 +-
.../IgniteCacheAtomicStopBusySelfTest.java | 8 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 19 +-
...gniteCacheTransactionalStopBusySelfTest.java | 8 +-
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 +++++
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
.../cache/IgniteInternalCacheTypesTest.java | 3 +-
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
...ridCachePartitionNotLoadedEventSelfTest.java | 82 ++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 2 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
.../IgniteCachePutRetryAbstractSelfTest.java | 147 ++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 +
...gniteCachePutRetryTransactionalSelfTest.java | 74 ++
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
.../GridCachePartitionedFailoverSelfTest.java | 5 +
...achePartitionedMultiNodeFullApiSelfTest.java | 53 +-
.../GridCachePartitionedNodeRestartTest.java | 5 -
...ePartitionedOptimisticTxNodeRestartTest.java | 2 +-
.../GridCacheReplicatedNodeRestartSelfTest.java | 5 -
...acheAtomicReplicatedNodeRestartSelfTest.java | 10 +
...heConcurrentEvictionConsistencySelfTest.java | 15 +-
.../GridCacheEvictionFilterSelfTest.java | 2 -
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../DataStreamerMultiThreadedSelfTest.java | 3 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../GridP2PContinuousDeploymentSelfTest.java | 2 -
.../GridTcpCommunicationSpiConfigSelfTest.java | 1 -
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++-
.../TcpDiscoveryNodeConsistentIdSelfTest.java | 80 ++
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 44 +-
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../testframework/GridSpiTestContext.java | 7 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../junits/GridTestKernalContext.java | 2 +-
.../junits/common/GridCommonAbstractTest.java | 8 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 8 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../IgniteCacheFailoverTestSuite.java | 3 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 5 +-
.../testsuites/IgniteCacheTestSuite4.java | 12 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
.../testsuites/IgniteKernalSelfTestSuite.java | 1 +
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
modules/core/src/test/resources/helloworld.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
modules/core/src/test/resources/readme.txt | 6 -
modules/docker/Dockerfile | 55 ++
modules/docker/README.txt | 11 +
modules/docker/build_users_libs.sh | 39 +
modules/docker/download_ignite.sh | 49 ++
modules/docker/execute.sh | 62 ++
modules/docker/run.sh | 34 +
modules/extdata/p2p/pom.xml | 4 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
modules/extdata/uri/META-INF/ignite.xml | 38 +
.../extdata/uri/modules/uri-dependency/pom.xml | 42 +
.../deployment/uri/tasks/GarHelloWorldBean.java | 60 ++
.../src/main/resources/gar-example.properties | 18 +
modules/extdata/uri/pom.xml | 62 +-
.../deployment/uri/tasks/GarHelloWorldTask.java | 81 ++
.../deployment/uri/tasks/gar-spring-bean.xml | 29 +
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 80 +-
.../fs/IgniteHadoopFileSystemCounterWriter.java | 9 +-
.../processors/hadoop/HadoopClassLoader.java | 29 +
.../processors/hadoop/HadoopDefaultJobInfo.java | 27 +-
.../internal/processors/hadoop/HadoopUtils.java | 237 ------
.../hadoop/SecondaryFileSystemProvider.java | 3 +-
.../hadoop/fs/HadoopFileSystemCacheUtils.java | 241 ++++++
.../hadoop/fs/HadoopFileSystemsUtils.java | 11 +
.../hadoop/fs/HadoopLazyConcurrentMap.java | 5 +
.../hadoop/jobtracker/HadoopJobTracker.java | 25 +-
.../child/HadoopChildProcessRunner.java | 3 +-
.../processors/hadoop/v2/HadoopV2Job.java | 84 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 22 +-
.../hadoop/v2/HadoopV2TaskContext.java | 37 +-
.../apache/ignite/igfs/IgfsEventsTestSuite.java | 5 +-
.../processors/hadoop/HadoopMapReduceTest.java | 2 +-
.../processors/hadoop/HadoopTasksV1Test.java | 7 +-
.../processors/hadoop/HadoopTasksV2Test.java | 7 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 3 +-
.../testsuites/IgniteHadoopTestSuite.java | 2 +-
.../IgniteIgfsLinuxAndMacOSTestSuite.java | 3 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 81 +-
.../query/h2/opt/GridH2KeyValueRowOffheap.java | 8 +-
.../processors/query/h2/opt/GridH2Table.java | 2 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 49 +-
.../query/h2/twostep/GridMapQueryExecutor.java | 321 ++++++--
.../query/h2/twostep/GridMergeIndex.java | 17 +-
.../h2/twostep/GridMergeIndexUnsorted.java | 7 +-
.../h2/twostep/GridReduceQueryExecutor.java | 650 ++++++++++++---
.../query/h2/twostep/GridResultPage.java | 21 +-
.../CacheAbstractQueryMetricsSelfTest.java | 157 +++-
.../cache/CacheLocalQueryMetricsSelfTest.java | 33 +
...titionedQueryMetricsDistributedSelfTest.java | 33 +
...chePartitionedQueryMetricsLocalSelfTest.java | 33 +
.../CachePartitionedQueryMetricsSelfTest.java | 32 -
...plicatedQueryMetricsDistributedSelfTest.java | 33 +
...acheReplicatedQueryMetricsLocalSelfTest.java | 33 +
.../CacheReplicatedQueryMetricsSelfTest.java | 32 -
.../cache/GridCacheCrossCacheQuerySelfTest.java | 3 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 196 +++++
.../IgniteCacheQueryMultiThreadedSelfTest.java | 5 +-
...lientQueryReplicatedNodeRestartSelfTest.java | 419 ++++++++++
.../IgniteCacheQueryNodeRestartSelfTest.java | 36 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 388 +++++++++
.../IgniteCacheQuerySelfTestSuite.java | 12 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../cache/jta/GridCacheXAResource.java | 18 +-
.../processors/cache/GridCacheJtaSelfTest.java | 2 +-
modules/kafka/pom.xml | 116 +++
.../ignite/stream/kafka/KafkaStreamer.java | 220 ++++++
.../kafka/IgniteKafkaStreamerSelfTestSuite.java | 37 +
.../stream/kafka/KafkaEmbeddedBroker.java | 378 +++++++++
.../kafka/KafkaIgniteStreamerSelfTest.java | 227 ++++++
.../ignite/stream/kafka/SimplePartitioner.java | 53 ++
modules/log4j/pom.xml | 2 +-
modules/mesos/pom.xml | 3 +-
modules/rest-http/pom.xml | 16 +-
modules/scalar-2.10/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
.../ignite/schema/model/PojoDescriptor.java | 2 +
.../apache/ignite/schema/model/PojoField.java | 1 +
.../parser/dialect/OracleMetadataDialect.java | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
.../org/apache/ignite/spark/IgniteContext.scala | 50 +-
.../org/apache/ignite/spark/IgniteRddSpec.scala | 18 +
modules/spring/pom.xml | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 72 +-
.../IgniteExcludeInConfigurationTest.java | 78 ++
.../org/apache/ignite/spring/sprint-exclude.xml | 57 ++
.../testsuites/IgniteSpringTestSuite.java | 2 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 10 +-
.../GridTaskUriDeploymentDeadlockSelfTest.java | 13 +-
.../ignite/p2p/GridP2PDisabledSelfTest.java | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../ignite/visor/commands/VisorConsole.scala | 3 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
.../visor/commands/open/VisorOpenCommand.scala | 319 ++++++++
.../scala/org/apache/ignite/visor/visor.scala | 230 +-----
.../ignite/visor/VisorRuntimeBaseSpec.scala | 2 +
.../commands/kill/VisorKillCommandSpec.scala | 1 +
.../commands/start/VisorStartCommandSpec.scala | 1 +
.../commands/tasks/VisorTasksCommandSpec.scala | 1 +
.../commands/vvm/VisorVvmCommandSpec.scala | 1 +
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 8 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
parent/pom.xml | 1 +
pom.xml | 15 +-
scripts/git-patch-prop.sh | 2 +-
343 files changed, 13229 insertions(+), 3151 deletions(-)
----------------------------------------------------------------------
[21/50] incubator-ignite git commit: # minor format
Posted by sb...@apache.org.
# minor format
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f2aa6ab5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f2aa6ab5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f2aa6ab5
Branch: refs/heads/ignite-gg-10052
Commit: f2aa6ab5a5e049e10bfec06142b3f734d0709996
Parents: b87f138
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 10:35:03 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 10:35:03 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/CacheObjectImpl.java | 1 -
.../distributed/dht/GridPartitionedGetFuture.java | 13 ++++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f2aa6ab5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
index ad033a7..96603f9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
@@ -77,7 +77,6 @@ public class CacheObjectImpl extends CacheObjectAdapter {
catch (IgniteCheckedException e) {
throw new IgniteException("Failed to unmarshall object.", e);
}
-
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f2aa6ab5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index 2f41e63..79d5e75 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -224,7 +224,7 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
* @param res Result.
*/
public void onResult(UUID nodeId, GridNearGetResponse res) {
- for (IgniteInternalFuture<Map<K, V>> fut : futures())
+ for (IgniteInternalFuture<Map<K, V>> fut : futures()) {
if (isMini(fut)) {
MiniFuture f = (MiniFuture)fut;
@@ -234,6 +234,7 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
f.onResult(res);
}
}
+ }
}
/** {@inheritDoc} */
@@ -702,8 +703,14 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
}
});
}
- else
- onDone(createResultMap(res.entries()));
+ else {
+ try {
+ onDone(createResultMap(res.entries()));
+ }
+ catch (Exception e) {
+ onDone(e);
+ }
+ }
}
/** {@inheritDoc} */
[18/50] incubator-ignite git commit: minor fix
Posted by sb...@apache.org.
minor fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3c4499ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3c4499ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3c4499ce
Branch: refs/heads/ignite-gg-10052
Commit: 3c4499cecf8c84d119f38762f07ac669b839faf9
Parents: b87f138
Author: Anton <av...@gridgain.com>
Authored: Mon Jul 6 20:05:14 2015 +0300
Committer: Anton <av...@gridgain.com>
Committed: Mon Jul 6 20:05:14 2015 +0300
----------------------------------------------------------------------
parent/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3c4499ce/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index bfa9f62..3ec880e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -41,7 +41,7 @@
<maven.build.timestamp.format>MMMM d yyyy</maven.build.timestamp.format>
<doxygen.exec>doxygen</doxygen.exec>
<git.exec>git</git.exec>
- <jetty.version>9.2.11.v20150529</jetty.version>
+ <jetty.version>9.0.5.v20130815</jetty.version>
</properties>
<groupId>org.apache.ignite</groupId>
[42/50] incubator-ignite git commit: # review
Posted by sb...@apache.org.
# review
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/82f49921
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/82f49921
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/82f49921
Branch: refs/heads/ignite-gg-10052
Commit: 82f49921969979589e04fb12f9902201a29ac7b2
Parents: 946b08b
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 12:38:11 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 12:38:11 2015 +0300
----------------------------------------------------------------------
.../cache/IgnitePutIndex8Benchmark.java | 42 --------------------
.../cache/IgnitePutIndexedValue8Benchmark.java | 42 ++++++++++++++++++++
2 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82f49921/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java
deleted file mode 100644
index 542a139..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndex8Benchmark.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 org.apache.ignite.*;
-import org.apache.ignite.yardstick.cache.model.*;
-
-import java.util.*;
-
-/**
- * Ignite benchmark that performs put operations for entity with indexed fields.
- */
-public class IgnitePutIndex8Benchmark extends IgniteCacheAbstractBenchmark {
- /** {@inheritDoc} */
- @Override public boolean test(Map<Object, Object> ctx) throws Exception {
- int key = nextRandom(args.range());
-
- cache.put(key, new Person8(key, key + 1, key + 2, key + 3, key + 4, key + 5, key + 6, key + 7));
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache("atomic-index");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/82f49921/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java
new file mode 100644
index 0000000..b51ff34
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutIndexedValue8Benchmark.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.*;
+
+import java.util.*;
+
+/**
+ * Ignite benchmark that performs put operations for entity with indexed fields.
+ */
+public class IgnitePutIndexedValue8Benchmark extends IgniteCacheAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ int key = nextRandom(args.range());
+
+ cache.put(key, new Person8(key, key + 1, key + 2, key + 3, key + 4, key + 5, key + 6, key + 7));
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("atomic-index");
+ }
+}