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/03 15:46:02 UTC
[01/12] incubator-ignite git commit: # ignite-gg-10416 Fixed spring
exclude properties.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-882 56c5ef5d0 -> 557fb3a40
# ignite-gg-10416 Fixed spring exclude properties.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/178c4f85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/178c4f85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/178c4f85
Branch: refs/heads/ignite-882
Commit: 178c4f85dca8d050754994b8baaaa48f011e84bc
Parents: 4375529
Author: Andrey <an...@gridgain.com>
Authored: Fri Jun 12 05:48:12 2015 +0300
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jun 12 05:48:12 2015 +0300
----------------------------------------------------------------------
.../util/spring/IgniteSpringHelperImpl.java | 58 +++++++++++++-------
.../scala/org/apache/ignite/visor/visor.scala | 3 +-
2 files changed, 39 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/178c4f85/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index 2c7c7e1..4cc080a 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -405,32 +405,48 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
GenericApplicationContext springCtx = new GenericApplicationContext();
BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
- @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
- throws BeansException {
- for (String beanName : beanFactory.getBeanDefinitionNames()) {
- BeanDefinition def = beanFactory.getBeanDefinition(beanName);
-
- if (def.getBeanClassName() != null) {
- try {
- Class.forName(def.getBeanClassName());
- }
- catch (ClassNotFoundException ignored) {
- ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
-
- continue;
+ /**
+ * @param beanFactory The bean factory used by the application context.
+ * @param beanName Bean name.
+ * @param def Registered BeanDefinition.
+ * @throws BeansException in case of errors.
+ */
+ private void processBeanDefinition(ConfigurableListableBeanFactory beanFactory, String beanName,
+ BeanDefinition def) throws BeansException {
+ if (def.getBeanClassName() != null) {
+ try {
+ Class.forName(def.getBeanClassName());
+
+ MutablePropertyValues vals = def.getPropertyValues();
+
+ for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
+ for (String excludedProp : excludedProps) {
+ if (val.getName().equals(excludedProp)) {
+ vals.removePropertyValue(val);
+
+ return;
+ }
+ }
+
+ if (val.getValue() instanceof Iterable)
+ for (Object beanDef : (Iterable)val.getValue())
+ if (beanDef instanceof BeanDefinitionHolder)
+ processBeanDefinition(beanFactory, beanName,
+ ((BeanDefinitionHolder)beanDef).getBeanDefinition());
}
}
-
- MutablePropertyValues vals = def.getPropertyValues();
-
- for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
- for (String excludedProp : excludedProps) {
- if (val.getName().equals(excludedProp))
- vals.removePropertyValue(val);
- }
+ catch (ClassNotFoundException ignored) {
+ ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
}
}
}
+
+ /** {@inheritDoc} */
+ @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
+ throws BeansException {
+ for (String beanName : beanFactory.getBeanDefinitionNames())
+ processBeanDefinition(beanFactory, beanName, beanFactory.getBeanDefinition(beanName));
+ }
};
springCtx.addBeanFactoryPostProcessor(postProc);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/178c4f85/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index c943fc5..5f63f23 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -1573,7 +1573,8 @@ object visor extends VisorTag {
try
// Cache, IGFS, streamer and DR configurations should be excluded from daemon node config.
spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
- "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration").get1()
+ "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration",
+ "interopConfiguration", "indexingSpi").get1()
finally {
if (log4jTup != null)
U.removeLog4jNoOpLogger(log4jTup)
[08/12] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into
ignite-gg-10416
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ad3e6af4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ad3e6af4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ad3e6af4
Branch: refs/heads/ignite-882
Commit: ad3e6af49e9e86f49dd6092c29dc3de8946e0389
Parents: 7e82a68 d3783a1
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 2 09:50:59 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 2 09:50:59 2015 +0700
----------------------------------------------------------------------
assembly/dependencies-fabric.xml | 1 +
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 +-
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/CacheConfiguration.java | 105 +++----
.../configuration/NearCacheConfiguration.java | 10 +-
.../ignite/internal/GridKernalContextImpl.java | 2 +-
.../managers/communication/GridIoManager.java | 49 ++--
.../discovery/GridDiscoveryManager.java | 32 +-
.../cache/GridCacheDeploymentManager.java | 10 +-
.../processors/cache/GridCacheProcessor.java | 62 +++-
.../processors/cache/IgniteCacheFutureImpl.java | 42 +++
.../processors/cache/IgniteCacheProxy.java | 2 +-
.../processors/clock/GridClockServer.java | 21 +-
.../internal/util/future/IgniteFutureImpl.java | 18 +-
.../shmem/IpcSharedMemoryServerEndpoint.java | 10 +-
.../util/nio/GridNioMessageTracker.java | 23 +-
.../util/VisorClusterGroupEmptyException.java | 6 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 2 +-
.../TcpDiscoveryMulticastIpFinder.java | 74 ++++-
.../core/src/main/resources/ignite.properties | 2 +-
.../core/src/test/config/spark/spark-config.xml | 46 +++
modules/core/src/test/config/tests.properties | 6 +-
.../IgniteTopologyPrintFormatSelfTest.java | 289 +++++++++++++++++++
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 --------
.../IgniteDaemonNodeMarshallerCacheTest.java | 192 ++++++++++++
.../GridP2PContinuousDeploymentSelfTest.java | 2 -
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../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 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
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 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 16 +-
.../GridTaskUriDeploymentDeadlockSelfTest.java | 13 +-
.../ignite/p2p/GridP2PDisabledSelfTest.java | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 14 +-
86 files changed, 1577 insertions(+), 325 deletions(-)
----------------------------------------------------------------------
[12/12] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-7' into ignite-882
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into 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/557fb3a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/557fb3a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/557fb3a4
Branch: refs/heads/ignite-882
Commit: 557fb3a404f12f7526b1e6d7794758cbfdb874db
Parents: 56c5ef5 7828d19
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jul 3 16:45:42 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jul 3 16:45:42 2015 +0300
----------------------------------------------------------------------
.../GridCachePartitionedFailoverSelfTest.java | 5 +
.../util/spring/IgniteSpringHelperImpl.java | 72 +++--
.../IgniteExcludeInConfigurationTest.java | 78 +++++
.../org/apache/ignite/spring/sprint-exclude.xml | 57 ++++
.../testsuites/IgniteSpringTestSuite.java | 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 +
13 files changed, 535 insertions(+), 237 deletions(-)
----------------------------------------------------------------------
[05/12] incubator-ignite git commit: # ignite-gg-10416 Fixed exclude
nested beans with missing classes.
Posted by sb...@apache.org.
# ignite-gg-10416 Fixed exclude nested beans with missing classes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e5fba8b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e5fba8b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e5fba8b3
Branch: refs/heads/ignite-882
Commit: e5fba8b3a04d982e9b4c1617be416a77880e78ef
Parents: 99b8284
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 16:23:40 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 16:23:40 2015 +0700
----------------------------------------------------------------------
.../java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e5fba8b3/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
index 0c2e99e..3ff927a 100644
--- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
+++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
@@ -40,6 +40,8 @@ public class IgniteSpringTestSuite extends TestSuite {
suite.addTest(IgniteResourceSelfTestSuite.suite());
+ suite.addTest(new TestSuite(IgniteStartExcludesConfigurationTest.class));
+
// Tests moved to this suite since they require Spring functionality.
suite.addTest(new TestSuite(GridP2PUserVersionChangeSelfTest.class));
[09/12] incubator-ignite git commit: # ignite-gg-10416 Extract opne
command from visor cmd.
Posted by sb...@apache.org.
# ignite-gg-10416 Extract opne command from visor cmd.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fcff50e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fcff50e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fcff50e3
Branch: refs/heads/ignite-882
Commit: fcff50e386d7f8e7ab1c00b86921f667d646d819
Parents: ad3e6af
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 2 11:31:31 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 2 13:53:00 2015 +0700
----------------------------------------------------------------------
.../ignite/visor/commands/VisorConsole.scala | 3 +-
.../visor/commands/open/VisorOpenCommand.scala | 319 +++++++++++++++++++
.../scala/org/apache/ignite/visor/visor.scala | 231 +-------------
.../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 +
8 files changed, 340 insertions(+), 219 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
index d4ac39d..bcfc6e0 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
@@ -71,6 +71,7 @@ class VisorConsole {
org.apache.ignite.visor.commands.gc.VisorGcCommand
org.apache.ignite.visor.commands.kill.VisorKillCommand
org.apache.ignite.visor.commands.node.VisorNodeCommand
+ org.apache.ignite.visor.commands.open.VisorOpenCommand
org.apache.ignite.visor.commands.ping.VisorPingCommand
org.apache.ignite.visor.commands.start.VisorStartCommand
org.apache.ignite.visor.commands.tasks.VisorTasksCommand
@@ -178,7 +179,7 @@ class VisorConsole {
buf.append(line.dropRight(1))
}
else {
- if (buf.size != 0) {
+ if (buf.nonEmpty) {
buf.append(line)
line = buf.toString()
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
new file mode 100644
index 0000000..6498baf
--- /dev/null
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
@@ -0,0 +1,319 @@
+/*
+ *
+ * * 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.visor.commands.open
+
+import org.apache.ignite.IgniteSystemProperties._
+import org.apache.ignite.configuration.IgniteConfiguration
+import org.apache.ignite.internal.IgniteComponentType._
+import org.apache.ignite.internal.IgniteEx
+import org.apache.ignite.internal.util.scala.impl
+import org.apache.ignite.internal.util.spring.IgniteSpringHelper
+import org.apache.ignite.internal.util.{IgniteUtils => U}
+import org.apache.ignite.logger.NullLogger
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
+import org.apache.ignite.visor.commands.common.{VisorConsoleCommand, VisorTextTable}
+import org.apache.ignite.visor.visor._
+import org.apache.ignite.visor.{VisorTag, visor}
+import org.apache.ignite.{IgniteException, IgniteSystemProperties, Ignition}
+
+import java.net.URL
+
+import scala.language.{implicitConversions, reflectiveCalls}
+
+/**
+ * ==Overview==
+ * Contains Visor command `node` implementation.
+ *
+ * ==Help==
+ * {{{
+ * +--------------------------------+
+ * | node | Prints node statistics. |
+ * +--------------------------------+
+ * }}}
+ *
+ * ====Specification====
+ * {{{
+ * node "{-id8=<node-id8>|-id=<node-id>} {-a}"
+ * node
+ * }}}
+ *
+ * ====Arguments====
+ * {{{
+ * -id8=<node-id8>
+ * ID8 of node. Either '-id8' or '-id' can be specified.
+ * If neither specified - command starts in interactive mode.
+ * -id=<node-id>
+ * Full ID of node. Either '-id8' or '-id' can be specified.
+ * If neither specified - command starts in interactive mode.
+ * -a
+ * Print extended information.
+ * By default - only abbreviated statistics is printed.
+ * }}}
+ *
+ * ====Examples====
+ * {{{
+ * node
+ * Starts command in interactive mode.
+ * node "-id8=12345678"
+ * Prints statistics for specified node.
+ * node "-id8=12345678 -a"
+ * Prints full statistics for specified node.
+ * }}}
+ */
+class VisorOpenCommand extends VisorConsoleCommand {
+ @impl protected val name = "open"
+
+ /** Default configuration path relative to Ignite home. */
+ private final val DFLT_CFG = "config/default-config.xml"
+
+ /**
+ * ==Command==
+ * Connects Visor console to the default grid.
+ *
+ * ==Example==
+ * <ex>open</ex>
+ * Connects to the default grid.
+ */
+ def open() {
+ open("")
+ }
+
+ /**
+ * ==Command==
+ * Connects Visor console to default or named grid.
+ *
+ * ==Examples==
+ * <ex>open -g=mygrid</ex>
+ * Connects to 'mygrid' grid.
+ *
+ * @param args Command arguments.
+ */
+ def open(args: String) {
+ assert(args != null)
+
+ if (isConnected) {
+ warn("Visor is already connected. Disconnect first.")
+
+ return
+ }
+
+ try {
+ def configuration(path: String): IgniteConfiguration = {
+ assert(path != null)
+
+ val url =
+ try
+ new URL(path)
+ catch {
+ case e: Exception =>
+ val url = U.resolveIgniteUrl(path)
+
+ if (url == null)
+ throw new IgniteException("Ignite configuration path is invalid: " + path, e)
+
+ url
+ }
+
+ // Add no-op logger to remove no-appender warning.
+ val log4jTup =
+ if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
+ U.addLog4jNoOpLogger()
+ else
+ null
+
+ val spring: IgniteSpringHelper = SPRING.create(false)
+
+ val cfgs =
+ try
+ // Cache, IGFS, indexing SPI configurations should be excluded from daemon node config.
+ spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
+ "indexingSpi").get1()
+ finally {
+ if (log4jTup != null)
+ U.removeLog4jNoOpLogger(log4jTup)
+ }
+
+ if (cfgs == null || cfgs.isEmpty)
+ throw new IgniteException("Can't find grid configuration in: " + url)
+
+ if (cfgs.size > 1)
+ throw new IgniteException("More than one grid configuration found in: " + url)
+
+ val cfg = cfgs.iterator().next()
+
+ // Setting up 'Config URL' for properly print in console.
+ System.setProperty(IgniteSystemProperties.IGNITE_CONFIG_URL, url.getPath)
+
+ var cpuCnt = Runtime.getRuntime.availableProcessors
+
+ if (cpuCnt < 4)
+ cpuCnt = 4
+
+ cfg.setConnectorConfiguration(null)
+
+ // All thread pools are overridden to have size equal to number of CPUs.
+ cfg.setPublicThreadPoolSize(cpuCnt)
+ cfg.setSystemThreadPoolSize(cpuCnt)
+ cfg.setPeerClassLoadingThreadPoolSize(cpuCnt)
+
+ var ioSpi = cfg.getCommunicationSpi
+
+ if (ioSpi == null)
+ ioSpi = new TcpCommunicationSpi()
+
+ cfg
+ }
+
+ val argLst = parseArgs(args)
+
+ val path = argValue("cpath", argLst)
+ val dflt = hasArgFlag("d", argLst)
+
+ val (cfg, cfgPath) =
+ if (path.isDefined)
+ (configuration(path.get), path.get)
+ else if (dflt)
+ (configuration(DFLT_CFG), "<default>")
+ else {
+ // If configuration file is not defined in arguments,
+ // ask to choose from the list
+ askConfigFile() match {
+ case Some(p) =>
+ nl()
+
+ (VisorTextTable() +=("Using configuration", p)) render()
+
+ nl()
+
+ (configuration(p), p)
+ case None =>
+ return
+ }
+ }
+
+ open(cfg, cfgPath)
+ }
+ catch {
+ case e: IgniteException =>
+ warn(e.getMessage)
+ warn("Type 'help open' to see how to use this command.")
+
+ status("q")
+ }
+ }
+
+ /**
+ * Connects Visor console to configuration with path.
+ *
+ * @param cfg Configuration.
+ * @param cfgPath Configuration path.
+ */
+ def open(cfg: IgniteConfiguration, cfgPath: String) = {
+ val daemon = Ignition.isDaemon
+
+ val shutdownHook = IgniteSystemProperties.getString(IGNITE_NO_SHUTDOWN_HOOK, "false")
+
+ // Make sure Visor console starts as daemon node.
+ Ignition.setDaemon(true)
+
+ // Make sure visor starts without shutdown hook.
+ System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true")
+
+ // Set NullLoger in quite mode.
+ if ("true".equalsIgnoreCase(sys.props.getOrElse(IGNITE_QUIET, "true")))
+ cfg.setGridLogger(new NullLogger)
+
+ val startedGridName = try {
+ Ignition.start(cfg).name
+ }
+ finally {
+ Ignition.setDaemon(daemon)
+
+ System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, shutdownHook)
+ }
+
+ ignite =
+ try
+ Ignition.ignite(startedGridName).asInstanceOf[IgniteEx]
+ catch {
+ case _: IllegalStateException =>
+ throw new IgniteException("Named grid unavailable: " + startedGridName)
+ }
+
+ visor.open(startedGridName, cfgPath)
+ }
+}
+
+/**
+ * Companion object that does initialization of the command.
+ */
+object VisorOpenCommand {
+ /** Singleton command. */
+ private val cmd = new VisorOpenCommand
+
+ // Adds command's help to visor.
+ addHelp(
+ name = "open",
+ shortInfo = "Connects Visor console to the grid.",
+ longInfo = Seq(
+ "Connects Visor console to the grid. Note that P2P class loading",
+ "should be enabled on all nodes.",
+ " ",
+ "If neither '-cpath' or '-d' are provided, command will ask",
+ "user to select Ignite configuration file in interactive mode."
+ ),
+ spec = Seq(
+ "open -cpath=<path>",
+ "open -d"
+ ),
+ args = Seq(
+ "-cpath=<path>" -> Seq(
+ "Ignite configuration path.",
+ "Can be absolute, relative to Ignite home folder or any well formed URL."
+ ),
+ "-d" -> Seq(
+ "Flag forces the command to connect to grid using default Ignite configuration file.",
+ "without interactive mode."
+ )
+ ),
+ examples = Seq(
+ "open" ->
+ "Prompts user to select Ignite configuration file in interactive mode.",
+ "open -d" ->
+ "Connects Visor console to grid using default Ignite configuration file.",
+ "open -cpath=/gg/config/mycfg.xml" ->
+ "Connects Visor console to grid using Ignite configuration from provided file."
+ ),
+ emptyArgs = cmd.open,
+ withArgs = cmd.open
+ )
+
+ /**
+ * Singleton.
+ */
+ def apply() = cmd
+
+ /**
+ * Implicit converter from visor to commands "pimp".
+ *
+ * @param vs Visor tagging trait.
+ */
+ implicit def fromNode2Visor(vs: VisorTag): VisorOpenCommand = cmd
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index 5f63f23..67e3d70 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -17,23 +17,17 @@
package org.apache.ignite.visor
-import org.apache.ignite.IgniteSystemProperties._
import org.apache.ignite._
import org.apache.ignite.cluster.{ClusterGroup, ClusterGroupEmptyException, ClusterMetrics, ClusterNode}
-import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.events.EventType._
import org.apache.ignite.events.{DiscoveryEvent, Event}
-import org.apache.ignite.internal.IgniteComponentType._
import org.apache.ignite.internal.IgniteEx
import org.apache.ignite.internal.IgniteNodeAttributes._
import org.apache.ignite.internal.cluster.ClusterGroupEmptyCheckedException
import org.apache.ignite.internal.util.lang.{GridFunc => F}
-import org.apache.ignite.internal.util.spring.IgniteSpringHelper
import org.apache.ignite.internal.util.typedef._
import org.apache.ignite.internal.util.{GridConfigurationFinder, IgniteUtils => U}
import org.apache.ignite.lang._
-import org.apache.ignite.logger.NullLogger
-import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
import org.apache.ignite.thread.IgniteThreadPoolExecutor
import org.apache.ignite.visor.commands.common.VisorTextTable
@@ -213,9 +207,6 @@ object visor extends VisorTag {
*/
private final val DFLT_LOG_PATH = "visor/visor-log"
- /** Default configuration path relative to Ignite home. */
- private final val DFLT_CFG = "config/default-config.xml"
-
/** Log file. */
private var logFile: File = null
@@ -429,42 +420,6 @@ object visor extends VisorTag {
withArgs = status
)
- addHelp(
- name = "open",
- shortInfo = "Connects Visor console to the grid.",
- longInfo = Seq(
- "Connects Visor console to the grid. Note that P2P class loading",
- "should be enabled on all nodes.",
- " ",
- "If neither '-cpath' or '-d' are provided, command will ask",
- "user to select Ignite configuration file in interactive mode."
- ),
- spec = Seq(
- "open -cpath=<path>",
- "open -d"
- ),
- args = Seq(
- "-cpath=<path>" -> Seq(
- "Ignite configuration path.",
- "Can be absolute, relative to Ignite home folder or any well formed URL."
- ),
- "-d" -> Seq(
- "Flag forces the command to connect to grid using default Ignite configuration file.",
- "without interactive mode."
- )
- ),
- examples = Seq(
- "open" ->
- "Prompts user to select Ignite configuration file in interactive mode.",
- "open -d" ->
- "Connects Visor console to grid using default Ignite configuration file.",
- "open -cpath=/gg/config/mycfg.xml" ->
- "Connects Visor console to grid using Ignite configuration from provided file."
- ),
- emptyArgs = open,
- withArgs = open
- )
-
/**
* @param name - command name.
*/
@@ -980,7 +935,7 @@ object visor extends VisorTag {
val sb = new StringBuilder()
- for (i <- 0 until lst.size if lst(i).nonEmpty || sb.size != 0) {
+ for (i <- 0 until lst.size if lst(i).nonEmpty || sb.nonEmpty) {
val arg = sb.toString + lst(i)
arg match {
@@ -1007,7 +962,7 @@ object visor extends VisorTag {
def hasArgValue(@Nullable v: String, args: ArgList): Boolean = {
assert(args != null)
- args.find(_._2 == v).nonEmpty
+ args.exists(_._2 == v)
}
/**
@@ -1019,7 +974,7 @@ object visor extends VisorTag {
def hasArgName(@Nullable n: String, args: ArgList): Boolean = {
assert(args != null)
- args.find(_._1 == n).nonEmpty
+ args.exists(_._1 == n)
}
/**
@@ -1032,7 +987,7 @@ object visor extends VisorTag {
def hasArgFlag(n: String, args: ArgList): Boolean = {
assert(n != null && args != null)
- args.find((a) => a._1 == n && a._2 == null).nonEmpty
+ args.exists((a) => a._1 == n && a._2 == null)
}
/**
@@ -1525,170 +1480,22 @@ object visor extends VisorTag {
private def blank(len: Int) = new String().padTo(len, ' ')
/**
- * ==Command==
- * Connects Visor console to default or named grid.
- *
- * ==Examples==
- * <ex>open -g=mygrid</ex>
- * Connects to 'mygrid' grid.
- *
- * @param args Command arguments.
- */
- def open(args: String) {
- assert(args != null)
-
- if (isConnected) {
- warn("Visor is already connected. Disconnect first.")
-
- return
- }
-
- try {
- def configuration(path: String): IgniteConfiguration = {
- assert(path != null)
-
- val url =
- try
- new URL(path)
- catch {
- case e: Exception =>
- val url = U.resolveIgniteUrl(path)
-
- if (url == null)
- throw new IgniteException("Ignite configuration path is invalid: " + path, e)
-
- url
- }
-
- // Add no-op logger to remove no-appender warning.
- val log4jTup =
- if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
- U.addLog4jNoOpLogger()
- else
- null
-
- val spring: IgniteSpringHelper = SPRING.create(false)
-
- val cfgs =
- try
- // Cache, IGFS, streamer and DR configurations should be excluded from daemon node config.
- spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
- "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration",
- "interopConfiguration", "indexingSpi").get1()
- finally {
- if (log4jTup != null)
- U.removeLog4jNoOpLogger(log4jTup)
- }
-
- if (cfgs == null || cfgs.isEmpty)
- throw new IgniteException("Can't find grid configuration in: " + url)
-
- if (cfgs.size > 1)
- throw new IgniteException("More than one grid configuration found in: " + url)
-
- val cfg = cfgs.iterator().next()
-
- // Setting up 'Config URL' for properly print in console.
- System.setProperty(IgniteSystemProperties.IGNITE_CONFIG_URL, url.getPath)
-
- var cpuCnt = Runtime.getRuntime.availableProcessors
-
- if (cpuCnt < 4)
- cpuCnt = 4
-
- cfg.setConnectorConfiguration(null)
-
- // All thread pools are overridden to have size equal to number of CPUs.
- cfg.setPublicThreadPoolSize(cpuCnt)
- cfg.setSystemThreadPoolSize(cpuCnt)
- cfg.setPeerClassLoadingThreadPoolSize(cpuCnt)
-
- var ioSpi = cfg.getCommunicationSpi
-
- if (ioSpi == null)
- ioSpi = new TcpCommunicationSpi()
-
- cfg
- }
-
- val argLst = parseArgs(args)
-
- val path = argValue("cpath", argLst)
- val dflt = hasArgFlag("d", argLst)
-
- val (cfg, cfgPath) =
- if (path.isDefined)
- (configuration(path.get), path.get)
- else if (dflt)
- (configuration(DFLT_CFG), "<default>")
- else {
- // If configuration file is not defined in arguments,
- // ask to choose from the list
- askConfigFile() match {
- case Some(p) =>
- nl()
-
- (VisorTextTable() +=("Using configuration", p)) render()
-
- nl()
-
- (configuration(p), p)
- case None =>
- return
- }
- }
-
- open(cfg, cfgPath)
- }
- catch {
- case e: IgniteException =>
- warn(e.getMessage)
- warn("Type 'help open' to see how to use this command.")
-
- status("q")
- }
- }
-
- /**
* Connects Visor console to configuration with path.
*
- * @param cfg Configuration.
+ * @param gridName Name of grid instance.
* @param cfgPath Configuration path.
*/
- def open(cfg: IgniteConfiguration, cfgPath: String) {
- val daemon = Ignition.isDaemon
-
- val shutdownHook = IgniteSystemProperties.getString(IGNITE_NO_SHUTDOWN_HOOK, "false")
-
- // Make sure Visor console starts as daemon node.
- Ignition.setDaemon(true)
-
- // Make sure visor starts without shutdown hook.
- System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true")
-
- // Set NullLoger in quite mode.
- if ("true".equalsIgnoreCase(sys.props.getOrElse(IGNITE_QUIET, "true")))
- cfg.setGridLogger(new NullLogger)
-
- val startedGridName = try {
- Ignition.start(cfg).name
- }
- finally {
- Ignition.setDaemon(daemon)
-
- System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, shutdownHook)
- }
-
+ def open(gridName: String, cfgPath: String) {
this.cfgPath = cfgPath
ignite =
try
- Ignition.ignite(startedGridName).asInstanceOf[IgniteEx]
+ Ignition.ignite(gridName).asInstanceOf[IgniteEx]
catch {
case _: IllegalStateException =>
this.cfgPath = null
- throw new IgniteException("Named grid unavailable: " + startedGridName)
+ throw new IgniteException("Named grid unavailable: " + gridName)
}
assert(cfgPath != null)
@@ -1824,18 +1631,6 @@ object visor extends VisorTag {
}
/**
- * ==Command==
- * Connects Visor console to the default grid.
- *
- * ==Example==
- * <ex>open</ex>
- * Connects to the default grid.
- */
- def open() {
- open("")
- }
-
- /**
* Returns string with node id8, its memory variable, if available, and its
* IP address (first internal address), if node is alive.
*
@@ -2016,7 +1811,7 @@ object visor extends VisorTag {
else if (nodes.size == 1)
Some(nodes.head.id)
else {
- (0 until nodes.size) foreach (i => {
+ nodes.indices foreach (i => {
val n = nodes(i)
val m = n.metrics
@@ -2080,7 +1875,7 @@ object visor extends VisorTag {
None
}
else {
- (0 until neighborhood.size) foreach (i => {
+ neighborhood.indices foreach (i => {
val neighbors = neighborhood(i)
var ips = immutable.Set.empty[String]
@@ -2229,7 +2024,7 @@ object visor extends VisorTag {
val ids = ignite.cluster.forRemotes().nodes().map(nid8).toList
- (0 until ids.size).foreach(i => println((i + 1) + ": " + ids(i)))
+ ids.indices.foreach(i => println((i + 1) + ": " + ids(i)))
nl()
@@ -2758,7 +2553,7 @@ object visor extends VisorTag {
help()
}
- lazy val commands = cmdLst.map(_.name) ++ cmdLst.map(_.aliases).flatten
+ lazy val commands = cmdLst.map(_.name) ++ cmdLst.flatMap(_.aliases)
def searchCmd(cmd: String) = cmdLst.find(c => c.name.equals(cmd) || (c.aliases != null && c.aliases.contains(cmd)))
@@ -2851,7 +2646,7 @@ object visor extends VisorTag {
var dec = BigDecimal.valueOf(0L)
- for (i <- 0 until octets.length) dec += octets(i).toLong * math.pow(256, octets.length - 1 - i).toLong
+ for (i <- octets.indices) dec += octets(i).toLong * math.pow(256, octets.length - 1 - i).toLong
dec
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
index f27bae3..1c5e232 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/VisorRuntimeBaseSpec.scala
@@ -19,6 +19,8 @@ package org.apache.ignite.visor
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.IgniteConfiguration
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
+
import org.scalatest._
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
index 2c659b5..4719606 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/kill/VisorKillCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.kill
import org.apache.ignite.visor.visor
import org.scalatest._
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.kill.VisorKillCommand._
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
index c6404b5..49a861c 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/start/VisorStartCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.start
import org.apache.ignite.visor.visor
import org.scalatest._
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.start.VisorStartCommand._
import org.apache.ignite.visor.commands.top.VisorTopologyCommand._
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
index db07543..fe364bc 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommandSpec.scala
@@ -26,6 +26,7 @@ import org.scalatest._
import java.util
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.tasks.VisorTasksCommand._
import scala.collection.JavaConversions._
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcff50e3/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
index 1a4bc3e..022f6d6 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommandSpec.scala
@@ -20,6 +20,7 @@ package org.apache.ignite.visor.commands.vvm
import org.apache.ignite.visor.visor
import org.scalatest._
+import org.apache.ignite.visor.commands.open.VisorOpenCommand._
import org.apache.ignite.visor.commands.vvm.VisorVvmCommand._
/**
[11/12] incubator-ignite git commit: muted
GridCachePartitionedFailoverSelfTest
Posted by sb...@apache.org.
muted GridCachePartitionedFailoverSelfTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7828d19f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7828d19f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7828d19f
Branch: refs/heads/ignite-882
Commit: 7828d19f3fc2b3793c2882ac1305b95960646e5c
Parents: beb697a
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jul 3 16:43:17 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jul 3 16:43:17 2015 +0300
----------------------------------------------------------------------
.../distributed/near/GridCachePartitionedFailoverSelfTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7828d19f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
index 553d748..64e8f81 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFailoverSelfTest.java
@@ -27,6 +27,11 @@ import static org.apache.ignite.cache.CacheMode.*;
*/
public class GridCachePartitionedFailoverSelfTest extends GridCacheAbstractFailoverTxSelfTest {
/** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1092");
+ }
+
+ /** {@inheritDoc} */
@Override protected CacheMode cacheMode() {
return PARTITIONED;
}
[07/12] incubator-ignite git commit: Merge branch 'ignite-sprint-7'
into ignite-gg-10416
Posted by sb...@apache.org.
Merge branch 'ignite-sprint-7' into ignite-gg-10416
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7e82a682
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7e82a682
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7e82a682
Branch: refs/heads/ignite-882
Commit: 7e82a6826233f94c1601d0c68526a179d5d1104b
Parents: 0acdc2f c6187a9
Author: Andrey <an...@gridgain.com>
Authored: Mon Jun 29 13:32:10 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Mon Jun 29 13:32:10 2015 +0700
----------------------------------------------------------------------
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 | 2 +-
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../org/apache/ignite/cluster/ClusterGroup.java | 18 +-
.../org/apache/ignite/cluster/ClusterNode.java | 2 +
.../ignite/compute/ComputeTaskSplitAdapter.java | 2 +-
.../configuration/IgniteReflectionFactory.java | 81 +-
.../ignite/internal/GridKernalContextImpl.java | 3 +
.../ignite/internal/MarshallerContextImpl.java | 12 +-
.../client/GridClientConfiguration.java | 4 +-
.../internal/cluster/ClusterGroupAdapter.java | 50 +-
.../cluster/IgniteClusterAsyncImpl.java | 12 +-
.../internal/managers/GridManagerAdapter.java | 8 +-
.../discovery/GridDiscoveryManager.java | 30 +-
.../affinity/AffinityTopologyVersion.java | 7 -
.../processors/cache/GridCacheAdapter.java | 4 +
.../processors/cache/GridCacheContext.java | 2 +-
.../processors/cache/GridCacheIoManager.java | 64 +-
.../GridCachePartitionExchangeManager.java | 77 +-
.../processors/cache/GridCacheSwapManager.java | 12 +-
.../processors/cache/GridCacheUtils.java | 9 +
.../processors/cache/IgniteCacheProxy.java | 12 +
.../distributed/dht/GridDhtLocalPartition.java | 59 +-
.../distributed/dht/GridDhtLockFuture.java | 2 +-
.../dht/GridDhtPartitionTopologyImpl.java | 4 +-
.../dht/GridDhtPartitionsReservation.java | 292 +++++++
.../dht/GridDhtTransactionalCacheAdapter.java | 2 +-
.../cache/distributed/dht/GridReservable.java | 35 +
.../dht/atomic/GridDhtAtomicCache.java | 9 +-
.../dht/preloader/GridDhtPartitionMap.java | 26 +-
.../GridDhtPartitionsExchangeFuture.java | 95 ++-
.../cache/query/GridCacheQueryManager.java | 33 -
.../cache/query/GridCacheTwoStepQuery.java | 22 +-
.../continuous/CacheContinuousQueryHandler.java | 8 +
.../cache/transactions/IgniteTxHandler.java | 2 +-
.../transactions/IgniteTxLocalAdapter.java | 12 +-
.../datastructures/DataStructuresProcessor.java | 64 +-
.../dr/IgniteDrDataStreamerCacheUpdater.java | 7 +-
.../processors/hadoop/HadoopJobInfo.java | 4 +-
.../hadoop/counter/HadoopCounterWriter.java | 5 +-
.../offheap/GridOffHeapProcessor.java | 19 +-
.../processors/plugin/CachePluginManager.java | 10 +-
.../processors/query/GridQueryIndexing.java | 14 +-
.../processors/query/GridQueryProcessor.java | 21 +-
.../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 | 6 +-
.../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 | 33 +
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 7 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 9 +-
.../communication/tcp/TcpCommunicationSpi.java | 146 +++-
.../tcp/TcpCommunicationSpiMBean.java | 19 +
.../ignite/spi/discovery/DiscoverySpi.java | 3 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 229 ++++--
.../ignite/spi/discovery/tcp/ServerImpl.java | 155 +++-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 3 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 51 +-
.../tcp/internal/TcpDiscoveryNode.java | 18 +
.../messages/TcpDiscoveryNodeFailedMessage.java | 18 +
.../core/src/main/resources/ignite.properties | 2 +-
.../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 +++++
.../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 +-
.../cache/GridCacheDaemonNodeStopSelfTest.java | 119 +++
.../IgniteCacheAbstractStopBusySelfTest.java | 30 +-
.../IgniteCacheAtomicStopBusySelfTest.java | 8 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 19 +-
...gniteCacheTransactionalStopBusySelfTest.java | 8 +-
...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++
.../cache/IgniteDynamicCacheStartSelfTest.java | 37 +
...GridCacheQueueMultiNodeAbstractSelfTest.java | 4 +-
.../GridCacheSetAbstractSelfTest.java | 22 +-
.../IgniteDataStructureWithJobTest.java | 111 +++
.../distributed/IgniteCache150ClientsTest.java | 189 +++++
...teCacheClientNodePartitionsExchangeTest.java | 1 +
.../distributed/IgniteCacheManyClientsTest.java | 2 +
.../IgniteCacheTxMessageRecoveryTest.java | 5 +
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 -
...achePartitionedMultiNodeFullApiSelfTest.java | 53 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
.../IgniteCacheTxStoreSessionTest.java | 4 +
.../DataStreamerMultiThreadedSelfTest.java | 3 +
.../internal/util/IgniteUtilsSelfTest.java | 22 +
.../GridTcpCommunicationSpiConfigSelfTest.java | 1 -
.../tcp/TcpClientDiscoverySpiSelfTest.java | 265 ++++++-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 44 +-
.../testframework/GridSpiTestContext.java | 7 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../junits/GridTestKernalContext.java | 2 +-
.../junits/common/GridCommonAbstractTest.java | 8 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 7 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 1 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 4 +-
.../testsuites/IgniteCacheTestSuite3.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 12 +
.../testsuites/IgniteClientTestSuite.java | 38 +
.../testsuites/IgniteComputeGridTestSuite.java | 1 +
modules/extdata/p2p/pom.xml | 2 +-
.../p2p/GridP2PContinuousDeploymentTask1.java | 2 +-
modules/extdata/uri/pom.xml | 2 +-
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/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 +-
.../cache/GridCacheCrossCacheQuerySelfTest.java | 3 +-
.../cache/IgniteCacheOffheapEvictQueryTest.java | 196 +++++
.../IgniteCacheQueryMultiThreadedSelfTest.java | 1 -
...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 +
...lientQueryReplicatedNodeRestartSelfTest.java | 419 ++++++++++
.../IgniteCacheQueryNodeRestartSelfTest.java | 36 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 383 +++++++++
.../IgniteCacheQuerySelfTestSuite.java | 5 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
.../cache/jta/GridCacheXAResource.java | 18 +-
.../processors/cache/GridCacheJtaSelfTest.java | 2 +-
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 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
.../commands/cache/VisorCacheCommand.scala | 7 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
scripts/git-patch-prop.sh | 2 +-
213 files changed, 8348 insertions(+), 2249 deletions(-)
----------------------------------------------------------------------
[04/12] incubator-ignite git commit: # ignite-gg-10416 Fixed exclude
nested beans with missing classes.
Posted by sb...@apache.org.
# ignite-gg-10416 Fixed exclude nested beans with missing classes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/99b82841
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/99b82841
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/99b82841
Branch: refs/heads/ignite-882
Commit: 99b82841e31d48580f5320d8d46e905b284f27e9
Parents: ce31bae
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 16:21:58 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 16:21:58 2015 +0700
----------------------------------------------------------------------
.../util/spring/IgniteSpringHelperImpl.java | 59 +++++++++------
.../IgniteStartExcludesConfigurationTest.java | 80 ++++++++++++++++++++
.../org/apache/ignite/spring/sprint-exclude.xml | 57 ++++++++++++++
3 files changed, 172 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99b82841/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index e9f88ad..df53ca7 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -423,37 +423,38 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
/**
- * @param beanFactory The bean factory used by the application context.
- * @param beanName Bean name.
* @param def Registered BeanDefinition.
* @throws BeansException in case of errors.
*/
- private void processBeanDefinition(ConfigurableListableBeanFactory beanFactory, String beanName,
- BeanDefinition def) throws BeansException {
- if (def.getBeanClassName() != null) {
- try {
- Class.forName(def.getBeanClassName());
+ private void processNested(BeanDefinition def) throws BeansException {
+ MutablePropertyValues vals = def.getPropertyValues();
+
+ for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
+ for (String excludedProp : excludedProps) {
+ if (val.getName().equals(excludedProp)) {
+ vals.removePropertyValue(val);
+
+ return;
+ }
+ }
- MutablePropertyValues vals = def.getPropertyValues();
+ if (val.getValue() instanceof Collection) {
+ Collection<?> nestedVals = (Collection) val.getValue();
- for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
- for (String excludedProp : excludedProps) {
- if (val.getName().equals(excludedProp)) {
- vals.removePropertyValue(val);
+ for (Object item : new ArrayList<>(nestedVals))
+ if (item instanceof BeanDefinitionHolder) {
+ BeanDefinitionHolder holder = (BeanDefinitionHolder)item;
- return;
+ try {
+ if (holder.getBeanDefinition().getBeanClassName() != null)
+ Class.forName(holder.getBeanDefinition().getBeanClassName());
+
+ processNested(holder.getBeanDefinition());
+ }
+ catch (ClassNotFoundException ignored) {
+ nestedVals.remove(item);
}
}
-
- if (val.getValue() instanceof Iterable)
- for (Object beanDef : (Iterable)val.getValue())
- if (beanDef instanceof BeanDefinitionHolder)
- processBeanDefinition(beanFactory, beanName,
- ((BeanDefinitionHolder)beanDef).getBeanDefinition());
- }
- }
- catch (ClassNotFoundException ignored) {
- ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
}
}
}
@@ -462,7 +463,17 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
@Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
throws BeansException {
for (String beanName : beanFactory.getBeanDefinitionNames())
- processBeanDefinition(beanFactory, beanName, beanFactory.getBeanDefinition(beanName));
+ try {
+ BeanDefinition def = beanFactory.getBeanDefinition(beanName);
+
+ if (def.getBeanClassName() != null)
+ Class.forName(def.getBeanClassName());
+
+ processNested(def);
+ }
+ catch (ClassNotFoundException ignored) {
+ ((BeanDefinitionRegistry)beanFactory).removeBeanDefinition(beanName);
+ }
}
};
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99b82841/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
new file mode 100644
index 0000000..f1332e0
--- /dev/null
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.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.spring;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.spring.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.net.*;
+import java.util.*;
+
+import static org.apache.ignite.internal.IgniteComponentType.*;
+
+/**
+ * Checks exclude properties in spring, exclude beans with not existing classes.
+ */
+public class IgniteStartExcludesConfigurationTest extends GridCommonAbstractTest {
+ /** Tests spring exclude properties. */
+ public void testExcludes() throws Exception {
+ URL cfgLocation = U.resolveIgniteUrl(
+ "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml");
+
+ IgniteSpringHelper spring = SPRING.create(false);
+
+ Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "typeMetadata").get1();
+
+ assert cfgs != null && cfgs.size() == 1;
+
+ IgniteConfiguration cfg = cfgs.iterator().next();
+
+ assert cfg.getCacheConfiguration().length == 1;
+
+ assert cfg.getCacheConfiguration()[0].getTypeMetadata() == null;
+
+ cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
+
+ assert cfgs != null && cfgs.size() == 1;
+
+ cfg = cfgs.iterator().next();
+
+ assert cfg.getCacheConfiguration().length == 1;
+
+ Collection<CacheTypeMetadata> typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
+
+ assert typeMetadatas.size() == 1;
+
+ assert typeMetadatas.iterator().next().getKeyType() == null;
+
+ cfgs = spring.loadConfigurations(cfgLocation).get1();
+
+ assert cfgs != null && cfgs.size() == 1;
+
+ cfg = cfgs.iterator().next();
+
+ assert cfg.getCacheConfiguration().length == 1;
+
+ typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
+
+ assert typeMetadatas.size() == 1;
+
+ assert "java.lang.Integer".equals(typeMetadatas.iterator().next().getKeyType());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99b82841/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
new file mode 100644
index 0000000..494f786
--- /dev/null
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
@@ -0,0 +1,57 @@
+<?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.
+-->
+
+<!--
+ GridGain Spring configuration file to startup grid cache.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <!-- Cache configurations (all properties are optional). -->
+ <property name="cacheConfiguration">
+ <list>
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <!-- Configure type metadata to enable queries. -->
+ <property name="typeMetadata">
+ <list>
+ <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+ <property name="keyType" value="java.lang.Integer"/>
+ <property name="valueType" value="Organization"/>
+ <property name="ascendingFields">
+ <map>
+ <entry key="name" value="java.lang.String"/>
+ </map>
+ </property>
+ </bean>
+ <bean class="org.apache.ignite.cache.CacheTypeMetadata2"/>
+ </list>
+ </property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="grid.cfg.failed" class="org.apache.ignite.configuration.IgniteConfiguration2"/>
+</beans>
[10/12] incubator-ignite git commit: Merge branches 'ignite-gg-10416'
and 'ignite-sprint-7' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416
Posted by sb...@apache.org.
Merge branches 'ignite-gg-10416' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/beb697af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/beb697af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/beb697af
Branch: refs/heads/ignite-882
Commit: beb697afabec3342195d301d1c68a58b3154b689
Parents: fcff50e ea90d86
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jul 3 10:07:42 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jul 3 10:07:42 2015 +0700
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../apache/ignite/internal/IgniteKernal.java | 1 -
.../managers/communication/GridIoManager.java | 124 +++++++--
.../managers/communication/GridIoMessage.java | 15 +-
.../managers/communication/GridIoPolicy.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 +-
.../processors/cache/GridCacheIoManager.java | 12 +-
.../processors/cache/GridCacheMvccManager.java | 8 +-
.../processors/cache/GridCacheProxyImpl.java | 10 +-
.../processors/cache/GridCacheSwapManager.java | 257 ++++++++++++-------
.../processors/cache/GridCacheUtils.java | 42 +++
.../processors/cache/IgniteCacheProxy.java | 36 ++-
.../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 +-
.../datastructures/GridCacheAtomicLongImpl.java | 25 +-
.../GridCacheAtomicSequenceImpl.java | 11 +-
.../GridCacheAtomicStampedImpl.java | 21 +-
.../GridCacheCountDownLatchImpl.java | 16 +-
.../internal/processors/igfs/IgfsContext.java | 5 +-
.../plugin/IgnitePluginProcessor.java | 3 +-
.../plugin/extensions/communication/IoPool.java | 42 +++
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../TcpDiscoveryMulticastIpFinder.java | 2 +-
.../communication/GridIoManagerSelfTest.java | 2 +-
.../cache/IgniteInternalCacheTypesTest.java | 3 +-
.../IgniteCachePutRetryAbstractSelfTest.java | 147 +++++++++++
.../dht/IgniteCachePutRetryAtomicSelfTest.java | 34 +++
...gniteCachePutRetryTransactionalSelfTest.java | 74 ++++++
...eAtomicInvalidPartitionHandlingSelfTest.java | 5 +-
.../GridCacheEvictionFilterSelfTest.java | 2 -
.../inmemory/GridTestSwapSpaceSpi.java | 3 +-
.../IgniteCacheFailoverTestSuite.java | 3 +
.../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/urideploy/pom.xml | 14 -
61 files changed, 1053 insertions(+), 378 deletions(-)
----------------------------------------------------------------------
[03/12] incubator-ignite git commit: # Merge ignite-sprint-7 to
ignite-gg-10416.
Posted by sb...@apache.org.
# Merge ignite-sprint-7 to ignite-gg-10416.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ce31bae5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ce31bae5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ce31bae5
Branch: refs/heads/ignite-882
Commit: ce31bae57ed9f78d9ae5ce98f9261b26c9f89186
Parents: b12c803 489ab0f
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 13:34:41 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 13:34:41 2015 +0700
----------------------------------------------------------------------
RELEASE_NOTES.txt | 12 +
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 +-
.../apache/ignite/cache/query/ScanQuery.java | 23 +-
.../cache/store/jdbc/CacheJdbcBlobStore.java | 22 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 290 +++++++++++
.../cache/store/jdbc/CacheJdbcPojoStore.java | 6 +-
.../store/jdbc/CacheJdbcPojoStoreFactory.java | 148 ++++++
.../configuration/CacheConfiguration.java | 3 +-
.../ignite/internal/GridKernalContextImpl.java | 5 +-
.../apache/ignite/internal/IgniteKernal.java | 11 +-
.../internal/MarshallerContextAdapter.java | 18 +-
.../ignite/internal/MarshallerContextImpl.java | 14 +-
.../client/GridClientConfiguration.java | 4 +-
.../GridClientOptimizedMarshaller.java | 26 +
.../impl/GridTcpRouterNioListenerAdapter.java | 2 +-
.../internal/interop/InteropBootstrap.java | 3 +-
.../internal/interop/InteropIgnition.java | 5 +-
.../discovery/GridDiscoveryManager.java | 9 +-
.../processors/cache/GridCacheProcessor.java | 34 +-
.../distributed/GridCacheTxRecoveryRequest.java | 26 +-
.../GridCacheTxRecoveryResponse.java | 14 +-
.../distributed/GridDistributedBaseMessage.java | 77 +--
.../distributed/GridDistributedLockRequest.java | 54 +-
.../GridDistributedLockResponse.java | 14 +-
.../GridDistributedTxFinishRequest.java | 46 +-
.../GridDistributedTxPrepareRequest.java | 62 +--
.../GridDistributedTxPrepareResponse.java | 64 +--
.../GridDistributedUnlockRequest.java | 6 +-
.../distributed/dht/GridDhtLockRequest.java | 72 ++-
.../distributed/dht/GridDhtLockResponse.java | 18 +-
.../distributed/dht/GridDhtTxFinishRequest.java | 38 +-
.../dht/GridDhtTxPrepareRequest.java | 54 +-
.../dht/GridDhtTxPrepareResponse.java | 22 +-
.../distributed/dht/GridDhtUnlockRequest.java | 6 +-
.../dht/preloader/GridDhtPreloader.java | 2 +-
.../distributed/near/GridNearLockRequest.java | 58 +--
.../distributed/near/GridNearLockResponse.java | 26 +-
.../near/GridNearTxFinishRequest.java | 26 +-
.../near/GridNearTxPrepareRequest.java | 50 +-
.../near/GridNearTxPrepareResponse.java | 46 +-
.../distributed/near/GridNearUnlockRequest.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 3 -
.../transactions/IgniteTxLocalAdapter.java | 6 +-
.../datastructures/DataStructuresProcessor.java | 67 ++-
.../plugin/IgnitePluginProcessor.java | 16 +-
.../processors/query/GridQueryProcessor.java | 102 ++--
.../messages/GridQueryNextPageResponse.java | 1 +
.../rest/client/message/GridRouterRequest.java | 18 +
.../rest/client/message/GridRouterResponse.java | 18 +
.../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +-
.../ignite/internal/util/IgniteUtils.java | 21 +
.../util/spring/IgniteSpringHelper.java | 10 +
.../SpringApplicationContextResource.java | 4 +-
.../apache/ignite/resources/SpringResource.java | 6 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 28 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../ignite/spi/discovery/tcp/ClientImpl.java | 498 +++++++++++++------
.../ignite/spi/discovery/tcp/ServerImpl.java | 221 ++++----
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 66 +++
.../ipfinder/TcpDiscoveryIpFinderAdapter.java | 34 +-
.../TcpDiscoveryMulticastIpFinder.java | 19 +-
.../messages/TcpDiscoveryAbstractMessage.java | 10 +-
.../core/src/main/resources/ignite.properties | 2 +-
.../apache/ignite/internal/GridSelfTest.java | 12 +-
.../GridDiscoveryManagerAliveCacheSelfTest.java | 17 +-
.../cache/CacheClientStoreSelfTest.java | 228 +++++++++
...acheReadOnlyTransactionalClientSelfTest.java | 327 ------------
.../GridCacheAbstractFailoverSelfTest.java | 2 +
...ridCacheMultinodeUpdateAbstractSelfTest.java | 9 +
.../cache/GridCachePutAllFailoverSelfTest.java | 5 -
.../cache/GridCacheVersionMultinodeTest.java | 8 +-
...CacheP2pUnmarshallingRebalanceErrorTest.java | 15 +-
.../IgniteCacheP2pUnmarshallingTxErrorTest.java | 14 +-
...ridCachePartitionNotLoadedEventSelfTest.java | 82 +++
.../IgniteCacheClientNodeConcurrentStart.java | 14 +-
.../distributed/IgniteCacheManyClientsTest.java | 189 ++++++-
.../dht/GridCacheColocatedFailoverSelfTest.java | 5 -
.../GridCachePartitionedFailoverSelfTest.java | 5 -
.../GridCachePartitionedTxSalvageSelfTest.java | 37 +-
.../GridCacheReplicatedFailoverSelfTest.java | 5 -
...CacheClientWriteBehindStoreAbstractTest.java | 104 ++++
...teCacheClientWriteBehindStoreAtomicTest.java | 38 ++
.../IgnteCacheClientWriteBehindStoreTxTest.java | 32 ++
.../DataStreamProcessorSelfTest.java | 3 +-
.../marshaller/MarshallerContextTestImpl.java | 18 +
.../tcp/TcpClientDiscoverySpiSelfTest.java | 73 ++-
.../junits/GridTestKernalContext.java | 1 +
.../junits/common/GridCommonAbstractTest.java | 11 +-
.../IgniteCacheFailoverTestSuite.java | 8 -
.../IgniteCacheFailoverTestSuite2.java | 47 ++
.../testsuites/IgniteCacheTestSuite4.java | 6 +-
.../IgniteCacheWriteBehindTestSuite.java | 2 +
.../testsuites/IgniteKernalSelfTestSuite.java | 2 +-
.../ignite/util/TestTcpCommunicationSpi.java | 21 +
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 16 +-
.../hibernate/CacheHibernateBlobStore.java | 87 +---
.../CacheHibernateBlobStoreFactory.java | 235 +++++++++
.../hibernate/src/test/config/factory-cache.xml | 59 +++
.../src/test/config/factory-cache1.xml | 61 +++
.../config/factory-incorrect-store-cache.xml | 56 +++
.../CacheHibernateStoreFactorySelfTest.java | 273 ++++++++++
.../testsuites/IgniteHibernateTestSuite.java | 2 +
modules/indexing/pom.xml | 2 +-
.../CacheAbstractQueryMetricsSelfTest.java | 205 ++++++++
.../CachePartitionedQueryMetricsSelfTest.java | 32 ++
.../CacheReplicatedQueryMetricsSelfTest.java | 32 ++
.../cache/GridCacheQueryMetricsSelfTest.java | 206 --------
.../query/h2/sql/BaseH2CompareQueryTest.java | 2 +-
.../IgniteCacheQuerySelfTestSuite.java | 4 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
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 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 2 +-
modules/spring/pom.xml | 9 +-
.../GridResourceSpringBeanInjector.java | 2 +-
.../util/spring/IgniteSpringHelperImpl.java | 17 +
.../src/test/config/incorrect-store-cache.xml | 57 +++
modules/spring/src/test/config/node.xml | 43 ++
modules/spring/src/test/config/node1.xml | 45 ++
.../test/config/pojo-incorrect-store-cache.xml | 56 +++
modules/spring/src/test/config/store-cache.xml | 59 +++
modules/spring/src/test/config/store-cache1.xml | 62 +++
.../jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 172 +++++++
.../jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 193 +++++++
.../testsuites/IgniteSpringTestSuite.java | 5 +
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 30 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
154 files changed, 4386 insertions(+), 1615 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ce31bae5/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
[06/12] incubator-ignite git commit: # ignite-gg-10416 Exclude nested
beans only if exclude properties exists(visor).
Posted by sb...@apache.org.
# ignite-gg-10416 Exclude nested beans only if exclude properties exists(visor).
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0acdc2f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0acdc2f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0acdc2f9
Branch: refs/heads/ignite-882
Commit: 0acdc2f9f56d1c1f104de82211b38e36388ddb43
Parents: e5fba8b
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 18 18:15:53 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 18 18:21:49 2015 +0700
----------------------------------------------------------------------
.../util/spring/IgniteSpringHelperImpl.java | 93 +++++++++++---------
.../IgniteExcludeInConfigurationTest.java | 78 ++++++++++++++++
.../IgniteStartExcludesConfigurationTest.java | 80 -----------------
.../testsuites/IgniteSpringTestSuite.java | 2 +-
4 files changed, 129 insertions(+), 124 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index df53ca7..6cfca36 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -421,63 +421,70 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
private static GenericApplicationContext prepareSpringContext(final String... excludedProps){
GenericApplicationContext springCtx = new GenericApplicationContext();
- BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
- /**
- * @param def Registered BeanDefinition.
- * @throws BeansException in case of errors.
- */
- private void processNested(BeanDefinition def) throws BeansException {
- MutablePropertyValues vals = def.getPropertyValues();
-
- for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
- for (String excludedProp : excludedProps) {
- if (val.getName().equals(excludedProp)) {
- vals.removePropertyValue(val);
-
- return;
+ if (excludedProps.length > 0) {
+ BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
+ /**
+ * @param def Registered BeanDefinition.
+ * @throws BeansException in case of errors.
+ */
+ private void processNested(BeanDefinition def) throws BeansException {
+ Iterator<PropertyValue> iterVals = def.getPropertyValues().getPropertyValueList().iterator();
+
+ while (iterVals.hasNext()) {
+ PropertyValue val = iterVals.next();
+
+ for (String excludedProp : excludedProps) {
+ if (val.getName().equals(excludedProp)) {
+ iterVals.remove();
+
+ return;
+ }
}
- }
- if (val.getValue() instanceof Collection) {
- Collection<?> nestedVals = (Collection) val.getValue();
+ if (val.getValue() instanceof Iterable) {
+ Iterator iterNested = ((Iterable)val.getValue()).iterator();
- for (Object item : new ArrayList<>(nestedVals))
- if (item instanceof BeanDefinitionHolder) {
- BeanDefinitionHolder holder = (BeanDefinitionHolder)item;
+ while (iterNested.hasNext()) {
+ Object item = iterNested.next();
- try {
- if (holder.getBeanDefinition().getBeanClassName() != null)
- Class.forName(holder.getBeanDefinition().getBeanClassName());
+ if (item instanceof BeanDefinitionHolder) {
+ BeanDefinitionHolder h = (BeanDefinitionHolder)item;
- processNested(holder.getBeanDefinition());
- }
- catch (ClassNotFoundException ignored) {
- nestedVals.remove(item);
+ try {
+ if (h.getBeanDefinition().getBeanClassName() != null)
+ Class.forName(h.getBeanDefinition().getBeanClassName());
+
+ processNested(h.getBeanDefinition());
+ }
+ catch (ClassNotFoundException ignored) {
+ iterNested.remove();
+ }
}
}
+ }
}
}
- }
- /** {@inheritDoc} */
- @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
- throws BeansException {
- for (String beanName : beanFactory.getBeanDefinitionNames())
- try {
- BeanDefinition def = beanFactory.getBeanDefinition(beanName);
+ @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
+ throws BeansException {
+ for (String beanName : beanFactory.getBeanDefinitionNames()) {
+ try {
+ BeanDefinition def = beanFactory.getBeanDefinition(beanName);
- if (def.getBeanClassName() != null)
- Class.forName(def.getBeanClassName());
+ if (def.getBeanClassName() != null)
+ Class.forName(def.getBeanClassName());
- processNested(def);
- }
- catch (ClassNotFoundException ignored) {
- ((BeanDefinitionRegistry)beanFactory).removeBeanDefinition(beanName);
+ processNested(def);
+ }
+ catch (ClassNotFoundException ignored) {
+ ((BeanDefinitionRegistry)beanFactory).removeBeanDefinition(beanName);
+ }
}
- }
- };
+ }
+ };
- springCtx.addBeanFactoryPostProcessor(postProc);
+ springCtx.addBeanFactoryPostProcessor(postProc);
+ }
return springCtx;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
new file mode 100644
index 0000000..1edca77
--- /dev/null
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.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.spring;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.spring.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.net.*;
+import java.util.*;
+
+import static org.apache.ignite.internal.IgniteComponentType.*;
+
+/**
+ * Checks excluding properties, beans with not existing classes in spring.
+ */
+public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest {
+ private URL cfgLocation = U.resolveIgniteUrl(
+ "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml");
+
+ /** Spring should exclude properties by list and ignore beans with class not existing in classpath. */
+ public void testExclude() throws Exception {
+ IgniteSpringHelper spring = SPRING.create(false);
+
+ Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "typeMetadata").get1();
+
+ assertNotNull(cfgs);
+ assertEquals(1, cfgs.size());
+
+ IgniteConfiguration cfg = cfgs.iterator().next();
+
+ assertEquals(1, cfg.getCacheConfiguration().length);
+ assertNull(cfg.getCacheConfiguration()[0].getTypeMetadata());
+
+ cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
+
+ assertNotNull(cfgs);
+ assertEquals(1, cfgs.size());
+
+ cfg = cfgs.iterator().next();
+
+ assertEquals(1, cfg.getCacheConfiguration().length);
+
+ Collection<CacheTypeMetadata> typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
+
+ assertEquals(1, typeMetadatas.size());
+ assertNull(typeMetadatas.iterator().next().getKeyType());
+ }
+
+ /** Spring should fail if bean class not exist in classpath. */
+ public void testFail() throws Exception {
+ IgniteSpringHelper spring = SPRING.create(false);
+
+ try {
+ assertNotNull(spring.loadConfigurations(cfgLocation).get1());
+ } catch (Exception e) {
+ assertTrue(X.hasCause(e, ClassNotFoundException.class));
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
deleted file mode 100644
index f1332e0..0000000
--- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartExcludesConfigurationTest.java
+++ /dev/null
@@ -1,80 +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.spring;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.util.spring.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-import java.net.*;
-import java.util.*;
-
-import static org.apache.ignite.internal.IgniteComponentType.*;
-
-/**
- * Checks exclude properties in spring, exclude beans with not existing classes.
- */
-public class IgniteStartExcludesConfigurationTest extends GridCommonAbstractTest {
- /** Tests spring exclude properties. */
- public void testExcludes() throws Exception {
- URL cfgLocation = U.resolveIgniteUrl(
- "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml");
-
- IgniteSpringHelper spring = SPRING.create(false);
-
- Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "typeMetadata").get1();
-
- assert cfgs != null && cfgs.size() == 1;
-
- IgniteConfiguration cfg = cfgs.iterator().next();
-
- assert cfg.getCacheConfiguration().length == 1;
-
- assert cfg.getCacheConfiguration()[0].getTypeMetadata() == null;
-
- cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
-
- assert cfgs != null && cfgs.size() == 1;
-
- cfg = cfgs.iterator().next();
-
- assert cfg.getCacheConfiguration().length == 1;
-
- Collection<CacheTypeMetadata> typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
-
- assert typeMetadatas.size() == 1;
-
- assert typeMetadatas.iterator().next().getKeyType() == null;
-
- cfgs = spring.loadConfigurations(cfgLocation).get1();
-
- assert cfgs != null && cfgs.size() == 1;
-
- cfg = cfgs.iterator().next();
-
- assert cfg.getCacheConfiguration().length == 1;
-
- typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
-
- assert typeMetadatas.size() == 1;
-
- assert "java.lang.Integer".equals(typeMetadatas.iterator().next().getKeyType());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0acdc2f9/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
index 3ff927a..75d29fb 100644
--- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
+++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java
@@ -40,7 +40,7 @@ public class IgniteSpringTestSuite extends TestSuite {
suite.addTest(IgniteResourceSelfTestSuite.suite());
- suite.addTest(new TestSuite(IgniteStartExcludesConfigurationTest.class));
+ suite.addTest(new TestSuite(IgniteExcludeInConfigurationTest.class));
// Tests moved to this suite since they require Spring functionality.
suite.addTest(new TestSuite(GridP2PUserVersionChangeSelfTest.class));
[02/12] incubator-ignite git commit: # Merge branches
'ignite-gg-10416' and 'ignite-sprint-6' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into
Posted by sb...@apache.org.
# Merge branches 'ignite-gg-10416' and 'ignite-sprint-6' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b12c8030
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b12c8030
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b12c8030
Branch: refs/heads/ignite-882
Commit: b12c803026da422244856e11d4720510df50ce91
Parents: 178c4f8 b087aca
Author: Andrey <an...@gridgain.com>
Authored: Fri Jun 12 11:42:23 2015 +0300
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jun 12 11:42:23 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 15 +
examples/config/example-cache.xml | 2 +
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
.../client/router/TcpSslRouterSelfTest.java | 5 +
.../client/suite/IgniteClientTestSuite.java | 3 +-
modules/cloud/pom.xml | 2 +-
.../cloud/TcpDiscoveryCloudIpFinder.java | 25 +-
.../TcpDiscoveryCloudIpFinderSelfTest.java | 3 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../apache/ignite/cache/query/ScanQuery.java | 5 +-
.../ignite/internal/GridPluginContext.java | 6 +
.../apache/ignite/internal/IgniteKernal.java | 2 +-
.../internal/MarshallerContextAdapter.java | 30 +-
.../ignite/internal/MarshallerContextImpl.java | 10 +-
.../internal/interop/InteropIgnition.java | 54 +-
.../internal/interop/InteropProcessor.java | 8 +
.../processors/cache/GridCacheMessage.java | 51 --
.../processors/cache/GridCacheProcessor.java | 27 +-
.../processors/cache/KeyCacheObjectImpl.java | 11 +-
.../cache/query/GridCacheQueryManager.java | 5 +-
.../cacheobject/IgniteCacheObjectProcessor.java | 9 +-
.../IgniteCacheObjectProcessorImpl.java | 12 +-
.../continuous/GridContinuousProcessor.java | 15 +-
.../datastreamer/DataStreamerCacheUpdaters.java | 2 +-
.../datastreamer/DataStreamerImpl.java | 8 +-
.../portable/GridPortableInputStream.java | 10 +
.../processors/query/GridQueryProcessor.java | 2 +-
.../ignite/internal/util/IgniteUtils.java | 3 +
.../util/ipc/shmem/IpcSharedMemoryUtils.java | 4 +-
.../internal/visor/VisorMultiNodeTask.java | 2 +-
.../ignite/marshaller/MarshallerContext.java | 8 +
.../org/apache/ignite/plugin/PluginContext.java | 6 +
.../java/org/jsr166/ConcurrentHashMap8.java | 8 +-
.../java/org/jsr166/ConcurrentLinkedDeque8.java | 586 ++++++-------------
.../src/main/java/org/jsr166/LongAdder8.java | 35 +-
.../core/src/main/java/org/jsr166/README.txt | 11 +
.../src/main/java/org/jsr166/Striped64_8.java | 22 +-
.../java/org/jsr166/ThreadLocalRandom8.java | 19 +-
.../src/main/java/org/jsr166/package-info.java | 12 +-
.../core/src/main/resources/ignite.properties | 2 +-
modules/core/src/test/config/tests.properties | 2 +-
.../ignite/GridSuppressedExceptionSelfTest.java | 4 +-
.../internal/GridDiscoveryEventSelfTest.java | 6 +-
...ridFailFastNodeFailureDetectionSelfTest.java | 2 +
.../GridFailoverTaskWithPredicateSelfTest.java | 3 -
.../GridJobMasterLeaveAwareSelfTest.java | 2 -
.../internal/GridJobStealingSelfTest.java | 3 -
...ectionLocalJobMultipleArgumentsSelfTest.java | 2 -
.../GridTaskExecutionContextSelfTest.java | 9 -
.../IgniteComputeEmptyClusterGroupTest.java | 3 -
.../IgniteComputeTopologyExceptionTest.java | 9 -
.../GridDiscoveryManagerAliveCacheSelfTest.java | 5 +
.../cache/GridCacheAbstractSelfTest.java | 3 -
.../cache/GridCacheAffinityRoutingSelfTest.java | 4 +-
.../cache/GridCacheDeploymentSelfTest.java | 3 -
.../cache/GridCacheEntryMemorySizeSelfTest.java | 91 +--
.../cache/GridCacheMemoryModeSelfTest.java | 2 -
...inodeUpdateNearEnabledNoBackupsSelfTest.java | 2 +-
...CacheMultinodeUpdateNearEnabledSelfTest.java | 2 +-
.../processors/cache/GridCacheOffHeapTest.java | 28 +-
.../cache/GridCachePutAllFailoverSelfTest.java | 5 +
.../GridCacheReferenceCleanupSelfTest.java | 3 -
.../processors/cache/GridCacheStopSelfTest.java | 5 +
.../cache/GridCacheVersionMultinodeTest.java | 2 +-
.../cache/IgniteCacheAbstractTest.java | 3 -
.../IgniteCacheEntryListenerAbstractTest.java | 14 +-
.../IgniteCacheInterceptorSelfTestSuite.java | 2 +-
.../cache/IgniteCacheInvokeReadThroughTest.java | 5 +
...gniteCacheTransactionalStopBusySelfTest.java | 5 +
...teStartCacheInTransactionAtomicSelfTest.java | 32 +
.../IgniteStartCacheInTransactionSelfTest.java | 254 ++++++++
.../IgniteTxMultiThreadedAbstractTest.java | 4 +-
...cheAtomicReferenceMultiNodeAbstractTest.java | 11 -
...GridCacheQueueMultiNodeAbstractSelfTest.java | 2 -
...dCacheQueueMultiNodeConsistencySelfTest.java | 5 +
...CacheQueueRotativeMultiNodeAbstractTest.java | 10 -
.../GridCacheSetAbstractSelfTest.java | 9 -
...omicOffheapQueueCreateMultiNodeSelfTest.java | 5 +
...ionedAtomicQueueCreateMultiNodeSelfTest.java | 5 +
...rtitionedDataStructuresFailoverSelfTest.java | 5 +
...edOffheapDataStructuresFailoverSelfTest.java | 5 +
...PartitionedQueueCreateMultiNodeSelfTest.java | 5 +
...dCachePartitionedQueueEntryMoveSelfTest.java | 5 +
...nedQueueFailoverDataConsistencySelfTest.java | 5 +
...eplicatedDataStructuresFailoverSelfTest.java | 5 +
...CacheLoadingConcurrentGridStartSelfTest.java | 5 +
.../GridCacheAbstractJobExecutionTest.java | 3 -
.../GridCachePreloadLifecycleAbstractTest.java | 2 -
...heAbstractTransformWriteThroughSelfTest.java | 3 -
.../dht/GridCacheColocatedFailoverSelfTest.java | 5 +
.../GridCacheColocatedTxExceptionSelfTest.java | 5 +
...ePartitionedNearDisabledMetricsSelfTest.java | 4 +-
...dCachePartitionedTopologyChangeSelfTest.java | 5 +
.../near/GridCacheNearEvictionSelfTest.java | 3 -
.../near/GridCacheNearTxExceptionSelfTest.java | 5 +
.../GridCachePartitionedFailoverSelfTest.java | 5 +
...PartitionedFullApiMultithreadedSelfTest.java | 5 +
...idCachePartitionedHitsAndMissesSelfTest.java | 3 -
.../GridCachePartitionedNodeRestartTest.java | 5 +
...ePartitionedOptimisticTxNodeRestartTest.java | 5 +
...CachePartitionedTxMultiThreadedSelfTest.java | 5 +
.../GridCacheReplicatedFailoverSelfTest.java | 5 +
...eReplicatedFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheReplicatedInvalidateSelfTest.java | 4 +-
...ridCacheReplicatedMultiNodeLockSelfTest.java | 5 +
.../GridCacheReplicatedMultiNodeSelfTest.java | 5 +
.../GridCacheReplicatedNodeRestartSelfTest.java | 5 +
.../GridCacheReplicatedTxExceptionSelfTest.java | 5 +
.../replicated/GridReplicatedTxPreloadTest.java | 2 +
...acheAtomicReplicatedNodeRestartSelfTest.java | 5 +
.../GridCacheEvictionFilterSelfTest.java | 4 +-
...cheSynchronousEvictionsFailoverSelfTest.java | 5 +
.../IgniteCacheExpiryPolicyAbstractTest.java | 10 +-
...eCacheExpiryPolicyWithStoreAbstractTest.java | 4 +-
...dCacheLocalFullApiMultithreadedSelfTest.java | 5 +
.../GridCacheLocalTxExceptionSelfTest.java | 5 +
.../GridCacheSwapScanQueryAbstractSelfTest.java | 3 -
...ridCacheContinuousQueryAbstractSelfTest.java | 2 -
.../closure/GridClosureProcessorSelfTest.java | 29 +-
.../continuous/GridEventConsumeSelfTest.java | 2 -
.../DataStreamProcessorSelfTest.java | 44 +-
.../processors/igfs/IgfsModesSelfTest.java | 4 +-
.../internal/util/nio/GridNioSelfTest.java | 13 +-
.../internal/util/nio/GridNioSslSelfTest.java | 2 +
.../unsafe/GridUnsafeMemorySelfTest.java | 4 +-
.../tostring/GridToStringBuilderSelfTest.java | 4 +-
.../marshaller/MarshallerContextTestImpl.java | 11 +-
.../ignite/messaging/GridMessagingSelfTest.java | 3 -
.../GridP2PContinuousDeploymentSelfTest.java | 2 +
.../p2p/GridP2PLocalDeploymentSelfTest.java | 6 +-
.../p2p/GridP2PRemoteClassLoadersSelfTest.java | 31 +-
.../spi/GridTcpSpiForwardingSelfTest.java | 3 -
.../ignite/testframework/GridTestUtils.java | 14 +
.../config/GridTestProperties.java | 14 +-
.../junits/IgniteTestResources.java | 16 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 29 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 24 +-
.../IgniteCacheEvictionSelfTestSuite.java | 3 +-
.../IgniteCacheFailoverTestSuite.java | 22 +-
.../IgniteCacheFullApiSelfTestSuite.java | 8 +-
...niteCacheP2pUnmarshallingErrorTestSuite.java | 20 +-
.../testsuites/IgniteCacheRestartTestSuite.java | 10 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 44 +-
.../testsuites/IgniteCacheTestSuite2.java | 4 +-
.../testsuites/IgniteCacheTestSuite3.java | 14 +-
.../testsuites/IgniteCacheTestSuite4.java | 13 +-
.../testsuites/IgniteKernalSelfTestSuite.java | 14 +-
.../IgniteMarshallerSelfTestSuite.java | 28 +-
.../testsuites/IgniteUtilSelfTestSuite.java | 18 +-
.../apache/ignite/util/GridRandomSelfTest.java | 4 +-
modules/extdata/p2p/pom.xml | 2 +-
.../tests/p2p/P2PTestTaskExternalPath1.java | 10 +-
.../tests/p2p/P2PTestTaskExternalPath2.java | 8 +-
modules/extdata/uri/pom.xml | 2 +-
modules/gce/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
.../HadoopIgfs20FileSystemAbstractSelfTest.java | 4 +-
.../IgniteHadoopFileSystemAbstractSelfTest.java | 2 +-
.../processors/hadoop/HadoopMapReduceTest.java | 21 +-
.../collections/HadoopHashMapSelfTest.java | 4 +-
.../HadoopExternalTaskExecutionSelfTest.java | 2 +
.../HadoopExternalCommunicationSelfTest.java | 5 +
.../testsuites/IgniteHadoopTestSuite.java | 7 +-
modules/hibernate/pom.xml | 2 +-
.../hibernate/HibernateL2CacheSelfTest.java | 5 +
.../HibernateL2CacheTransactionalSelfTest.java | 5 +
.../testsuites/IgniteHibernateTestSuite.java | 4 +-
modules/indexing/pom.xml | 18 +-
.../cache/GridCacheCrossCacheQuerySelfTest.java | 10 +-
.../cache/GridCacheOffHeapSelfTest.java | 1 -
...idCacheReduceQueryMultithreadedSelfTest.java | 10 -
.../processors/cache/GridCacheSwapSelfTest.java | 3 -
.../IgniteCacheAbstractFieldsQuerySelfTest.java | 13 +-
.../cache/IgniteCacheAbstractQuerySelfTest.java | 2 -
...hePartitionedQueryMultiThreadedSelfTest.java | 40 +-
.../IgniteCacheQueryMultiThreadedSelfTest.java | 1 -
.../IgniteCacheQueryNodeRestartSelfTest.java | 5 +
...dCacheAbstractReduceFieldsQuerySelfTest.java | 1 -
.../h2/GridIndexingSpiAbstractSelfTest.java | 4 +-
.../query/h2/sql/BaseH2CompareQueryTest.java | 4 +-
.../query/h2/sql/GridQueryParsingTest.java | 5 +-
.../IgniteCacheQuerySelfTestSuite.java | 2 +-
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/mesos/README.txt | 2 +-
modules/mesos/pom.xml | 2 +-
.../apache/ignite/mesos/ClusterProperties.java | 15 +
.../apache/ignite/mesos/IgniteScheduler.java | 10 +-
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 +-
modules/slf4j/pom.xml | 2 +-
modules/spark-2.10/pom.xml | 2 +-
modules/spark/pom.xml | 40 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console-2.10/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
.../IgniteWebSessionSelfTestSuite.java | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 2 +-
213 files changed, 1534 insertions(+), 1037 deletions(-)
----------------------------------------------------------------------