[2/4] incubator-ignite git commit: Fixed error message

2015-08-13 Thread sboikov
Fixed error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/653c0b28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/653c0b28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/653c0b28

Branch: refs/heads/ignite-946
Commit: 653c0b28d340a37893741b0d381a63330732fd10
Parents: d5986c2
Author: Valentin Kulichenko 
Authored: Wed Aug 12 16:54:47 2015 -0700
Committer: Valentin Kulichenko 
Committed: Wed Aug 12 16:54:47 2015 -0700

--
 .../ignite/internal/processors/cache/GridCacheGateway.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/653c0b28/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index a3c8da6..93c5858 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -156,8 +156,7 @@ public class GridCacheGateway {
 GridCachePreloader preldr = cache != null ? cache.preloader() : 
null;
 
 if (preldr == null)
-throw new IllegalStateException("Grid is in invalid state to 
perform this operation. " +
-"It either not started yet or has already being or have 
stopped [gridName=" + ctx.gridName() + ']');
+throw new IllegalStateException("Cache has been closed: " + 
ctx.name());
 
 preldr.startFuture().get();
 }
@@ -177,7 +176,7 @@ public class GridCacheGateway {
 try {
 return setOperationContextPerCall(opCtx);
 }
-catch (RuntimeException e) {
+catch (Throwable e) {
 rwLock.readUnlock();
 
 throw e;



incubator-ignite git commit: IGNITE-843 Moved Memory, Query & Store to general from advanced settings.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 0c64be58b -> f074e6114


IGNITE-843 Moved Memory, Query & Store to general from advanced settings.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f074e611
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f074e611
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f074e611

Branch: refs/heads/ignite-843
Commit: f074e611429079509fee33fea4e390f7a93be47c
Parents: 0c64be5
Author: AKuznetsov 
Authored: Thu Aug 13 15:30:39 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 15:30:39 2015 +0700

--
 .../src/main/js/controllers/models/caches.json  | 833 ++-
 .../src/main/js/helpers/data-structures.js  |  35 -
 .../src/main/js/views/configuration/caches.jade |   8 +-
 3 files changed, 423 insertions(+), 453 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f074e611/modules/control-center-web/src/main/js/controllers/models/caches.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/caches.json 
b/modules/control-center-web/src/main/js/controllers/models/caches.json
index 7561d7b..ec426dc 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -18,123 +18,83 @@
   },
   "general": [
 {
-  "label": "Name",
-  "type": "text",
-  "model": "name",
-  "required": true,
-  "placeholder": "Input name",
-  "id": "defaultFocusId"
-},
-{
-  "label": "Mode",
-  "type": "select",
-  "model": "mode",
-  "placeholder": "PARTITIONED",
-  "items": "modes",
-  "tip": [
-"Cache modes:",
-"",
-"  Partitioned - in this mode the overall key set will be divided 
into partitions and all partitions will be split equally between participating 
nodes.",
-"  Replicated - in this mode all the keys are distributed to all 
participating nodes.",
-"  Local - in this mode caches residing on different grid nodes 
will not know about each other.",
-""
-  ]
-},
-{
-  "label": "Atomicity",
-  "type": "select",
-  "model": "atomicityMode",
-  "placeholder": "ATOMIC",
-  "items": "atomicities",
-  "tip": [
-"Atomicity:",
-"",
-"  Transactional - in this mode specified fully ACID-compliant 
transactional cache behavior.",
-"  Atomic - in this mode distributed transactions and distributed 
locking are not supported.",
-""
-  ]
-},
-{
-  "label": "Backups",
-  "type": "number",
-  "model": "backups",
-  "hide": "backupItem.mode != 'PARTITIONED'",
-  "placeholder": 0,
-  "tip": [
-"Number of nodes used to back up single partition for partitioned 
cache."
-  ]
-},
-{
-  "label": "Read from backup",
-  "type": "check",
-  "model": "readFromBackup",
-  "placeholder": true,
-  "hide": "!backupItem.backups || backupItem.mode == 'LOCAL'",
-  "tip": [
-"Flag indicating whether data can be read from backup.",
-"If not set then always get data from primary node (never from 
backup)."
-  ]
-},
-{
-  "label": "Copy on read",
-  "type": "check",
-  "model": "copyOnRead",
-  "placeholder": true,
-  "tip": [
-"Flag indicating whether copy of of the value stored in cache should 
be created for cache operation implying return value.",
-"Also if this flag is set copies are created for values passed to 
CacheInterceptor and to CacheEntryProcessor."
-  ]
-},
-{
-  "label": "Invalidate near cache",
-  "type": "check",
-  "model": "invalidate",
-  "tip": [
-"Invalidation flag for near cache entries in transaction.",
-"If set then values will be invalidated (nullified) upon commit in 
near cache."
-  ]
-}
-  ],
-  "advanced": [
-{
-  "label": "Concurrency control",
-  "tip": [
-"Cache concurrent usage settings."
-  ],
+  "label": "General",
   "fields": [
 {
-  "label": "Max async operations",
-  "type": "number",
-  "model": "maxConcurrentAsyncOperations",
-  "placeholder": 500,
+  "label": "Name",
+  "type": "text",
+  "model": "name",
+  "required": true,
+  "placeholder": "Input name",
+  "id": "defaultFocusId"
+},
+{
+  "label": "Mode",
+  "type": "select",
+  "model": "mode",
+  "placeholder": "PARTITIONED",
+  "items": "modes",
   "tip": [
-

[1/4] incubator-ignite git commit: # ignite-1229: stop ping process when node left topology

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-946 4f8f32af8 -> 51a9bd85e


# ignite-1229: stop ping process when node left topology


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d5986c26
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d5986c26
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d5986c26

Branch: refs/heads/ignite-946
Commit: d5986c265c9f68c2a98c48d4ba75444fad9e6725
Parents: ae11e9b
Author: sboikov 
Authored: Wed Aug 12 11:42:22 2015 +0300
Committer: sboikov 
Committed: Wed Aug 12 11:42:22 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 1 file changed, 60 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5986c26/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 92c21ed..76144e3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -388,12 +388,15 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 TcpDiscoveryNode node = ring.node(nodeId);
 
-if (node == null || !node.visible())
+if (node == null)
+return false;
+
+if (!nodeAlive(nodeId))
 return false;
 
 boolean res = pingNode(node);
 
-if (!res && !node.isClient()) {
+if (!res && !node.isClient() && nodeAlive(nodeId)) {
 LT.warn(log, null, "Failed to ping node (status check will be 
initiated): " + nodeId);
 
 msgWorker.addMessage(new TcpDiscoveryStatusCheckMessage(locNode, 
node.id()));
@@ -421,14 +424,18 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 node = ring.node(node.clientRouterNodeId());
 
-if (node == null || !node.visible())
+if (node == null || !nodeAlive(node.id()))
 return false;
 }
 
 for (InetSocketAddress addr : spi.getNodeAddresses(node, 
U.sameMacs(locNode, node))) {
 try {
 // ID returned by the node should be the same as ID of the 
parameter for ping to succeed.
-IgniteBiTuple t = pingNode(addr, clientNodeId);
+IgniteBiTuple t = pingNode(addr, node.id(), 
clientNodeId);
+
+if (t == null)
+// Remote node left topology.
+return false;
 
 boolean res = node.id().equals(t.get1()) && (clientNodeId == 
null || t.get2());
 
@@ -453,12 +460,14 @@ class ServerImpl extends TcpDiscoveryImpl {
  * Pings the node by its address to see if it's alive.
  *
  * @param addr Address of the node.
+ * @param nodeId Node ID to ping. In case when client node ID is not null 
this node ID is an ID of the router node.
  * @param clientNodeId Client node ID.
- * @return ID of the remote node and "client exists" flag if node alive.
+ * @return ID of the remote node and "client exists" flag if node alive or 
{@code null} if the remote node has
+ * left a topology during the ping process.
  * @throws IgniteCheckedException If an error occurs.
  */
-private IgniteBiTuple pingNode(InetSocketAddress addr, 
@Nullable UUID clientNodeId)
-throws IgniteCheckedException {
+private @Nullable IgniteBiTuple pingNode(InetSocketAddress 
addr, @Nullable UUID nodeId,
+@Nullable UUID clientNodeId) throws IgniteCheckedException {
 assert addr != null;
 
 UUID locNodeId = getLocalNodeId();
@@ -537,6 +546,16 @@ class ServerImpl extends TcpDiscoveryImpl {
 return t;
 }
 catch (IOException | IgniteCheckedException e) {
+if (nodeId != null && !nodeAlive(nodeId)) {
+if (log.isDebugEnabled())
+log.debug("Failed to ping the node (has left 
or leaving topology): [nodeId=" + nodeId +
+']');
+
+fut.onDone((IgniteBiTuple)null);
+
+return null;
+}
+
 if (errs == null)
 errs = new ArrayList<>();
 
@@ -615,6 +634,28 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 /**
+ * Checks whether a node is alive or not.
+ *
+ * @param nodeId Node ID.
+ * @return {@code True} if node is in th

incubator-ignite git commit: # Test for ignite-1245.

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 36f7ba669 -> aed83af5f


# Test for ignite-1245.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/aed83af5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/aed83af5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/aed83af5

Branch: refs/heads/master
Commit: aed83af5f76c47bc9e4d0e8f60955fc6c6b42aac
Parents: 36f7ba6
Author: sboikov 
Authored: Thu Aug 13 13:05:43 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 13:05:43 2015 +0300

--
 .../IgniteCacheContinuousQueryClientTest.java   | 114 +++
 1 file changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aed83af5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
new file mode 100644
index 000..bb413a0
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query.continuous;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.event.*;
+import java.util.concurrent.*;
+
+import static java.util.concurrent.TimeUnit.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheContinuousQueryClientTest extends 
GridCommonAbstractTest {
+/** */
+protected static TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** */
+private boolean client;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration ccfg = new CacheConfiguration();
+
+ccfg.setCacheMode(PARTITIONED);
+ccfg.setAtomicityMode(ATOMIC);
+ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+cfg.setCacheConfiguration(ccfg);
+
+cfg.setClientMode(client);
+
+return cfg;
+}
+
+/**
+ * @throws Exception If failed.
+ */
+public void testNodeJoins() throws Exception {
+startGrids(2);
+
+client = true;
+
+Ignite clientNode = startGrid(3);
+
+client = false;
+
+CacheEventListener lsnr = new CacheEventListener();
+
+ContinuousQuery qry = new ContinuousQuery<>();
+
+qry.setLocalListener(lsnr);
+
+QueryCursor cur = clientNode.cache(null).query(qry);
+
+Ignite joined = startGrid(4);
+
+IgniteCache joinedCache = joined.cache(null);
+
+joinedCache.put(primaryKey(joinedCache), 1);
+
+assertTrue("Failed to wait for event.", lsnr.latch.await(5, SECONDS));
+
+cur.close();
+}
+
+/**
+ *
+ */
+private static class CacheEventListener implements 
CacheEntryUpdatedListener {
+/** */
+private final CountDownLatch latch = new CountDownLatch(1);
+
+/** */
+@LoggerResource
+private IgniteLogger log;
+
+/** {@inheritDoc} */
+@Override public void onUpdated(Iterable>

incubator-ignite git commit: # Register client continuous listeners on node join

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1245 [created] a246057c3


# Register client continuous listeners on node join


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a246057c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a246057c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a246057c

Branch: refs/heads/ignite-1245
Commit: a246057c3240acaa37ae28873a217c771ef93b6a
Parents: 36f7ba6
Author: sboikov 
Authored: Thu Aug 13 13:05:43 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 13:45:21 2015 +0300

--
 .../continuous/GridContinuousProcessor.java |  34 -
 .../IgniteCacheContinuousQueryClientTest.java   | 134 +++
 .../IgniteCacheQuerySelfTestSuite.java  |   1 +
 3 files changed, 166 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a246057c/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index daa9494..8c8e259 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -193,10 +193,10 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 unregisterRemote(routineId);
 
 if (snd.isClient()) {
-Map infoMap = 
clientInfos.get(snd.id());
+Map clientRouteMap = 
clientInfos.get(snd.id());
 
-if (infoMap != null)
-infoMap.remove(msg.routineId());
+if (clientRouteMap != null)
+clientRouteMap.remove(msg.routineId());
 }
 }
 }
@@ -370,6 +370,34 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 
 for (Map.Entry> entry : 
data.clientInfos.entrySet()) {
+UUID clientNodeId = entry.getKey();
+
+Map clientRouteMap = entry.getValue();
+
+for (Map.Entry e : 
clientRouteMap.entrySet()) {
+UUID routineId = e.getKey();
+LocalRoutineInfo info = e.getValue();
+
+try {
+if (info.prjPred != null)
+ctx.resource().injectGeneric(info.prjPred);
+
+if (info.prjPred == null || 
info.prjPred.apply(ctx.discovery().localNode())) {
+if (registerHandler(clientNodeId,
+routineId,
+info.hnd,
+info.bufSize,
+info.interval,
+info.autoUnsubscribe,
+false))
+info.hnd.onListenerRegistered(routineId, ctx);
+}
+}
+catch (IgniteCheckedException err) {
+U.error(log, "Failed to register continuous handler.", 
err);
+}
+}
+
 Map map = 
clientInfos.get(entry.getKey());
 
 if (map == null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a246057c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
new file mode 100644
index 000..7341dea
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
@@ -0,0 +1,134 @@
+/*
+ * 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 "

incubator-ignite git commit: ignite-946: renamed VersionedEntry to CacheEntry

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-946 954c4591c -> 4f8f32af8


ignite-946: renamed VersionedEntry to CacheEntry


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4f8f32af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4f8f32af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4f8f32af

Branch: refs/heads/ignite-946
Commit: 4f8f32af80d2c13df3fd8d3c5b302c0fd04906c5
Parents: 954c459
Author: Denis Magda 
Authored: Thu Aug 13 09:10:45 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 09:10:45 2015 +0300

--
 .../org/apache/ignite/cache/CacheEntry.java | 94 
 .../ignite/cache/version/VersionedEntry.java| 92 ---
 .../ignite/cache/version/package-info.java  | 21 -
 .../processors/cache/CacheEntryImpl.java|  6 +-
 .../processors/cache/CacheEntryImpl0.java   |  6 +-
 .../processors/cache/CacheEntryImplEx.java  | 83 +
 .../processors/cache/CacheInvokeEntry.java  |  6 +-
 .../processors/cache/GridCacheEntryEx.java  |  2 +-
 .../processors/cache/GridCacheMapEntry.java | 12 +--
 .../cache/version/CacheVersionedEntryImpl.java  | 83 -
 .../resources/META-INF/classnames.properties|  3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |  2 +-
 .../CacheVersionedEntryAbstractTest.java| 27 +++---
 13 files changed, 209 insertions(+), 228 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4f8f32af/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
new file mode 100644
index 000..a6a2aa3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
@@ -0,0 +1,94 @@
+/*
+ * 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.cache;
+
+import org.apache.ignite.*;
+
+import javax.cache.*;
+import javax.cache.processor.*;
+import java.util.*;
+
+/**
+ * Cache entry that extends {@link javax.cache.Cache.Entry} by providing 
additional entry related information.
+ *
+ * To get an instance of {@code CacheEntry} use {@link 
javax.cache.Cache.Entry#unwrap(Class)} method by passing
+ * {@code CacheEntry} class to it as the argument.
+ * 
+ * {@code CacheEntry} is supported only for {@link javax.cache.Cache.Entry} 
returned by one of the following methods:
+ * 
+ * {@link javax.cache.Cache#invoke(Object, EntryProcessor, Object...)}
+ * {@link javax.cache.Cache#invokeAll(Set, EntryProcessor, Object...)}
+ * invoke and invokeAll methods of {@link IgniteCache}
+ * {@link IgniteCache#randomEntry()}
+ * 
+ * 
+ * {@code CacheEntry} is not supported for {@link 
javax.cache.Cache#iterator()} because of performance reasons.
+ * {@link javax.cache.Cache#iterator()} loads entries from all the cluster 
nodes and to speed up the load additional
+ * information, like entry's version, is ignored.
+ *
+ * Java Example
+ * 
+ * IgniteCache cache = grid(0).cache(null);
+ *
+ * CacheEntry entry1 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public CacheEntry process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(CacheEntry.class);
+ *  }
+ * });
+ *
+ * // Cache entry for the given key may be updated at some point later.
+ *
+ * CacheEntry entry2 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public CacheEntry process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(CacheEntry.class);
+ *  }
+ * });
+ *
+ * // Comparing entries' versions.
+ * if (entry1.version().compareTo(entry2.version()) < 0) {
+ * // the entry has been updated
+ * }
+ * 
+

incubator-ignite git commit: IGNITE-843 Added "Show settings" configuration for dropdown-details.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 f074e6114 -> 74c1f9b5c


IGNITE-843 Added "Show settings" configuration for dropdown-details.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/74c1f9b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/74c1f9b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/74c1f9b5

Branch: refs/heads/ignite-843
Commit: 74c1f9b5c493045d419f2e5936381fe6fb7d5a97
Parents: f074e61
Author: AKuznetsov 
Authored: Thu Aug 13 16:27:44 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 16:27:44 2015 +0700

--
 .../src/main/js/controllers/models/caches.json  |  3 +++
 .../src/main/js/controllers/models/clusters.json| 12 +++-
 .../src/main/js/controllers/models/summary.json |  1 +
 .../src/main/js/views/includes/controls.jade|  4 ++--
 4 files changed, 9 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/74c1f9b5/modules/control-center-web/src/main/js/controllers/models/caches.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/caches.json 
b/modules/control-center-web/src/main/js/controllers/models/caches.json
index ec426dc..2ca832a 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -145,6 +145,7 @@
 {
   "label": "Eviction policy",
   "type": "dropdown-details",
+  "settings": true,
   "path": "evictionPolicy",
   "model": "kind",
   "placeholder": "Choose eviction policy",
@@ -381,6 +382,7 @@
 {
   "label": "Store factory",
   "type": "dropdown-details",
+  "settings": true,
   "path": "cacheStoreFactory",
   "model": "kind",
   "placeholder": "Choose store factory",
@@ -738,6 +740,7 @@
 {
   "label": "Eviction policy",
   "type": "dropdown-details",
+  "settings": true,
   "path": "nearConfiguration.nearEvictionPolicy",
   "model": "kind",
   "placeholder": "Choose eviction policy",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/74c1f9b5/modules/control-center-web/src/main/js/controllers/models/clusters.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/clusters.json 
b/modules/control-center-web/src/main/js/controllers/models/clusters.json
index 399d3e9..73e56e3 100644
--- a/modules/control-center-web/src/main/js/controllers/models/clusters.json
+++ b/modules/control-center-web/src/main/js/controllers/models/clusters.json
@@ -49,17 +49,15 @@
 {
   "label": "Discovery",
   "type": "dropdown-details",
+  "settings": false,
   "path": "discovery",
   "model": "kind",
-  "required": true,
-  "placeholder": "Choose discovery",
   "items": "discoveries",
   "tip": [
 "Discovery allows to discover remote nodes in grid."
   ],
   "details": {
 "Vm": {
-  "expanded": true,
   "fields": [
 {
   "label": "Addresses",
@@ -93,7 +91,6 @@
   ]
 },
 "Multicast": {
-  "expanded": false,
   "fields": [
 {
   "label": "IP address",
@@ -151,7 +148,6 @@
   ]
 },
 "S3": {
-  "expanded": true,
   "fields": [
 {
   "label": "Bucket name",
@@ -170,7 +166,6 @@
   ]
 },
 "Cloud": {
-  "expanded": true,
   "fields": [
 {
   "label": "Credential",
@@ -253,7 +248,6 @@
   ]
 },
 "GoogleStorage": {
-  "expanded": true,
   "fields": [
 {
   "label": "Project name",
@@ -301,7 +295,6 @@
   ]
 },
 "Jdbc": {
-  "expanded": true,
   "fields": [
 {
   "label": "DB schema should be initialized by Ignite",
@@ -315,7 +308,6 @@
   ]
 },
 "SharedFs": {
-  "expanded": false,
   "fields": [
 {
   "label": "File path",
@@ -490,6 +482,7 @@
 {
   "label": "Marshaller",
   "type": "dropdown-details",
+  "settings": true,
   "path": "marshaller",
   "model": "kind",
   "placeholder": "Choose marshaller",
@@ -663,6 +656,7 @@
 {
   "label": "Swap space SPI",
   "type": "dropdown-details",
+  "settings": true,

[3/4] incubator-ignite git commit: Fixed error message

2015-08-13 Thread sboikov
Fixed error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/36f7ba66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/36f7ba66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/36f7ba66

Branch: refs/heads/ignite-946
Commit: 36f7ba669fd5b706fd9b01c06ce20dbb7610d50f
Parents: 653c0b2
Author: Valentin Kulichenko 
Authored: Wed Aug 12 16:56:18 2015 -0700
Committer: Valentin Kulichenko 
Committed: Wed Aug 12 16:56:18 2015 -0700

--
 .../apache/ignite/internal/processors/cache/GridCacheGateway.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36f7ba66/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index 93c5858..58c9035 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -156,7 +156,7 @@ public class GridCacheGateway {
 GridCachePreloader preldr = cache != null ? cache.preloader() : 
null;
 
 if (preldr == null)
-throw new IllegalStateException("Cache has been closed: " + 
ctx.name());
+throw new IllegalStateException("Cache has been closed or 
destroyed: " + ctx.name());
 
 preldr.startFuture().get();
 }



[1/2] incubator-ignite git commit: IGNITE-843 WIP on tables.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 fe0507955 -> a9fd2676a


IGNITE-843 WIP on tables.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d81ab79a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d81ab79a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d81ab79a

Branch: refs/heads/ignite-843
Commit: d81ab79ab4f5d0f84eeef92d2f87ca4a9d8cf416
Parents: fe05079
Author: AKuznetsov 
Authored: Wed Aug 12 21:28:53 2015 +0700
Committer: AKuznetsov 
Committed: Wed Aug 12 21:28:53 2015 +0700

--
 .../main/js/controllers/caches-controller.js|   3 +-
 .../src/main/js/controllers/common-module.js| 322 ---
 .../main/js/controllers/metadata-controller.js  |   9 +-
 modules/control-center-web/src/main/js/db.js|   2 +-
 .../control-center-web/src/main/js/package.json |   2 +-
 .../src/main/js/views/includes/controls.jade|  26 +-
 6 files changed, 233 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d81ab79a/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 6b9f1bf..5c6ee17 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -38,7 +38,6 @@ controlCenterModule.controller('cachesController', [
 $scope.tablePairSave = $table.tablePairSave;
 $scope.tablePairSaveVisible = $table.tablePairSaveVisible;
 
-$scope.availableWidth = $common.availableWidth;
 $scope.compactJavaName = $common.compactJavaName;
 
 $scope.atomicities = $common.mkOptions(['ATOMIC', 
'TRANSACTIONAL']);
@@ -147,7 +146,7 @@ controlCenterModule.controller('cachesController', [
 return true;
 };
 
-$scope.tablePairValid = function (item, field, keyCls, valCls, 
index) {
+$scope.tablePairValid = function (item, field, index) {
 if (!$common.isValidJavaClass('Indexed type key', keyCls, 
true))
 return focusInvalidField(index, 'KeyIndexedType');
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d81ab79a/modules/control-center-web/src/main/js/controllers/common-module.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/common-module.js 
b/modules/control-center-web/src/main/js/controllers/common-module.js
index 3aa17b0..7a22992 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -173,115 +173,212 @@ controlCenterModule.service('$common', [
 /**
  * Compact java full class name by max number of characters.
  *
- * @param s Class name to cut.
- * @param maxLength Max available width in characters.
- * @returns {*} Compacted class name.
+ * @param names Array of class names to compact.
+ * @param nameLength Max available width in characters for simple name.
+ * @returns {*} Array of compacted class names.
  */
-function compactByMaxCharts(s, maxLength) {
-if (s.length <= maxLength)
-return s;
+function compactByMaxCharts(names, nameLength) {
+for (var nameIx = 0; nameIx < names.length; nameIx ++) {
+var s = names[nameIx];
 
-var totalLength = s.length;
+if (s.length > nameLength) {
+var totalLength = s.length;
 
-var packages = s.split('.');
+var packages = s.split('.');
 
-var packageCnt = packages.length - 1;
+var packageCnt = packages.length - 1;
 
-for (var i = 0; i < packageCnt && totalLength > maxLength; i++) {
-if (packages[i].length > 0) {
-totalLength -= packages[i].length - 1;
+for (var i = 0; i < packageCnt && totalLength > 
nameLength; i++) {
+if (packages[i].length > 0) {
+totalLength -= packages[i].length - 1;
 
-packages[i] = packages[i][0];
-}
-}
+packages[i] = packages[i][0];
+}
+}
 
-if (totalLength > maxLength) {
-var className = packages[pack

[2/2] incubator-ignite git commit: IGNITE-843 WIP on tables.

2015-08-13 Thread akuznetsov
IGNITE-843 WIP on tables.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a9fd2676
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a9fd2676
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a9fd2676

Branch: refs/heads/ignite-843
Commit: a9fd2676aceea239dad22b6876b96386ff35adf6
Parents: d81ab79
Author: AKuznetsov 
Authored: Thu Aug 13 08:10:00 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 08:10:00 2015 +0700

--
 .../main/js/controllers/caches-controller.js|   8 +-
 .../main/js/controllers/clusters-controller.js  |   4 +-
 .../src/main/js/controllers/common-module.js|  25 ++-
 .../main/js/controllers/metadata-controller.js  | 162 +++
 .../main/js/controllers/models/clusters.json|   8 +-
 .../src/main/js/views/includes/controls.jade| 103 ++--
 6 files changed, 139 insertions(+), 171 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a9fd2676/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 5c6ee17..bf1149b 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -147,17 +147,19 @@ controlCenterModule.controller('cachesController', [
 };
 
 $scope.tablePairValid = function (item, field, index) {
-if (!$common.isValidJavaClass('Indexed type key', keyCls, 
true))
+var pairValue = $table.tablePairValue(field, index);
+
+if (!$common.isValidJavaClass('Indexed type key', 
pairValue.key, true))
 return focusInvalidField(index, 'KeyIndexedType');
 
-if (!$common.isValidJavaClass('Indexed type value', valCls, 
true))
+if (!$common.isValidJavaClass('Indexed type value', 
pairValue.value, true))
 return focusInvalidField(index, 'ValueIndexedType');
 
 var model = item[field.model];
 
 if ($common.isDefined(model)) {
 var idx = _.findIndex(model, function (pair) {
-return pair.keyClass == keyCls
+return pair.keyClass == pairValue.key
 });
 
 // Found duplicate.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a9fd2676/modules/control-center-web/src/main/js/controllers/clusters-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/clusters-controller.js 
b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 0ea68a1..bc97aa9 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -171,8 +171,8 @@ controlCenterModule.controller('clustersController', 
['$scope', '$http', '$commo
 // Remove deleted caches.
 restoredItem.caches = 
_.filter(restoredItem.caches, function (cacheId) {
 return _.findIndex($scope.caches, function 
(scopeCache) {
-return scopeCache.value == cacheId;
-}) >= 0;
+return scopeCache.value == cacheId;
+}) >= 0;
 });
 
 $scope.selectedItem = $scope.clusters[idx];

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a9fd2676/modules/control-center-web/src/main/js/controllers/common-module.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/common-module.js 
b/modules/control-center-web/src/main/js/controllers/common-module.js
index 7a22992..f7abf0c 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -662,14 +662,31 @@ controlCenterModule.service('$table', [
 
 var ui = _tableUI(field);
 
-if (ui == 'table-simple')
+if (ui == 'table-simple') {
+field.newValue = null;
+
 _tableFocus(field.focusId, -1);
-else if (ui == 'table-pair')
+}
+else if (ui == 'table-pair') {
+field.newKey = nu

incubator-ignite git commit: IGNITE-843 css for popup.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 2d25932ce -> 6d89c5fa2


IGNITE-843 css for popup.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6d89c5fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6d89c5fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6d89c5fa

Branch: refs/heads/ignite-843
Commit: 6d89c5fa2ce13c3b3ed576f390f7e2428ecf3614
Parents: 2d25932
Author: AKuznetsov 
Authored: Thu Aug 13 17:33:25 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 17:33:25 2015 +0700

--
 .../src/main/js/public/stylesheets/style.scss   | 28 
 .../src/main/js/views/templates/popover.jade|  9 +++
 2 files changed, 32 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d89c5fa/modules/control-center-web/src/main/js/public/stylesheets/style.scss
--
diff --git 
a/modules/control-center-web/src/main/js/public/stylesheets/style.scss 
b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 753bef0..5bf9c9a 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -929,6 +929,34 @@ button .caret, .btn .caret {
 margin-left: 5px;
 }
 
+.popover-arrow {
+background: white;
+border: 1px solid $ignite-red;
+}
+
+.popover-arrow:after, .popover-arrow:before {
+right: 100%;
+top: 50%;
+border: solid transparent;
+content: " ";
+height: 0;
+width: 0;
+position: absolute;
+pointer-events: none;
+}
+
+.popover-arrow:after {
+border: solid 7px transparent;
+border-right-color: white;
+margin-top: -7px;
+}
+
+.popover-arrow:before {
+border: solid 8px transparent;
+border-right-color: $ignite-red;
+margin-top: -8px;
+}
+
 label {
 font-weight: normal;
 margin-bottom: 0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d89c5fa/modules/control-center-web/src/main/js/views/templates/popover.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/templates/popover.jade 
b/modules/control-center-web/src/main/js/views/templates/popover.jade
index cc5a884..3770482 100644
--- a/modules/control-center-web/src/main/js/views/templates/popover.jade
+++ b/modules/control-center-web/src/main/js/views/templates/popover.jade
@@ -14,8 +14,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 
-.popover
-.arrow
-.popover-content
-label {{content}}
-button.close(type='button' ng-click='$hide()') ×
+.popover-arrow.popover
+.popover-content
+label {{content}}
+button.close(type='button' ng-click='$hide()') ×



incubator-ignite git commit: IGNITE-843 WIP on cluster validation.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 d91fcb310 -> 2d25932ce


IGNITE-843 WIP on cluster validation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2d25932c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2d25932c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2d25932c

Branch: refs/heads/ignite-843
Commit: 2d25932ce98836158374b6204ebc30f62340b145
Parents: d91fcb3
Author: AKuznetsov 
Authored: Thu Aug 13 17:12:33 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 17:12:33 2015 +0700

--
 .../src/main/js/controllers/clusters-controller.js   | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d25932c/modules/control-center-web/src/main/js/controllers/clusters-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/clusters-controller.js 
b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 0f73806..6c2ead5 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -230,13 +230,17 @@ controlCenterModule.controller('clustersController', 
['$scope', '$http', '$popov
 // Check cluster logical consistency.
 function validate(item) {
 if ($common.isEmptyString(item.name)) {
-$focus('clusterName');
+$common.ensureActivePanel($scope.panels, 0);
 
 var el = $('body').find('#clusterName');
 
 var myPopover = $popover(el, {content: 'Name should not be 
empty'});
 
-myPopover.$promise.then(myPopover.show);
+myPopover.$promise.then(function () {
+myPopover.show();
+
+$focus('clusterName');
+});
 
 //window.setInterval(function() { myPopover.hide() }, 3000)
 



incubator-ignite git commit: IGNITE-843 WIP on cluster validation.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 d220dec0d -> d91fcb310


IGNITE-843 WIP on cluster validation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d91fcb31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d91fcb31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d91fcb31

Branch: refs/heads/ignite-843
Commit: d91fcb3102f1304475686ebfc1bc7ba223d85721
Parents: d220dec
Author: AKuznetsov 
Authored: Thu Aug 13 17:05:11 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 17:05:11 2015 +0700

--
 .../main/js/controllers/clusters-controller.js  | 30 
 .../src/main/js/controllers/common-module.js| 10 +++
 .../main/js/controllers/models/clusters.json|  2 +-
 .../src/main/js/public/stylesheets/style.scss   | 12 
 .../src/main/js/routes/public.js|  5 
 .../main/js/views/configuration/clusters.jade   |  6 ++--
 .../src/main/js/views/templates/popover.jade| 21 ++
 7 files changed, 76 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d91fcb31/modules/control-center-web/src/main/js/controllers/clusters-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/clusters-controller.js 
b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index bc97aa9..0f73806 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -15,7 +15,8 @@
  * limitations under the License.
  */
 
-controlCenterModule.controller('clustersController', ['$scope', '$http', 
'$common', '$focus', '$confirm', '$copy', '$table', function ($scope, $http, 
$common, $focus, $confirm, $copy, $table) {
+controlCenterModule.controller('clustersController', ['$scope', '$http', 
'$popover', '$common', '$focus', '$confirm', '$copy', '$table',
+function ($scope, $http, $popover, $common, $focus, $confirm, $copy, 
$table) {
 $scope.joinTip = $common.joinTip;
 $scope.getModel = $common.getModel;
 
@@ -221,8 +222,28 @@ controlCenterModule.controller('clustersController', 
['$scope', '$http', '$commo
 });
 };
 
+$scope.popover = {
+"title": "Title",
+"content": "Hello PopoverThis is a multiline message!"
+};
+
 // Check cluster logical consistency.
 function validate(item) {
+if ($common.isEmptyString(item.name)) {
+$focus('clusterName');
+
+var el = $('body').find('#clusterName');
+
+var myPopover = $popover(el, {content: 'Name should not be 
empty'});
+
+myPopover.$promise.then(myPopover.show);
+
+//window.setInterval(function() { myPopover.hide() }, 3000)
+
+//return $common.showError('Name should not be empty!', 'zzz', 
'#div_to_show');
+return false;
+}
+
 if (!item.swapSpaceSpi || !item.swapSpaceSpi.kind && item.caches) {
 for (var i = 0; i < item.caches.length; i++) {
 var idx = $scope.indexOfCache(item.caches[i]);
@@ -230,11 +251,8 @@ controlCenterModule.controller('clustersController', 
['$scope', '$http', '$commo
 if (idx >= 0) {
 var cache = $scope.caches[idx];
 
-if (cache.swapEnabled) {
-$common.showError('Swap space SPI is not 
configured, but cache "' + cache.label + '" configured to use swap!');
-
-return false;
-}
+if (cache.swapEnabled)
+return $common.showError('Swap space SPI is not 
configured, but cache "' + cache.label + '" configured to use swap!');
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d91fcb31/modules/control-center-web/src/main/js/controllers/common-module.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/common-module.js 
b/modules/control-center-web/src/main/js/controllers/common-module.js
index e596ea8..2ead841 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -24,6 +24,16 @@ controlCenterModule.config(function ($modalProvider) {
 });
 });
 
+// Comboboxes configuration.
+controlCenterModule.config(function ($popoverProvider) {
+angular.extend($

incubator-ignite git commit: IGNITE-843 WIP on tables.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 2316b22b6 -> 0c64be58b


IGNITE-843 WIP on tables.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0c64be58
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0c64be58
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0c64be58

Branch: refs/heads/ignite-843
Commit: 0c64be58bb552d2ca9f7599d33d482a87aab5283
Parents: 2316b22
Author: AKuznetsov 
Authored: Thu Aug 13 10:49:31 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 10:49:31 2015 +0700

--
 .../src/main/js/controllers/common-module.js|  3 +
 .../main/js/controllers/metadata-controller.js  | 72 +---
 .../src/main/js/views/includes/controls.jade|  2 +-
 .../src/main/js/views/templates/layout.jade |  4 +-
 4 files changed, 55 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c64be58/modules/control-center-web/src/main/js/controllers/common-module.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/common-module.js 
b/modules/control-center-web/src/main/js/controllers/common-module.js
index b18240e..e596ea8 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -687,6 +687,9 @@ controlCenterModule.service('$table', [
 
 _tableFocus('GroupName', -1);
 }
+else if (ui == 'table-query-group-fields') {
+_tableFocus('FieldName', -1);
+}
 }
 
 return {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c64be58/modules/control-center-web/src/main/js/controllers/metadata-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/metadata-controller.js 
b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index 99fcc49..a6b0e7a 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -495,23 +495,23 @@ controlCenterModule.controller('metadataController', [
 !$common.isEmptyString(dbFieldValue.javaName) && 
$common.isDefined(dbFieldValue.javaType);
 };
 
-var dbFields = {
+var dbFieldTables = {
 keyFields: {msg: 'Key field', id: 'KeyField'},
 valueFields: {msg: 'Value field', id: 'ValueField'}
 };
 
 $scope.tableDbFieldSave = function (field, index) {
-var dbField = dbFields[field.model];
+var dbFieldTable = dbFieldTables[field.model];
 
-if (dbField) {
+if (dbFieldTable) {
 var dbFieldValue = tableDbFieldValue(field, index);
 
-var backupItem = $scope.backupItem;
+var item = $scope.backupItem;
 
-var model = backupItem[field.model];
+var model = item[field.model];
 
-if (!$common.isValidJavaIdentifier(dbField.msg + ' java 
name', dbFieldValue.javaName))
-return focusInvalidField(index, 'JavaName' + 
dbField.id);
+if (!$common.isValidJavaIdentifier(dbFieldTable.msg + ' 
java name', dbFieldValue.javaName))
+return focusInvalidField(index, 'JavaName' + 
dbFieldTable.id);
 
 if ($common.isDefined(model)) {
 var idx = _.findIndex(model, function (dbMeta) {
@@ -522,7 +522,7 @@ controlCenterModule.controller('metadataController', [
 if (idx >= 0 && index != idx) {
 $common.showError('Field with such database name 
already exists!');
 
-return focusInvalidField(index, 'DatabaseName' + 
dbField.id);
+return focusInvalidField(index, 'DatabaseName' + 
dbFieldTable.id);
 }
 
 idx = _.findIndex(model, function (dbMeta) {
@@ -533,25 +533,33 @@ controlCenterModule.controller('metadataController', [
 if (idx >= 0 && index != idx) {
 $common.showError('Field with such java name 
already exists!');
 
-return focusInvalidField(index, 'JavaName' + 
dbField.id);
+return focusInvalidField(index, 'JavaName' + 
dbFieldTable.id);
 }
 
 if (index < 0) {

[1/6] incubator-ignite git commit: # ignite-1229: stop ping process when node left topology

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1229 ad54cae3c -> 2159d79e2


# ignite-1229: stop ping process when node left topology


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d5986c26
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d5986c26
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d5986c26

Branch: refs/heads/ignite-1229
Commit: d5986c265c9f68c2a98c48d4ba75444fad9e6725
Parents: ae11e9b
Author: sboikov 
Authored: Wed Aug 12 11:42:22 2015 +0300
Committer: sboikov 
Committed: Wed Aug 12 11:42:22 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 1 file changed, 60 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5986c26/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 92c21ed..76144e3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -388,12 +388,15 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 TcpDiscoveryNode node = ring.node(nodeId);
 
-if (node == null || !node.visible())
+if (node == null)
+return false;
+
+if (!nodeAlive(nodeId))
 return false;
 
 boolean res = pingNode(node);
 
-if (!res && !node.isClient()) {
+if (!res && !node.isClient() && nodeAlive(nodeId)) {
 LT.warn(log, null, "Failed to ping node (status check will be 
initiated): " + nodeId);
 
 msgWorker.addMessage(new TcpDiscoveryStatusCheckMessage(locNode, 
node.id()));
@@ -421,14 +424,18 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 node = ring.node(node.clientRouterNodeId());
 
-if (node == null || !node.visible())
+if (node == null || !nodeAlive(node.id()))
 return false;
 }
 
 for (InetSocketAddress addr : spi.getNodeAddresses(node, 
U.sameMacs(locNode, node))) {
 try {
 // ID returned by the node should be the same as ID of the 
parameter for ping to succeed.
-IgniteBiTuple t = pingNode(addr, clientNodeId);
+IgniteBiTuple t = pingNode(addr, node.id(), 
clientNodeId);
+
+if (t == null)
+// Remote node left topology.
+return false;
 
 boolean res = node.id().equals(t.get1()) && (clientNodeId == 
null || t.get2());
 
@@ -453,12 +460,14 @@ class ServerImpl extends TcpDiscoveryImpl {
  * Pings the node by its address to see if it's alive.
  *
  * @param addr Address of the node.
+ * @param nodeId Node ID to ping. In case when client node ID is not null 
this node ID is an ID of the router node.
  * @param clientNodeId Client node ID.
- * @return ID of the remote node and "client exists" flag if node alive.
+ * @return ID of the remote node and "client exists" flag if node alive or 
{@code null} if the remote node has
+ * left a topology during the ping process.
  * @throws IgniteCheckedException If an error occurs.
  */
-private IgniteBiTuple pingNode(InetSocketAddress addr, 
@Nullable UUID clientNodeId)
-throws IgniteCheckedException {
+private @Nullable IgniteBiTuple pingNode(InetSocketAddress 
addr, @Nullable UUID nodeId,
+@Nullable UUID clientNodeId) throws IgniteCheckedException {
 assert addr != null;
 
 UUID locNodeId = getLocalNodeId();
@@ -537,6 +546,16 @@ class ServerImpl extends TcpDiscoveryImpl {
 return t;
 }
 catch (IOException | IgniteCheckedException e) {
+if (nodeId != null && !nodeAlive(nodeId)) {
+if (log.isDebugEnabled())
+log.debug("Failed to ping the node (has left 
or leaving topology): [nodeId=" + nodeId +
+']');
+
+fut.onDone((IgniteBiTuple)null);
+
+return null;
+}
+
 if (errs == null)
 errs = new ArrayList<>();
 
@@ -615,6 +634,28 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 /**
+ * Checks whether a node is alive or not.
+ *
+ * @param nodeId Node ID.
+ * @return {@code True} if node is in 

incubator-ignite git commit: ignite-1239: fixed "partition unreserved exception"

2015-08-13 Thread ntikhonov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1239 [created] be97bdee1


ignite-1239: fixed "partition unreserved exception"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/be97bdee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/be97bdee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/be97bdee

Branch: refs/heads/ignite-1239
Commit: be97bdee110e6e95d7b33755784e0e41d166e4c9
Parents: aed83af
Author: Denis Magda 
Authored: Thu Aug 13 13:20:30 2015 +0300
Committer: nikolay_tikhonov 
Committed: Thu Aug 13 14:09:00 2015 +0300

--
 .../GridDhtUnreservedPartitionException.java| 53 +++
 .../cache/query/GridCacheQueryAdapter.java  | 36 +++-
 .../cache/query/GridCacheQueryManager.java  | 70 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java | 96 
 4 files changed, 230 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be97bdee/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
new file mode 100644
index 000..e64019b
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.dht;
+
+import org.apache.ignite.*;
+
+/**
+ * Exception that is thrown when a partition reservation failed.
+ */
+public class GridDhtUnreservedPartitionException extends 
IgniteCheckedException {
+/** */
+private static final long serialVersionUID = 0L;
+
+/** Partition. */
+private final int part;
+
+/**
+ * @param part Partition.
+ * @param msg Message.
+ */
+public GridDhtUnreservedPartitionException(int part, String msg) {
+super(msg);
+
+this.part = part;
+}
+
+/**
+ * @return Partition.
+ */
+public int partition() {
+return part;
+}
+
+/** {@inheritDoc} */
+@Override public String toString() {
+return getClass() + " [part=" + part + ", msg=" + getMessage() + ']';
+}
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be97bdee/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index 953cb9a..d4d9d00 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -25,6 +25,7 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -554,7 +555,10 @@ public class GridCacheQueryAdapter implements 
CacheQuery {
 private volatile GridCacheQueryFutureAdapter fut;
 
 /** Backups. */
-private final Queue nodes;
+private volatile Queue nodes;
+
+   

[4/6] incubator-ignite git commit: # Test for ignite-1245.

2015-08-13 Thread sboikov
# Test for ignite-1245.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/aed83af5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/aed83af5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/aed83af5

Branch: refs/heads/ignite-1229
Commit: aed83af5f76c47bc9e4d0e8f60955fc6c6b42aac
Parents: 36f7ba6
Author: sboikov 
Authored: Thu Aug 13 13:05:43 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 13:05:43 2015 +0300

--
 .../IgniteCacheContinuousQueryClientTest.java   | 114 +++
 1 file changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aed83af5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
new file mode 100644
index 000..bb413a0
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query.continuous;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.event.*;
+import java.util.concurrent.*;
+
+import static java.util.concurrent.TimeUnit.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheContinuousQueryClientTest extends 
GridCommonAbstractTest {
+/** */
+protected static TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** */
+private boolean client;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration ccfg = new CacheConfiguration();
+
+ccfg.setCacheMode(PARTITIONED);
+ccfg.setAtomicityMode(ATOMIC);
+ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+cfg.setCacheConfiguration(ccfg);
+
+cfg.setClientMode(client);
+
+return cfg;
+}
+
+/**
+ * @throws Exception If failed.
+ */
+public void testNodeJoins() throws Exception {
+startGrids(2);
+
+client = true;
+
+Ignite clientNode = startGrid(3);
+
+client = false;
+
+CacheEventListener lsnr = new CacheEventListener();
+
+ContinuousQuery qry = new ContinuousQuery<>();
+
+qry.setLocalListener(lsnr);
+
+QueryCursor cur = clientNode.cache(null).query(qry);
+
+Ignite joined = startGrid(4);
+
+IgniteCache joinedCache = joined.cache(null);
+
+joinedCache.put(primaryKey(joinedCache), 1);
+
+assertTrue("Failed to wait for event.", lsnr.latch.await(5, SECONDS));
+
+cur.close();
+}
+
+/**
+ *
+ */
+private static class CacheEventListener implements 
CacheEntryUpdatedListener {
+/** */
+private final CountDownLatch latch = new CountDownLatch(1);
+
+/** */
+@LoggerResource
+private IgniteLogger log;
+
+/** {@inheritDoc} */
+@Override public void onUpdated(Iterable> evts) {
+for (CacheEntryEvent evt : evts) {
+log.info("Rec

[4/4] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-13 Thread sboikov
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/51a9bd85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/51a9bd85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/51a9bd85

Branch: refs/heads/ignite-946
Commit: 51a9bd85e5cb7cb38fcc60b7adf808fe0545e7df
Parents: 4f8f32a 36f7ba6
Author: Denis Magda 
Authored: Thu Aug 13 09:12:26 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 09:12:26 2015 +0300

--
 .../processors/cache/GridCacheGateway.java  |  5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 2 files changed, 62 insertions(+), 34 deletions(-)
--




incubator-ignite git commit: IGNITE-843 Added more info on deploymentMode.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 74c1f9b5c -> d220dec0d


IGNITE-843 Added more info on deploymentMode.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d220dec0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d220dec0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d220dec0

Branch: refs/heads/ignite-843
Commit: d220dec0de5707c8e0fbbd6c8c04aae57310b45e
Parents: 74c1f9b
Author: AKuznetsov 
Authored: Thu Aug 13 16:35:39 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 16:35:39 2015 +0700

--
 .../src/main/js/controllers/models/clusters.json| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d220dec0/modules/control-center-web/src/main/js/controllers/models/clusters.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/clusters.json 
b/modules/control-center-web/src/main/js/controllers/models/clusters.json
index 73e56e3..b254f6e 100644
--- a/modules/control-center-web/src/main/js/controllers/models/clusters.json
+++ b/modules/control-center-web/src/main/js/controllers/models/clusters.json
@@ -448,7 +448,14 @@
   "placeholder": "SHARED",
   "items": "deploymentModes",
   "tip": [
-"Task classes and resources sharing mode."
+"Task classes and resources sharing mode.",
+"The following deployment modes are supported:",
+"",
+"  PRIVATE - in this mode deployed classes do not share 
resources.",
+"  ISOLATED - in this mode tasks or classes deployed within 
the same class loader will share the same instances of resources.",
+"  SHARED - same as ISOLATED, but now tasks from different 
master nodes with the same user version and same class loader will share the 
same class loader on remote nodes.",
+"  CONTINUOUS - same as SHARED deployment mode, but resources 
will not be undeployed even after all master nodes left grid.",
+""
   ]
 }
   ]



[2/6] incubator-ignite git commit: Fixed error message

2015-08-13 Thread sboikov
Fixed error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/653c0b28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/653c0b28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/653c0b28

Branch: refs/heads/ignite-1229
Commit: 653c0b28d340a37893741b0d381a63330732fd10
Parents: d5986c2
Author: Valentin Kulichenko 
Authored: Wed Aug 12 16:54:47 2015 -0700
Committer: Valentin Kulichenko 
Committed: Wed Aug 12 16:54:47 2015 -0700

--
 .../ignite/internal/processors/cache/GridCacheGateway.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/653c0b28/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index a3c8da6..93c5858 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -156,8 +156,7 @@ public class GridCacheGateway {
 GridCachePreloader preldr = cache != null ? cache.preloader() : 
null;
 
 if (preldr == null)
-throw new IllegalStateException("Grid is in invalid state to 
perform this operation. " +
-"It either not started yet or has already being or have 
stopped [gridName=" + ctx.gridName() + ']');
+throw new IllegalStateException("Cache has been closed: " + 
ctx.name());
 
 preldr.startFuture().get();
 }
@@ -177,7 +176,7 @@ public class GridCacheGateway {
 try {
 return setOperationContextPerCall(opCtx);
 }
-catch (RuntimeException e) {
+catch (Throwable e) {
 rwLock.readUnlock();
 
 throw e;



[6/6] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-1229' into ignite-1229

2015-08-13 Thread sboikov
Merge remote-tracking branch 'origin/ignite-1229' into ignite-1229


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2159d79e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2159d79e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2159d79e

Branch: refs/heads/ignite-1229
Commit: 2159d79e23659bcab6a3e6d6dac0dd3e8bfefbd9
Parents: 8039a0f ad54cae
Author: Denis Magda 
Authored: Thu Aug 13 14:10:47 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 14:10:47 2015 +0300

--

--




[3/6] incubator-ignite git commit: Fixed error message

2015-08-13 Thread sboikov
Fixed error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/36f7ba66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/36f7ba66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/36f7ba66

Branch: refs/heads/ignite-1229
Commit: 36f7ba669fd5b706fd9b01c06ce20dbb7610d50f
Parents: 653c0b2
Author: Valentin Kulichenko 
Authored: Wed Aug 12 16:56:18 2015 -0700
Committer: Valentin Kulichenko 
Committed: Wed Aug 12 16:56:18 2015 -0700

--
 .../apache/ignite/internal/processors/cache/GridCacheGateway.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36f7ba66/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index 93c5858..58c9035 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -156,7 +156,7 @@ public class GridCacheGateway {
 GridCachePreloader preldr = cache != null ? cache.preloader() : 
null;
 
 if (preldr == null)
-throw new IllegalStateException("Cache has been closed: " + 
ctx.name());
+throw new IllegalStateException("Cache has been closed or 
destroyed: " + ctx.name());
 
 preldr.startFuture().get();
 }



[5/6] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1229

2015-08-13 Thread sboikov
Merge remote-tracking branch 'remotes/origin/master' into ignite-1229


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8039a0f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8039a0f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8039a0f4

Branch: refs/heads/ignite-1229
Commit: 8039a0f4f4a2eac15174f0225f5726105d09e7ee
Parents: a463d1d aed83af
Author: Denis Magda 
Authored: Thu Aug 13 14:10:07 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 14:10:07 2015 +0300

--
 .../processors/cache/GridCacheGateway.java  |   5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|   4 +-
 .../IgniteCacheContinuousQueryClientTest.java   | 114 +++
 3 files changed, 119 insertions(+), 4 deletions(-)
--




incubator-ignite git commit: # ignite-426 add tests

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-426 1e8d8aed4 -> eee8ea416


# ignite-426 add tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/eee8ea41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/eee8ea41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/eee8ea41

Branch: refs/heads/ignite-426
Commit: eee8ea4169047a2788aa7674aa9ff65a063b3897
Parents: 1e8d8ae
Author: sboikov 
Authored: Thu Aug 13 11:57:36 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 15:46:08 2015 +0300

--
 .../distributed/dht/GridDhtLocalPartition.java  |   6 +-
 .../continuous/CacheContinuousQueryHandler.java | 147 +++---
 .../continuous/CacheContinuousQueryManager.java |  36 +-
 ...acheContinuousQueryFailoverAbstractTest.java | 457 +--
 ...ueryFailoverAtomicPrimaryWriteOrderTest.java |  32 ++
 ...inuousQueryFailoverAtomicReplicatedTest.java |  32 ++
 ...ContinuousQueryFailoverTxReplicatedTest.java |  32 ++
 .../IgniteCacheQuerySelfTestSuite.java  |   3 +
 8 files changed, 617 insertions(+), 128 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eee8ea41/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index b7d4375..a0a75c2 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -592,11 +592,7 @@ public class GridDhtLocalPartition implements 
Comparable,
  * @return Next update index.
  */
 public long nextContinuousQueryUpdateIndex() {
-long res = contQryUpdIdx.incrementAndGet();
-
-log.info("Next update index [node=" + cctx.gridName() + ", part=" + id 
+ ", idx=" + res + ']');
-
-return res;
+return contQryUpdIdx.incrementAndGet();
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eee8ea41/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 4bd2e1c..98e857b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -29,6 +29,7 @@ import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.continuous.*;
+import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
@@ -39,6 +40,7 @@ import javax.cache.event.*;
 import javax.cache.event.EventType;
 import java.io.*;
 import java.util.*;
+import java.util.concurrent.*;
 
 import static org.apache.ignite.events.EventType.*;
 
@@ -50,7 +52,7 @@ class CacheContinuousQueryHandler implements 
GridContinuousHandler {
 private static final long serialVersionUID = 0L;
 
 /** */
-private static final int BACKUP_ACK_THRESHOLD = 1;
+private static final int BACKUP_ACK_THRESHOLD = 100;
 
 /** Cache name. */
 private String cacheName;
@@ -95,10 +97,10 @@ class CacheContinuousQueryHandler implements 
GridContinuousHandler {
 private transient Map rcvCntrs;
 
 /** */
-private transient DuplicateEventFilter dupEvtFilter = new 
DuplicateEventFilter();
+private transient IgnitePredicate dupEvtFilter;
 
 /** */
-private transient AcknowledgeData ackData = new AcknowledgeData();
+private transient AcknowledgeBuffer ackBuf;
 
 /**
  * Required by {@link Externalizable}.
@@ -121,6 +123,7 @@ class CacheContinuousQueryHandler implements 
GridContinuousHandler {
  * @param ignoreExpired Ignore expired events flag.
  * @param skipPrimaryCheck Whether to skip primary check

incubator-ignite git commit: IGNITE-843 Fix log messages and long lines.

2015-08-13 Thread sevdokimov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 6d89c5fa2 -> d95cf60eb


IGNITE-843 Fix log messages and long lines.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d95cf60e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d95cf60e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d95cf60e

Branch: refs/heads/ignite-843
Commit: d95cf60eba537bbe5128dfb3dba8678351372ed4
Parents: 6d89c5f
Author: sevdokimov 
Authored: Thu Aug 13 15:38:44 2015 +0300
Committer: sevdokimov 
Committed: Thu Aug 13 15:38:44 2015 +0300

--
 .../org/apache/ignite/agent/AgentConfiguration.java |  7 ---
 .../apache/ignite/agent/AgentLoggingConfigurator.java   |  5 +++--
 .../main/java/org/apache/ignite/agent/AgentSocket.java  | 10 +-
 .../org/apache/ignite/agent/handlers/RestExecutor.java  |  4 
 .../org/apache/ignite/agent/remote/RemoteHandler.java   | 12 +++-
 5 files changed, 19 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d95cf60e/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
index 48b9d2d..ec2674e 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
@@ -36,8 +36,8 @@ public class AgentConfiguration {
 private String pwd;
 
 /** */
-@Parameter(names = {"-s", "--serverUri"},
-description = "Link to web-control-center web-socket server, for 
example: wss://localhost:3001 or wss://control-center.gridgain.com")
+@Parameter(names = {"-s", "--serverUri"}, description = "Link to 
web-control-center web-socket server, " +
+"for example: wss://localhost:3001 or 
wss://control-center.gridgain.com")
 private String srvUri = "wss://localhost:3001";
 
 /** */
@@ -49,7 +49,8 @@ public class AgentConfiguration {
 private String cfgPath;
 
 /** */
-@Parameter(names = {"-drv", "--driver-folder"}, description = "Path to 
folder with JDBC drivers, for example /home/user/drivers")
+@Parameter(names = {"-drv", "--driver-folder"}, description = "Path to 
folder with JDBC drivers, for example " +
+"/home/user/drivers")
 private String driversFolder;
 
 /** */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d95cf60e/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLoggingConfigurator.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLoggingConfigurator.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLoggingConfigurator.java
index 3d63415..d492c45 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLoggingConfigurator.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLoggingConfigurator.java
@@ -61,10 +61,11 @@ public class AgentLoggingConfigurator {
 }
 }
 
-
LogManager.getLogManager().readConfiguration(AgentLauncher.class.getResourceAsStream("/"
 + PROPERTIES_FILE));
+
LogManager.getLogManager().readConfiguration(AgentLauncher.class.getResourceAsStream("/"
++ PROPERTIES_FILE));
 }
 catch (IOException e) {
-System.err.println("Failed to load logging configuration");
+System.err.println("Failed to load logging configuration.");
 
 e.printStackTrace();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d95cf60e/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
index bab149f..810bf9b 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentSocket.java
@@ -71,7 +71,7 @@ public class AgentSocket implements WebSocketSender {
  */
 @OnWebSocketClose
 public void onClose(int statusCode, String reason) {
-log.log(Level.INFO, String.format("Connection closed: %d - %s", 
statusCo

incubator-ignite git commit: # minor

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1245 10e4f9fe0 -> b882354e8


# minor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b882354e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b882354e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b882354e

Branch: refs/heads/ignite-1245
Commit: b882354e87d16b68cdc76780e1b19fda260b630a
Parents: 10e4f9f
Author: sboikov 
Authored: Thu Aug 13 16:11:54 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 16:11:54 2015 +0300

--
 scripts/git-format-patch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b882354e/scripts/git-format-patch.sh
--
diff --git a/scripts/git-format-patch.sh b/scripts/git-format-patch.sh
index b11c73d..83aee3e 100755
--- a/scripts/git-format-patch.sh
+++ b/scripts/git-format-patch.sh
@@ -20,7 +20,7 @@
 # Git patch-file maker.
 #
 echo 'Usage: scripts/git-format-patch.sh [-ih|--ignitehome ] 
[-idb|--ignitedefbranch ] [-ph|--patchhome ]'
-echo 'It is a script to create patch between Current branch (branch with 
changes) and Default branche. The script is safe and do not broke or lose your 
changes.'
+echo 'It is a script to create patch between Current branch (branch with 
changes) and Default branch. The script is safe and does not break or lose your 
changes.'
 echo "It should be called from IGNITE_HOME directory."
 echo "Patch will be created at PATCHES_HOME (= IGNITE_HOME, by default) 
between Default branch (IGNITE_DEFAULT_BRANCH) and Current branch."
 echo "Note: you can use ${IGNITE_HOME}/scripts/git-patch-prop-local.sh to set 
your own local properties (to rewrite settings at git-patch-prop-local.sh). "



incubator-ignite git commit: # ignite-426 add tests

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-426 eee8ea416 -> daa90987f


# ignite-426 add tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/daa90987
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/daa90987
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/daa90987

Branch: refs/heads/ignite-426
Commit: daa90987f08a91847af895a275e594dca167fb5a
Parents: eee8ea4
Author: sboikov 
Authored: Thu Aug 13 15:55:24 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 15:55:24 2015 +0300

--
 .../cache/query/continuous/CacheContinuousQueryBatchAck.java   | 3 +++
 .../cache/query/continuous/CacheContinuousQueryHandler.java| 3 +++
 .../continuous/CacheContinuousQueryFailoverAbstractTest.java   | 6 +++---
 3 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/daa90987/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
index 49c1a3f..bfd1844 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
@@ -30,6 +30,9 @@ import java.util.*;
  * Batch acknowledgement.
  */
 public class CacheContinuousQueryBatchAck extends GridCacheMessage {
+/** */
+private static final long serialVersionUID = 0L;
+
 /** Routine ID. */
 private UUID routineId;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/daa90987/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 98e857b..2f6fcaf 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -732,6 +732,9 @@ class CacheContinuousQueryHandler implements 
GridContinuousHandler {
  *
  */
 private class DuplicateEventFilter implements 
IgnitePredicate {
+/** */
+private static final long serialVersionUID = 0L;
+
 /** {@inheritDoc} */
 @Override public boolean apply(CacheContinuousQueryEntry e) {
 return notifyListener(e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/daa90987/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractTest.java
index 3afb01c..e3ad025 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractTest.java
@@ -180,7 +180,7 @@ public abstract class 
CacheContinuousQueryFailoverAbstractTest extends GridCommo
 
 QueryCursor cur = qryClientCache.query(qry);
 
-int PARTS = 1;
+int PARTS = 10;
 
 for (int i = 0; i < SRV_NODES - 1; i++) {
 log.info("Stop iteration: " + i);
@@ -261,7 +261,7 @@ public abstract class 
CacheContinuousQueryFailoverAbstractTest extends GridCommo
 
 int[] nodeParts = aff.primaryPartitions(node);
 
-final int KEYS_PER_PART = 2;
+final int KEYS_PER_PART = 3;
 
 for (int i = 0; i < parts; i++) {
 int part = nodeParts[i];
@@ -395,7 +395,7 @@ public abstract class 
CacheContinuousQueryFailoverAbstractTest extends GridCommo
 @Override public boolean apply() {
 

incubator-ignite git commit: IGNITE-843 Use abbreviation.

2015-08-13 Thread sevdokimov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 d95cf60eb -> 4055e42e0


IGNITE-843 Use abbreviation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4055e42e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4055e42e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4055e42e

Branch: refs/heads/ignite-843
Commit: 4055e42e0c01dd3cd60479d37719d19efe677a50
Parents: d95cf60
Author: sevdokimov 
Authored: Thu Aug 13 16:28:11 2015 +0300
Committer: sevdokimov 
Committed: Thu Aug 13 16:28:11 2015 +0300

--
 .../java/org/apache/ignite/agent/remote/RemoteHandler.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4055e42e/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java
index d63aa7d..2ef9292 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/remote/RemoteHandler.java
@@ -44,7 +44,7 @@ public class RemoteHandler implements AutoCloseable {
 private final WebSocketSender snd;
 
 /** */
-private final Map methods = new HashMap<>();
+private final Map mtds = new HashMap<>();
 
 /** */
 private final ExecutorService executorSrvc = 
Executors.newFixedThreadPool(Runtime.getRuntime()
@@ -62,7 +62,7 @@ public class RemoteHandler implements AutoCloseable {
 Remote remoteAnn = method.getAnnotation(Remote.class);
 
 if (remoteAnn != null) {
-MethodDescriptor old = methods.put(method.getName(), new 
MethodDescriptor(method, hnd,
+MethodDescriptor old = mtds.put(method.getName(), new 
MethodDescriptor(method, hnd,
 remoteAnn.async()));
 
 if (old != null)
@@ -85,7 +85,7 @@ public class RemoteHandler implements AutoCloseable {
 
 String mtdName = req.getAsJsonPrimitive("mtdName").getAsString();
 
-final MethodDescriptor desc = methods.get(mtdName);
+final MethodDescriptor desc = mtds.get(mtdName);
 
 if (desc == null) {
 sendException(reqId, INTERNAL_EXCEPTION_TYPE, "Unknown method: " + 
mtdName);



[1/2] incubator-ignite git commit: # Test for ignite-1245.

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1245 a246057c3 -> 10e4f9fe0


# Test for ignite-1245.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/aed83af5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/aed83af5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/aed83af5

Branch: refs/heads/ignite-1245
Commit: aed83af5f76c47bc9e4d0e8f60955fc6c6b42aac
Parents: 36f7ba6
Author: sboikov 
Authored: Thu Aug 13 13:05:43 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 13:05:43 2015 +0300

--
 .../IgniteCacheContinuousQueryClientTest.java   | 114 +++
 1 file changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aed83af5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
new file mode 100644
index 000..bb413a0
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query.continuous;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.event.*;
+import java.util.concurrent.*;
+
+import static java.util.concurrent.TimeUnit.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheContinuousQueryClientTest extends 
GridCommonAbstractTest {
+/** */
+protected static TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** */
+private boolean client;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration ccfg = new CacheConfiguration();
+
+ccfg.setCacheMode(PARTITIONED);
+ccfg.setAtomicityMode(ATOMIC);
+ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+cfg.setCacheConfiguration(ccfg);
+
+cfg.setClientMode(client);
+
+return cfg;
+}
+
+/**
+ * @throws Exception If failed.
+ */
+public void testNodeJoins() throws Exception {
+startGrids(2);
+
+client = true;
+
+Ignite clientNode = startGrid(3);
+
+client = false;
+
+CacheEventListener lsnr = new CacheEventListener();
+
+ContinuousQuery qry = new ContinuousQuery<>();
+
+qry.setLocalListener(lsnr);
+
+QueryCursor cur = clientNode.cache(null).query(qry);
+
+Ignite joined = startGrid(4);
+
+IgniteCache joinedCache = joined.cache(null);
+
+joinedCache.put(primaryKey(joinedCache), 1);
+
+assertTrue("Failed to wait for event.", lsnr.latch.await(5, SECONDS));
+
+cur.close();
+}
+
+/**
+ *
+ */
+private static class CacheEventListener implements 
CacheEntryUpdatedListener {
+/** */
+private final CountDownLatch latch = new CountDownLatch(1);
+
+/** */
+@LoggerResource
+private IgniteLogger log;
+
+/** {@inheritDoc} */
+@Override public void onUpdated

[2/2] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1245

2015-08-13 Thread sboikov
Merge remote-tracking branch 'remotes/origin/master' into ignite-1245


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/10e4f9fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/10e4f9fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/10e4f9fe

Branch: refs/heads/ignite-1245
Commit: 10e4f9fe07c6ea876bc8c296ae4177a854c6a491
Parents: a246057 aed83af
Author: sboikov 
Authored: Thu Aug 13 16:10:02 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 16:10:02 2015 +0300

--

--




incubator-ignite git commit: # Register client continuous listeners on node join

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master aed83af5f -> 35e3e4e04


 # Register client continuous listeners on node join


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/35e3e4e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/35e3e4e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/35e3e4e0

Branch: refs/heads/master
Commit: 35e3e4e048fa34b5b23ebd0ae235424f3e3492d9
Parents: aed83af
Author: sboikov 
Authored: Thu Aug 13 17:37:00 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 17:37:00 2015 +0300

--
 .../continuous/GridContinuousProcessor.java | 44 
 .../IgniteCacheContinuousQueryClientTest.java   | 33 ---
 .../IgniteCacheQuerySelfTestSuite.java  |  1 +
 scripts/git-format-patch.sh |  2 +-
 4 files changed, 66 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/35e3e4e0/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index daa9494..5f1c4bb 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -193,10 +193,10 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 unregisterRemote(routineId);
 
 if (snd.isClient()) {
-Map infoMap = 
clientInfos.get(snd.id());
+Map clientRoutineMap = 
clientInfos.get(snd.id());
 
-if (infoMap != null)
-infoMap.remove(msg.routineId());
+if (clientRoutineMap != null)
+clientRoutineMap.remove(msg.routineId());
 }
 }
 }
@@ -370,6 +370,34 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 
 for (Map.Entry> entry : 
data.clientInfos.entrySet()) {
+UUID clientNodeId = entry.getKey();
+
+Map clientRoutineMap = 
entry.getValue();
+
+for (Map.Entry e : 
clientRoutineMap.entrySet()) {
+UUID routineId = e.getKey();
+LocalRoutineInfo info = e.getValue();
+
+try {
+if (info.prjPred != null)
+ctx.resource().injectGeneric(info.prjPred);
+
+if (info.prjPred == null || 
info.prjPred.apply(ctx.discovery().localNode())) {
+if (registerHandler(clientNodeId,
+routineId,
+info.hnd,
+info.bufSize,
+info.interval,
+info.autoUnsubscribe,
+false))
+info.hnd.onListenerRegistered(routineId, ctx);
+}
+}
+catch (IgniteCheckedException err) {
+U.error(log, "Failed to register continuous handler.", 
err);
+}
+}
+
 Map map = 
clientInfos.get(entry.getKey());
 
 if (map == null) {
@@ -723,17 +751,17 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 
 if (node.isClient()) {
-Map clientRouteMap = 
clientInfos.get(node.id());
+Map clientRoutineMap = 
clientInfos.get(node.id());
 
-if (clientRouteMap == null) {
-clientRouteMap = new HashMap<>();
+if (clientRoutineMap == null) {
+clientRoutineMap = new HashMap<>();
 
-Map old = clientInfos.put(node.id(), 
clientRouteMap);
+Map old = clientInfos.put(node.id(), 
clientRoutineMap);
 
 assert old == null;
 }
 
-clientRouteMap.put(routineId, new 
LocalRoutineInfo(data.projectionPredicate(),
+clientRoutineMap.put(routineId, new 
LocalRoutineInfo(data.projectionPredicate(),
 hnd,
 data.bufferSize(),
 data.interval(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/b

incubator-ignite git commit: # minor

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1245 b882354e8 -> 7c51d9460


# minor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7c51d946
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7c51d946
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7c51d946

Branch: refs/heads/ignite-1245
Commit: 7c51d9460a48e4e95c53de1f71b39f66c5e1
Parents: b882354
Author: sboikov 
Authored: Thu Aug 13 17:34:15 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 17:35:16 2015 +0300

--
 .../continuous/GridContinuousProcessor.java | 20 ++--
 .../IgniteCacheContinuousQueryClientTest.java   |  5 -
 2 files changed, 14 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c51d946/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index 8c8e259..5f1c4bb 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -193,10 +193,10 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 unregisterRemote(routineId);
 
 if (snd.isClient()) {
-Map clientRouteMap = 
clientInfos.get(snd.id());
+Map clientRoutineMap = 
clientInfos.get(snd.id());
 
-if (clientRouteMap != null)
-clientRouteMap.remove(msg.routineId());
+if (clientRoutineMap != null)
+clientRoutineMap.remove(msg.routineId());
 }
 }
 }
@@ -372,9 +372,9 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 for (Map.Entry> entry : 
data.clientInfos.entrySet()) {
 UUID clientNodeId = entry.getKey();
 
-Map clientRouteMap = entry.getValue();
+Map clientRoutineMap = 
entry.getValue();
 
-for (Map.Entry e : 
clientRouteMap.entrySet()) {
+for (Map.Entry e : 
clientRoutineMap.entrySet()) {
 UUID routineId = e.getKey();
 LocalRoutineInfo info = e.getValue();
 
@@ -751,17 +751,17 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 
 if (node.isClient()) {
-Map clientRouteMap = 
clientInfos.get(node.id());
+Map clientRoutineMap = 
clientInfos.get(node.id());
 
-if (clientRouteMap == null) {
-clientRouteMap = new HashMap<>();
+if (clientRoutineMap == null) {
+clientRoutineMap = new HashMap<>();
 
-Map old = clientInfos.put(node.id(), 
clientRouteMap);
+Map old = clientInfos.put(node.id(), 
clientRoutineMap);
 
 assert old == null;
 }
 
-clientRouteMap.put(routineId, new 
LocalRoutineInfo(data.projectionPredicate(),
+clientRoutineMap.put(routineId, new 
LocalRoutineInfo(data.projectionPredicate(),
 hnd,
 data.bufferSize(),
 data.interval(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c51d946/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
index 7341dea..d66d1d0 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
@@ -22,6 +22,7 @@ import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.discovery.tcp.*;
 import

Git Push Summary

2015-08-13 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1245 [deleted] 7c51d9460


incubator-ignite git commit: IGNITE-843 Fix javadoc.

2015-08-13 Thread sevdokimov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 b7fc32b4e -> 7743f0cab


IGNITE-843 Fix javadoc.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7743f0ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7743f0ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7743f0ca

Branch: refs/heads/ignite-843
Commit: 7743f0cab34f8dde68081e4f40ba511870e5d622
Parents: b7fc32b
Author: sevdokimov 
Authored: Thu Aug 13 18:49:19 2015 +0300
Committer: sevdokimov 
Committed: Thu Aug 13 18:49:39 2015 +0300

--
 modules/control-center-web/src/main/js/agents/agent-manager.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7743f0ca/modules/control-center-web/src/main/js/agents/agent-manager.js
--
diff --git a/modules/control-center-web/src/main/js/agents/agent-manager.js 
b/modules/control-center-web/src/main/js/agents/agent-manager.js
index 777dac2..43d8f9f 100644
--- a/modules/control-center-web/src/main/js/agents/agent-manager.js
+++ b/modules/control-center-web/src/main/js/agents/agent-manager.js
@@ -168,7 +168,7 @@ Client.prototype.authResult = function(error) {
  * @param {String} jdbcUrl
  * @param {Object} jdbcInfo
  * @param {Boolean} tablesOnly
- * @param {Function} cb Callback. Take 3 arguments: {String} error, {Object} 
exception, {Object} result.
+ * @param {Function} cb Callback. Take two arguments: {Object} exception, 
{Object} result.
  * @return {Array} List of tables (see org.apache.ignite.schema.parser.DbTable 
java class)
  */
 Client.prototype.extractMetadata = function(jdbcDriverJarPath, 
jdbcDriverClass, jdbcUrl, jdbcInfo, tablesOnly, cb) {
@@ -176,7 +176,7 @@ Client.prototype.extractMetadata = 
function(jdbcDriverJarPath, jdbcDriverClass,
 };
 
 /**
- * @param {Function} cb Callback.
+ * @param {Function} cb Callback. Take two arguments: {Object} exception, 
{Object} result.
  * @return {Array} List of jars from driver folder.
  */
 Client.prototype.availableDrivers = function(cb) {



[1/2] incubator-ignite git commit: When NIO server port is set to -1, we do not need to check address for null.

2015-08-13 Thread vozerov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 35e3e4e04 -> 6697b0c98


When NIO server port is set to -1, we do not need to check address for null.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7290d065
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7290d065
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7290d065

Branch: refs/heads/master
Commit: 7290d0658aa10675095f1a0379f5c21b9bb09bc4
Parents: aed83af
Author: vozerov-gridgain 
Authored: Thu Aug 13 18:09:54 2015 +0300
Committer: vozerov-gridgain 
Committed: Thu Aug 13 18:09:54 2015 +0300

--
 .../java/org/apache/ignite/internal/util/nio/GridNioServer.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7290d065/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index c180837..2d60f98 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -209,7 +209,9 @@ public class GridNioServer {
 IgniteBiInClosure msgQueueLsnr,
 GridNioFilter... filters
 ) throws IgniteCheckedException {
-A.notNull(addr, "addr");
+if (port != -1)
+A.notNull(addr, "addr");
+
 A.notNull(lsnr, "lsnr");
 A.notNull(log, "log");
 A.notNull(order, "order");



[2/2] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

2015-08-13 Thread vozerov
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6697b0c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6697b0c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6697b0c9

Branch: refs/heads/master
Commit: 6697b0c98c098a96ce572048b0c82cbfdfd41dca
Parents: 7290d06 35e3e4e
Author: vozerov-gridgain 
Authored: Thu Aug 13 18:10:25 2015 +0300
Committer: vozerov-gridgain 
Committed: Thu Aug 13 18:10:25 2015 +0300

--
 .../continuous/GridContinuousProcessor.java | 44 
 .../IgniteCacheContinuousQueryClientTest.java   | 33 ---
 .../IgniteCacheQuerySelfTestSuite.java  |  1 +
 scripts/git-format-patch.sh |  2 +-
 4 files changed, 66 insertions(+), 14 deletions(-)
--




[8/8] incubator-ignite git commit: Merge branches 'ignite-843' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-843

2015-08-13 Thread akuznetsov
Merge branches 'ignite-843' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-843


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b7fc32b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b7fc32b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b7fc32b4

Branch: refs/heads/ignite-843
Commit: b7fc32b4ec3e1e56001e7369b30c644f9584d269
Parents: 4055e42 6697b0c
Author: AKuznetsov 
Authored: Thu Aug 13 22:13:21 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 22:13:21 2015 +0700

--
 .../processors/cache/GridCacheGateway.java  |   5 +-
 .../continuous/GridContinuousProcessor.java |  44 --
 .../ignite/internal/util/nio/GridNioServer.java |   4 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  91 +++-
 .../IgniteCacheContinuousQueryClientTest.java   | 137 +++
 .../IgniteCacheQuerySelfTestSuite.java  |   1 +
 scripts/git-format-patch.sh |   2 +-
 7 files changed, 240 insertions(+), 44 deletions(-)
--




[6/8] incubator-ignite git commit: When NIO server port is set to -1, we do not need to check address for null.

2015-08-13 Thread akuznetsov
When NIO server port is set to -1, we do not need to check address for null.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7290d065
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7290d065
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7290d065

Branch: refs/heads/ignite-843
Commit: 7290d0658aa10675095f1a0379f5c21b9bb09bc4
Parents: aed83af
Author: vozerov-gridgain 
Authored: Thu Aug 13 18:09:54 2015 +0300
Committer: vozerov-gridgain 
Committed: Thu Aug 13 18:09:54 2015 +0300

--
 .../java/org/apache/ignite/internal/util/nio/GridNioServer.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7290d065/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index c180837..2d60f98 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -209,7 +209,9 @@ public class GridNioServer {
 IgniteBiInClosure msgQueueLsnr,
 GridNioFilter... filters
 ) throws IgniteCheckedException {
-A.notNull(addr, "addr");
+if (port != -1)
+A.notNull(addr, "addr");
+
 A.notNull(lsnr, "lsnr");
 A.notNull(log, "log");
 A.notNull(order, "order");



[4/8] incubator-ignite git commit: # Test for ignite-1245.

2015-08-13 Thread akuznetsov
# Test for ignite-1245.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/aed83af5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/aed83af5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/aed83af5

Branch: refs/heads/ignite-843
Commit: aed83af5f76c47bc9e4d0e8f60955fc6c6b42aac
Parents: 36f7ba6
Author: sboikov 
Authored: Thu Aug 13 13:05:43 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 13:05:43 2015 +0300

--
 .../IgniteCacheContinuousQueryClientTest.java   | 114 +++
 1 file changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aed83af5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
new file mode 100644
index 000..bb413a0
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryClientTest.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query.continuous;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.event.*;
+import java.util.concurrent.*;
+
+import static java.util.concurrent.TimeUnit.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheContinuousQueryClientTest extends 
GridCommonAbstractTest {
+/** */
+protected static TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** */
+private boolean client;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration ccfg = new CacheConfiguration();
+
+ccfg.setCacheMode(PARTITIONED);
+ccfg.setAtomicityMode(ATOMIC);
+ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+cfg.setCacheConfiguration(ccfg);
+
+cfg.setClientMode(client);
+
+return cfg;
+}
+
+/**
+ * @throws Exception If failed.
+ */
+public void testNodeJoins() throws Exception {
+startGrids(2);
+
+client = true;
+
+Ignite clientNode = startGrid(3);
+
+client = false;
+
+CacheEventListener lsnr = new CacheEventListener();
+
+ContinuousQuery qry = new ContinuousQuery<>();
+
+qry.setLocalListener(lsnr);
+
+QueryCursor cur = clientNode.cache(null).query(qry);
+
+Ignite joined = startGrid(4);
+
+IgniteCache joinedCache = joined.cache(null);
+
+joinedCache.put(primaryKey(joinedCache), 1);
+
+assertTrue("Failed to wait for event.", lsnr.latch.await(5, SECONDS));
+
+cur.close();
+}
+
+/**
+ *
+ */
+private static class CacheEventListener implements 
CacheEntryUpdatedListener {
+/** */
+private final CountDownLatch latch = new CountDownLatch(1);
+
+/** */
+@LoggerResource
+private IgniteLogger log;
+
+/** {@inheritDoc} */
+@Override public void onUpdated(Iterable> evts) {
+for (CacheEntryEvent evt : evts) {
+log.info("Rece

incubator-ignite git commit: IGNITE-843 Refactored nodemailed user and pass to variables.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 2e8a3d1a3 -> 0a8b4720e


IGNITE-843 Refactored nodemailed user and pass to variables.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0a8b4720
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0a8b4720
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0a8b4720

Branch: refs/heads/ignite-843
Commit: 0a8b4720e55d6d5897f7f9b11c148e18dce24679
Parents: 2e8a3d1
Author: AKuznetsov 
Authored: Fri Aug 14 00:06:58 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 00:06:58 2015 +0700

--
 .../src/main/js/routes/public.js   | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a8b4720/modules/control-center-web/src/main/js/routes/public.js
--
diff --git a/modules/control-center-web/src/main/js/routes/public.js 
b/modules/control-center-web/src/main/js/routes/public.js
index f3dfb26..96f30a9 100644
--- a/modules/control-center-web/src/main/js/routes/public.js
+++ b/modules/control-center-web/src/main/js/routes/public.js
@@ -109,6 +109,9 @@ router.get('/logout', function (req, res) {
 res.redirect('/');
 });
 
+var _mailUser = '!!! YOUR USERNAME !!!';
+var _mailPass = '!!! YOUR PASSWORD !!!';
+
 /**
  * Request for password reset and send e-mail to user with reset token. */
 router.post('/request_password_reset', function(req, res) {
@@ -130,13 +133,13 @@ router.post('/request_password_reset', function(req, res) 
{
 var transporter  = nodemailer.createTransport({
 service: 'gmail',
 auth: {
-user: '!!! YOUR USERNAME !!!',
-pass: '!!! YOUR PASSWORD !!!'
+user: _mailUser,
+pass: _mailPass
 }
 });
 
 var mailOptions = {
-from: '!!! YOUR USERNAME !!!',
+from: _mailUser,
 to: user.email,
 subject: 'Password Reset',
 text: 'You are receiving this because you (or someone else) 
have requested the reset of the password for your account.\n\n' +
@@ -149,7 +152,7 @@ router.post('/request_password_reset', function(req, res) {
 
 transporter.sendMail(mailOptions, function(err){
 if (err)
-return res.status(401).send('Failed to send e-mail with 
reset link!');
+return res.status(401).send('Failed to send e-mail with 
reset link!' + err);
 
 return res.status(403).send('An e-mail has been sent with 
further instructions.');
 });
@@ -201,13 +204,13 @@ router.post('/reset_password', function(req, res) {
 var transporter  = nodemailer.createTransport({
 service: 'gmail',
 auth: {
-user: '!!! YOUR USERNAME !!!',
-pass: '!!! YOUR PASSWORD !!!'
+user: _mailUser,
+pass: _mailPass
 }
 });
 
 var mailOptions = {
-from: '!!! YOUR USERNAME !!!',
+from: _mailUser,
 to: user.email,
 subject: 'Your password has been changed',
 text: 'Hello,\n\n' +



[7/8] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'

2015-08-13 Thread akuznetsov
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6697b0c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6697b0c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6697b0c9

Branch: refs/heads/ignite-843
Commit: 6697b0c98c098a96ce572048b0c82cbfdfd41dca
Parents: 7290d06 35e3e4e
Author: vozerov-gridgain 
Authored: Thu Aug 13 18:10:25 2015 +0300
Committer: vozerov-gridgain 
Committed: Thu Aug 13 18:10:25 2015 +0300

--
 .../continuous/GridContinuousProcessor.java | 44 
 .../IgniteCacheContinuousQueryClientTest.java   | 33 ---
 .../IgniteCacheQuerySelfTestSuite.java  |  1 +
 scripts/git-format-patch.sh |  2 +-
 4 files changed, 66 insertions(+), 14 deletions(-)
--




[3/8] incubator-ignite git commit: Fixed error message

2015-08-13 Thread akuznetsov
Fixed error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/36f7ba66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/36f7ba66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/36f7ba66

Branch: refs/heads/ignite-843
Commit: 36f7ba669fd5b706fd9b01c06ce20dbb7610d50f
Parents: 653c0b2
Author: Valentin Kulichenko 
Authored: Wed Aug 12 16:56:18 2015 -0700
Committer: Valentin Kulichenko 
Committed: Wed Aug 12 16:56:18 2015 -0700

--
 .../apache/ignite/internal/processors/cache/GridCacheGateway.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36f7ba66/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index 93c5858..58c9035 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -156,7 +156,7 @@ public class GridCacheGateway {
 GridCachePreloader preldr = cache != null ? cache.preloader() : 
null;
 
 if (preldr == null)
-throw new IllegalStateException("Cache has been closed: " + 
ctx.name());
+throw new IllegalStateException("Cache has been closed or 
destroyed: " + ctx.name());
 
 preldr.startFuture().get();
 }



[1/8] incubator-ignite git commit: # ignite-1229: stop ping process when node left topology

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 4055e42e0 -> b7fc32b4e


# ignite-1229: stop ping process when node left topology


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d5986c26
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d5986c26
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d5986c26

Branch: refs/heads/ignite-843
Commit: d5986c265c9f68c2a98c48d4ba75444fad9e6725
Parents: ae11e9b
Author: sboikov 
Authored: Wed Aug 12 11:42:22 2015 +0300
Committer: sboikov 
Committed: Wed Aug 12 11:42:22 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 1 file changed, 60 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5986c26/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 92c21ed..76144e3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -388,12 +388,15 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 TcpDiscoveryNode node = ring.node(nodeId);
 
-if (node == null || !node.visible())
+if (node == null)
+return false;
+
+if (!nodeAlive(nodeId))
 return false;
 
 boolean res = pingNode(node);
 
-if (!res && !node.isClient()) {
+if (!res && !node.isClient() && nodeAlive(nodeId)) {
 LT.warn(log, null, "Failed to ping node (status check will be 
initiated): " + nodeId);
 
 msgWorker.addMessage(new TcpDiscoveryStatusCheckMessage(locNode, 
node.id()));
@@ -421,14 +424,18 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 node = ring.node(node.clientRouterNodeId());
 
-if (node == null || !node.visible())
+if (node == null || !nodeAlive(node.id()))
 return false;
 }
 
 for (InetSocketAddress addr : spi.getNodeAddresses(node, 
U.sameMacs(locNode, node))) {
 try {
 // ID returned by the node should be the same as ID of the 
parameter for ping to succeed.
-IgniteBiTuple t = pingNode(addr, clientNodeId);
+IgniteBiTuple t = pingNode(addr, node.id(), 
clientNodeId);
+
+if (t == null)
+// Remote node left topology.
+return false;
 
 boolean res = node.id().equals(t.get1()) && (clientNodeId == 
null || t.get2());
 
@@ -453,12 +460,14 @@ class ServerImpl extends TcpDiscoveryImpl {
  * Pings the node by its address to see if it's alive.
  *
  * @param addr Address of the node.
+ * @param nodeId Node ID to ping. In case when client node ID is not null 
this node ID is an ID of the router node.
  * @param clientNodeId Client node ID.
- * @return ID of the remote node and "client exists" flag if node alive.
+ * @return ID of the remote node and "client exists" flag if node alive or 
{@code null} if the remote node has
+ * left a topology during the ping process.
  * @throws IgniteCheckedException If an error occurs.
  */
-private IgniteBiTuple pingNode(InetSocketAddress addr, 
@Nullable UUID clientNodeId)
-throws IgniteCheckedException {
+private @Nullable IgniteBiTuple pingNode(InetSocketAddress 
addr, @Nullable UUID nodeId,
+@Nullable UUID clientNodeId) throws IgniteCheckedException {
 assert addr != null;
 
 UUID locNodeId = getLocalNodeId();
@@ -537,6 +546,16 @@ class ServerImpl extends TcpDiscoveryImpl {
 return t;
 }
 catch (IOException | IgniteCheckedException e) {
+if (nodeId != null && !nodeAlive(nodeId)) {
+if (log.isDebugEnabled())
+log.debug("Failed to ping the node (has left 
or leaving topology): [nodeId=" + nodeId +
+']');
+
+fut.onDone((IgniteBiTuple)null);
+
+return null;
+}
+
 if (errs == null)
 errs = new ArrayList<>();
 
@@ -615,6 +634,28 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 /**
+ * Checks whether a node is alive or not.
+ *
+ * @param nodeId Node ID.
+ * @return {@code True} if node is in th

[2/8] incubator-ignite git commit: Fixed error message

2015-08-13 Thread akuznetsov
Fixed error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/653c0b28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/653c0b28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/653c0b28

Branch: refs/heads/ignite-843
Commit: 653c0b28d340a37893741b0d381a63330732fd10
Parents: d5986c2
Author: Valentin Kulichenko 
Authored: Wed Aug 12 16:54:47 2015 -0700
Committer: Valentin Kulichenko 
Committed: Wed Aug 12 16:54:47 2015 -0700

--
 .../ignite/internal/processors/cache/GridCacheGateway.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/653c0b28/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index a3c8da6..93c5858 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -156,8 +156,7 @@ public class GridCacheGateway {
 GridCachePreloader preldr = cache != null ? cache.preloader() : 
null;
 
 if (preldr == null)
-throw new IllegalStateException("Grid is in invalid state to 
perform this operation. " +
-"It either not started yet or has already being or have 
stopped [gridName=" + ctx.gridName() + ']');
+throw new IllegalStateException("Cache has been closed: " + 
ctx.name());
 
 preldr.startFuture().get();
 }
@@ -177,7 +176,7 @@ public class GridCacheGateway {
 try {
 return setOperationContextPerCall(opCtx);
 }
-catch (RuntimeException e) {
+catch (Throwable e) {
 rwLock.readUnlock();
 
 throw e;



[5/8] incubator-ignite git commit: # Register client continuous listeners on node join

2015-08-13 Thread akuznetsov
 # Register client continuous listeners on node join


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/35e3e4e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/35e3e4e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/35e3e4e0

Branch: refs/heads/ignite-843
Commit: 35e3e4e048fa34b5b23ebd0ae235424f3e3492d9
Parents: aed83af
Author: sboikov 
Authored: Thu Aug 13 17:37:00 2015 +0300
Committer: sboikov 
Committed: Thu Aug 13 17:37:00 2015 +0300

--
 .../continuous/GridContinuousProcessor.java | 44 
 .../IgniteCacheContinuousQueryClientTest.java   | 33 ---
 .../IgniteCacheQuerySelfTestSuite.java  |  1 +
 scripts/git-format-patch.sh |  2 +-
 4 files changed, 66 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/35e3e4e0/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index daa9494..5f1c4bb 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -193,10 +193,10 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 unregisterRemote(routineId);
 
 if (snd.isClient()) {
-Map infoMap = 
clientInfos.get(snd.id());
+Map clientRoutineMap = 
clientInfos.get(snd.id());
 
-if (infoMap != null)
-infoMap.remove(msg.routineId());
+if (clientRoutineMap != null)
+clientRoutineMap.remove(msg.routineId());
 }
 }
 }
@@ -370,6 +370,34 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 
 for (Map.Entry> entry : 
data.clientInfos.entrySet()) {
+UUID clientNodeId = entry.getKey();
+
+Map clientRoutineMap = 
entry.getValue();
+
+for (Map.Entry e : 
clientRoutineMap.entrySet()) {
+UUID routineId = e.getKey();
+LocalRoutineInfo info = e.getValue();
+
+try {
+if (info.prjPred != null)
+ctx.resource().injectGeneric(info.prjPred);
+
+if (info.prjPred == null || 
info.prjPred.apply(ctx.discovery().localNode())) {
+if (registerHandler(clientNodeId,
+routineId,
+info.hnd,
+info.bufSize,
+info.interval,
+info.autoUnsubscribe,
+false))
+info.hnd.onListenerRegistered(routineId, ctx);
+}
+}
+catch (IgniteCheckedException err) {
+U.error(log, "Failed to register continuous handler.", 
err);
+}
+}
+
 Map map = 
clientInfos.get(entry.getKey());
 
 if (map == null) {
@@ -723,17 +751,17 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 
 if (node.isClient()) {
-Map clientRouteMap = 
clientInfos.get(node.id());
+Map clientRoutineMap = 
clientInfos.get(node.id());
 
-if (clientRouteMap == null) {
-clientRouteMap = new HashMap<>();
+if (clientRoutineMap == null) {
+clientRoutineMap = new HashMap<>();
 
-Map old = clientInfos.put(node.id(), 
clientRouteMap);
+Map old = clientInfos.put(node.id(), 
clientRoutineMap);
 
 assert old == null;
 }
 
-clientRouteMap.put(routineId, new 
LocalRoutineInfo(data.projectionPredicate(),
+clientRoutineMap.put(routineId, new 
LocalRoutineInfo(data.projectionPredicate(),
 hnd,
 data.bufferSize(),
 data.interval(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/35e3e4e0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/quer

[2/2] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-843' into ignite-843

2015-08-13 Thread akuznetsov
Merge remote-tracking branch 'origin/ignite-843' into ignite-843


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2e8a3d1a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2e8a3d1a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2e8a3d1a

Branch: refs/heads/ignite-843
Commit: 2e8a3d1a3a2a1c9f0a5e8aaed8f5e73760c9c47f
Parents: b6941c9 7743f0c
Author: AKuznetsov 
Authored: Thu Aug 13 23:52:16 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 23:52:16 2015 +0700

--
 modules/control-center-web/src/main/js/agents/agent-manager.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--




[1/2] incubator-ignite git commit: IGNITE-843 Get drivers and metadata from web-agent.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 7743f0cab -> 2e8a3d1a3


IGNITE-843 Get drivers and metadata from web-agent.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b6941c99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b6941c99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b6941c99

Branch: refs/heads/ignite-843
Commit: b6941c995ba24e8b8035d7bcef46238cc7e501cc
Parents: b7fc32b
Author: AKuznetsov 
Authored: Thu Aug 13 23:52:02 2015 +0700
Committer: AKuznetsov 
Committed: Thu Aug 13 23:52:02 2015 +0700

--
 .../main/js/controllers/metadata-controller.js  |   4 +-
 .../src/main/js/routes/agent.js | 127 ++-
 2 files changed, 68 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6941c99/modules/control-center-web/src/main/js/controllers/metadata-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/metadata-controller.js 
b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index a6b0e7a..7f79808 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -195,7 +195,9 @@ controlCenterModule.controller('metadataController', [
 $scope.loadMetadataFromDb = function () {
 $http.post('/agent/metadata')
 .success(function (tables) {
-$scope.loadMeta.tables = tables;
+$scope.loadMeta.tables = _.map(tables, function (tbl) {
+return {schemaName: tbl.schema, tableName: 
tbl.tbl};
+});
 $scope.loadMeta.action = 'tables';
 })
 .error(function (errMsg) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6941c99/modules/control-center-web/src/main/js/routes/agent.js
--
diff --git a/modules/control-center-web/src/main/js/routes/agent.js 
b/modules/control-center-web/src/main/js/routes/agent.js
index ddc0280..9886e86 100644
--- a/modules/control-center-web/src/main/js/routes/agent.js
+++ b/modules/control-center-web/src/main/js/routes/agent.js
@@ -21,98 +21,101 @@ var agentManager = require('../agents/agent-manager');
 var apacheIgnite = require('apache-ignite');
 var SqlFieldsQuery = apacheIgnite.SqlFieldsQuery;
 
-/* Get grid topology. */
-router.post('/topology', function (req, res) {
+function _client(req, res) {
 var client = 
agentManager.getAgentManager().findClient(req.currentUserId());
 
-if (!client)
-return res.status(500).send("Client not found");
+if (!client) {
+res.status(500).send("Client not found");
 
-client.ignite().cluster().then(function (clusters) {
-res.json(clusters.map(function (cluster) {
-var caches = Object.keys(cluster._caches).map(function (key) {
-return {"name": key, "mode": cluster._caches[key]}
-});
+return null;
+}
 
-return {nodeId: cluster._nodeId, caches: caches};
-}));
-}, function (err) {
-res.status(500).send(err);
-});
+return client;
+}
+
+/* Get grid topology. */
+router.post('/topology', function (req, res) {
+var client = _client(req, res);
+
+if (client) {
+client.ignite().cluster().then(function (clusters) {
+res.json(clusters.map(function (cluster) {
+var caches = Object.keys(cluster._caches).map(function (key) {
+return {"name": key, "mode": cluster._caches[key]}
+});
+
+return {nodeId: cluster._nodeId, caches: caches};
+}));
+}, function (err) {
+res.status(500).send(err);
+});
+}
 });
 
 /* Execute query. */
 router.post('/query', function (req, res) {
-var client = 
agentManager.getAgentManager().findClient(req.currentUserId());
-
-if (!client)
-return res.status(500).send("Client not found");
+var client = _client(req, res);
 
-// Create sql query.
-var qry = new SqlFieldsQuery(req.body.query);
+if (client) {
+// Create sql query.
+var qry = new SqlFieldsQuery(req.body.query);
 
-// Set page size for query.
-qry.setPageSize(req.body.pageSize);
+// Set page size for query.
+qry.setPageSize(req.body.pageSize);
 
-// Get query cursor.
-
client.ignite().cache(req.body.cacheName).query(qry).nextPage().then(function 
(cursor) {
-res.jso

incubator-ignite git commit: Fixed threads cleanup in continuous processor

2015-08-13 Thread vkulichenko
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 6697b0c98 -> ba3abceca


Fixed threads cleanup in continuous processor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ba3abcec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ba3abcec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ba3abcec

Branch: refs/heads/master
Commit: ba3abceca10a1745253a3c28e7a6fe6f5833d266
Parents: 6697b0c
Author: Valentin Kulichenko 
Authored: Thu Aug 13 15:50:39 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 15:50:39 2015 -0700

--
 .../continuous/GridContinuousProcessor.java | 16 +++-
 .../GridCacheContinuousQueryAbstractSelfTest.java   |  2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba3abcec/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index 5f1c4bb..a360e35 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.processors.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.timeout.*;
-import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -72,7 +71,7 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 private final ConcurrentMap stopFuts = new 
ConcurrentHashMap8<>();
 
 /** Threads started by this processor. */
-private final Collection threads = new 
GridConcurrentHashSet<>();
+private final Map bufCheckThreads = new 
ConcurrentHashMap8<>();
 
 /** */
 private final ConcurrentMap syncMsgFuts 
= new ConcurrentHashMap8<>();
@@ -311,8 +310,10 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 
 ctx.io().removeMessageListener(TOPIC_CONTINUOUS);
 
-U.interrupt(threads);
-U.joinThreads(threads, log);
+for (IgniteThread thread : bufCheckThreads.values()) {
+U.interrupt(thread);
+U.join(thread);
+}
 
 if (log.isDebugEnabled())
 log.debug("Continuous processor stopped.");
@@ -915,7 +916,7 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 });
 
-threads.add(checker);
+bufCheckThreads.put(routineId, checker);
 
 checker.start();
 }
@@ -947,6 +948,11 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 ctx.io().removeMessageListener(hnd.orderedTopic());
 
 hnd.unregister(routineId, ctx);
+
+IgniteThread checker = bufCheckThreads.remove(routineId);
+
+if (checker != null)
+checker.interrupt();
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba3abcec/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 4681071..7b628b4 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.processors.datastructures.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.

incubator-ignite git commit: JavaDoc fix

2015-08-13 Thread vkulichenko
Repository: incubator-ignite
Updated Branches:
  refs/heads/master ba3abceca -> 260238e04


JavaDoc fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/260238e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/260238e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/260238e0

Branch: refs/heads/master
Commit: 260238e041c66a02f2552692bab2f44a923f7d41
Parents: ba3abce
Author: Valentin Kulichenko 
Authored: Thu Aug 13 15:50:48 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 15:50:48 2015 -0700

--
 .../main/java/org/apache/ignite/internal/IgnitionEx.java  | 10 +-
 .../src/main/java/org/apache/ignite/IgniteSpring.java |  8 
 2 files changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260238e0/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 3790703..fd74745 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -429,7 +429,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid.
  * @throws IgniteCheckedException If default grid could not be started. 
This exception will be thrown
  *  also if default grid has already been started.
@@ -466,7 +466,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid.
  * @throws IgniteCheckedException If grid could not be started. This 
exception will be thrown
  *  also if named grid has already been started.
@@ -642,7 +642,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st found instance is returned.
  * @throws IgniteCheckedException If grid could not be started or 
configuration
@@ -690,7 +690,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st found instance is returned.
  * @throws IgniteCheckedException If grid could not be started or 
configuration
@@ -769,7 +769,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started gri

incubator-ignite git commit: Fixed threads cleanup in continuous processor

2015-08-13 Thread vkulichenko
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 260238e04 -> 8ecddcc2d


Fixed threads cleanup in continuous processor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8ecddcc2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8ecddcc2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8ecddcc2

Branch: refs/heads/master
Commit: 8ecddcc2dcb064b759486d43a4f09173f268b3cf
Parents: 260238e
Author: Valentin Kulichenko 
Authored: Thu Aug 13 16:25:09 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 16:25:09 2015 -0700

--
 .../internal/processors/continuous/GridEventConsumeSelfTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8ecddcc2/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
index 5ce2efd..7ab858b 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -125,6 +124,7 @@ public class GridEventConsumeSelfTest extends 
GridCommonAbstractTest {
 assertEquals(0, U.field(proc, "rmtInfos").size());
 assertEquals(0, U.field(proc, "startFuts").size());
 assertEquals(0, U.field(proc, "stopFuts").size());
+assertEquals(0, U.field(proc, "bufCheckThreads").size());
 }
 }
 finally {
@@ -754,7 +754,7 @@ public class GridEventConsumeSelfTest extends 
GridCommonAbstractTest {
  */
 public void testNodeJoinWithP2P() throws Exception {
 fail("https://issues.apache.org/jira/browse/IGNITE-585";);
-
+
 final Collection nodeIds = new HashSet<>();
 final AtomicInteger cnt = new AtomicInteger();
 final CountDownLatch latch = new CountDownLatch(GRID_CNT + 1);



incubator-ignite git commit: IGNITE-264 - Fixing tests WIP.

2015-08-13 Thread agoncharuk
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-264 a733984d4 -> f9511aff9


IGNITE-264 - Fixing tests WIP.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f9511aff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f9511aff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f9511aff

Branch: refs/heads/ignite-264
Commit: f9511aff95fd6fecff3da3bc70143d3e74e4aaaf
Parents: a733984
Author: Alexey Goncharuk 
Authored: Thu Aug 13 18:28:00 2015 -0700
Committer: Alexey Goncharuk 
Committed: Thu Aug 13 18:28:00 2015 -0700

--
 .../near/GridNearOptimisticTxPrepareFuture.java |  33 ++--
 .../GridNearPessimisticTxPrepareFuture.java |   8 +-
 .../near/GridNearTxFinishFuture.java|  98 +--
 .../cache/distributed/near/GridNearTxLocal.java |  43 +
 .../dht/GridCacheTxNodeFailureSelfTest.java | 165 ---
 5 files changed, 230 insertions(+), 117 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9511aff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index 95e1847..28069b2 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -118,8 +118,13 @@ public class GridNearOptimisticTxPrepareFuture extends 
GridNearTxPrepareFutureAd
  */
 void onError(@Nullable UUID nodeId, @Nullable 
Iterable mappings, Throwable e) {
 if (X.hasCause(e, ClusterTopologyCheckedException.class) || 
X.hasCause(e, ClusterTopologyException.class)) {
-if (tx.onePhaseCommit())
+if (tx.onePhaseCommit()) {
 tx.markForBackupCheck();
+
+onComplete();
+
+return;
+}
 }
 
 if (err.compareAndSet(null, e)) {
@@ -189,17 +194,7 @@ public class GridNearOptimisticTxPrepareFuture extends 
GridNearTxPrepareFutureAd
 
 this.err.compareAndSet(null, err);
 
-if (err == null)
-tx.state(PREPARED);
-
-if (super.onDone(tx, err)) {
-// Don't forget to clean up.
-cctx.mvcc().removeFuture(this);
-
-return true;
-}
-
-return false;
+return onComplete();
 }
 
 /**
@@ -213,10 +208,20 @@ public class GridNearOptimisticTxPrepareFuture extends 
GridNearTxPrepareFutureAd
 /**
  * Completeness callback.
  */
-private void onComplete() {
-if (super.onDone(tx, err.get()))
+private boolean onComplete() {
+Throwable err0 = err.get();
+
+if (err0 == null || tx.needCheckBackup())
+tx.state(PREPARED);
+
+if (super.onDone(tx, err0)) {
 // Don't forget to clean up.
 cctx.mvcc().removeFuture(this);
+
+return true;
+}
+
+return false;
 }
 
 /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9511aff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index 6de46f4..6ac1033 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@ -242,7 +242,7 @@ public class GridNearPessimisticTxPrepareFuture extends 
GridNearTxPrepareFutureA
 
 err = this.err.get();
 
-if (err == null)
+if (err == null || tx.needCheckBackup())
 tx.state(PREPARED);
 
 if (super.onDone(tx, err)) {
@@ -320,9 +320,13 @@ public class GridNearPessimisticTxPrepareFuture extends 
GridNearTxPrepareFutureA
  * @param e Error.
  */
 void onNodeLeft(ClusterTopologyCheckedException e) {
-   

incubator-ignite git commit: IGNITE-843 Updated "what's now" and "what's next".

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 0a8b4720e -> d46c8e026


IGNITE-843 Updated "what's now" and "what's next".


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d46c8e02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d46c8e02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d46c8e02

Branch: refs/heads/ignite-843
Commit: d46c8e026c5d8269db8ca735bc389cd2e3e7a07d
Parents: 0a8b472
Author: AKuznetsov 
Authored: Fri Aug 14 08:28:30 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 08:28:30 2015 +0700

--
 .../src/main/js/controllers/models/caches.json  | 33 ++--
 .../main/js/controllers/models/clusters.json| 11 +++
 .../src/main/js/controllers/models/summary.json | 10 +++---
 3 files changed, 28 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d46c8e02/modules/control-center-web/src/main/js/controllers/models/caches.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/caches.json 
b/modules/control-center-web/src/main/js/controllers/models/caches.json
index 2ca832a..78f9c84 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -3,16 +3,17 @@
 "workflowTitle": "What's now:",
 "workflowContent": [
   "",
-  "  Configure caches.",
-  "  Associate metadata with cache queries and/or cache store.",
-  ""
+  "  Configure Caches",
+  "  Link Metadata to Caches",
+  "  Link Caches to Clusters",
+  ""
 ],
 "whatsNextTitle": "What's next:",
 "whatsNextContent": [
   "",
-  "  Configure clusters.",
-  "  Configure cache type metadata.",
-  "  Generate XML and java code on Summary view.",
+  "  Continue to Summary",
+  "  Back to Metadata",
+  "  Back to Clusters",
   ""
 ]
   },
@@ -297,21 +298,12 @@
   ]
 },
 {
-  "label": "Query",
+  "label": "Queries & Indexing",
   "tip": [
 "Cache query settings."
   ],
   "fields": [
 {
-  "label": "Escape table and filed names",
-  "type": "check",
-  "model": "sqlEscapeAll",
-  "tip": [
-"If set then all the SQL table and field names will be escaped 
with double quotes.",
-"This enforces case sensitivity for field names and also allows 
having special characters in table and field names."
-  ]
-},
-{
   "label": "On-heap cache for off-heap indexes",
   "type": "number",
   "model": "sqlOnheapRowCacheSize",
@@ -370,6 +362,15 @@
   "tip": [
 "Class with user-defined functions for SQL queries."
   ]
+},
+{
+  "label": "Escape table and filed names",
+  "type": "check",
+  "model": "sqlEscapeAll",
+  "tip": [
+"If set then all the SQL table and field names will be escaped 
with double quotes.",
+"This enforces case sensitivity for field names and also allows 
having special characters in table and field names."
+  ]
 }
   ]
 },

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d46c8e02/modules/control-center-web/src/main/js/controllers/models/clusters.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/clusters.json 
b/modules/control-center-web/src/main/js/controllers/models/clusters.json
index d6502c9..c29f67b 100644
--- a/modules/control-center-web/src/main/js/controllers/models/clusters.json
+++ b/modules/control-center-web/src/main/js/controllers/models/clusters.json
@@ -3,16 +3,15 @@
 "workflowTitle": "What's now:",
 "workflowContent": [
   "",
-  "  Configure clusters.",
-  "  Associate clusters with caches.",
-  ""
+  "  Configure Clusters",
+  "  Link Clusters to Caches",
+  ""
 ],
 "whatsNextTitle": "What's next:",
 "whatsNextContent": [
   "",
-  "  Configure cache type metadata.",
-  "  Configure caches.",
-  "  Generate XML and java code on Summary view.",
+  "  Continue to Caches",
+  "  Continue to Summary",
   ""
 ]
   },

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d46c8e02/modules/control-center-web/src/main/js/controllers/models/summary.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/summary.json 
b/modules/control-center-web/src/main/js/

incubator-ignite git commit: IGNITE-843 Refactored to use mixins.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 d46c8e026 -> 51045941f


IGNITE-843 Refactored to use mixins.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/51045941
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/51045941
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/51045941

Branch: refs/heads/ignite-843
Commit: 51045941fc9a6fdd631223cf47fa8bdb1c688483
Parents: d46c8e0
Author: AKuznetsov 
Authored: Fri Aug 14 10:19:55 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 10:19:55 2015 +0700

--
 .../main/js/controllers/models/metadata.json| 11 ++---
 .../src/main/js/views/configuration/caches.jade | 35 +++-
 .../main/js/views/configuration/clusters.jade   | 36 +++--
 .../main/js/views/configuration/metadata.jade   | 28 -
 .../main/js/views/configuration/sidebar.jade|  4 +-
 .../src/main/js/views/includes/controls.jade| 42 
 6 files changed, 67 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51045941/modules/control-center-web/src/main/js/controllers/models/metadata.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/metadata.json 
b/modules/control-center-web/src/main/js/controllers/models/metadata.json
index 13cc2ec..4e8bed2 100644
--- a/modules/control-center-web/src/main/js/controllers/models/metadata.json
+++ b/modules/control-center-web/src/main/js/controllers/models/metadata.json
@@ -3,15 +3,16 @@
 "workflowTitle": "What's now:",
 "workflowContent": [
   "",
-  "  Manually configure metadata for queries and persistence.",
-  "  Automatically configure metadata from database schema.",
-  ""
+  "  Manually enter Metadata",
+  "  Load Metadata from Database",
+  ""
 ],
 "whatsNextTitle": "What's next:",
 "whatsNextContent": [
   "",
-  "  Associate caches with metadata.",
-  "  Generate XML and java code on Summary view.",
+  "  Continue to Caches",
+  "  Continue to Summary",
+  "  Back to Clusters",
   ""
 ]
   },

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51045941/modules/control-center-web/src/main/js/views/configuration/caches.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/configuration/caches.jade 
b/modules/control-center-web/src/main/js/views/configuration/caches.jade
index cad9aab..c5cdcae 100644
--- a/modules/control-center-web/src/main/js/views/configuration/caches.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/caches.jade
@@ -27,45 +27,20 @@ block content
 hr
 .docs-body(ng-controller='cachesController')
 +block-callout('{{screenTip.workflowTitle}}', 
'joinTip(screenTip.workflowContent)', '{{screenTip.whatsNextTitle}}', 
'joinTip(screenTip.whatsNextContent)')
-div(ng-hide='caches.length == 0')
-.padding-dflt
-lable.labelHeader Caches:
-table.links(st-table='caches')
-tbody
-tr(ng-repeat='row in caches track by row._id')
-td(ng-class='{active: row._id == 
selectedItem._id}')
-a(on-click-focus='defaultFocusId' 
ng-click='selectItem(row)') {{$index + 1}}) {{row.name}}, {{row.mode | 
displayValue:modes:'Cache mode not set'}}, {{row.atomicityMode | 
displayValue:atomicities:'Cache atomicity not set'}}
++main-table('Caches:', 'caches', 'defaultFocusId', 'selectItem(row)', 
'{{$index + 1}}) {{row.name}}, {{row.mode | displayValue:modes:"Cache mode not 
set"}}, {{row.atomicityMode | displayValue:atomicities:"Cache atomicity not 
set"}}')
 .padding-top-dflt
 button.btn.btn-primary(on-click-focus='defaultFocusId' 
ng-click='createItem()') Add cache
 hr
 form.form-horizontal(name='inputForm' ng-if='backupItem' novalidate)
 .panel-group(bs-collapse ng-model='panels.activePanels' 
data-allow-multiple='true')
-.panel.panel-default(ng-repeat='group in general')
-.panel-heading
-h3
-a(bs-collapse-toggle) {{::group.label}}
-.panel-collapse(bs-collapse-target)
-.panel-body
-.settings-row(ng-repeat='field in group.fields')
-+form-row('backupItem')
++groups('general', 'backupItem')
 div(ng-show='ui.expanded')
-.advanced-options
+  

[2/4] incubator-ignite git commit: JavaDoc fix

2015-08-13 Thread akuznetsov
JavaDoc fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/260238e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/260238e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/260238e0

Branch: refs/heads/ignite-843
Commit: 260238e041c66a02f2552692bab2f44a923f7d41
Parents: ba3abce
Author: Valentin Kulichenko 
Authored: Thu Aug 13 15:50:48 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 15:50:48 2015 -0700

--
 .../main/java/org/apache/ignite/internal/IgnitionEx.java  | 10 +-
 .../src/main/java/org/apache/ignite/IgniteSpring.java |  8 
 2 files changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/260238e0/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java 
b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 3790703..fd74745 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -429,7 +429,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid.
  * @throws IgniteCheckedException If default grid could not be started. 
This exception will be thrown
  *  also if default grid has already been started.
@@ -466,7 +466,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid.
  * @throws IgniteCheckedException If grid could not be started. This 
exception will be thrown
  *  also if named grid has already been started.
@@ -642,7 +642,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st found instance is returned.
  * @throws IgniteCheckedException If grid could not be started or 
configuration
@@ -690,7 +690,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st found instance is returned.
  * @throws IgniteCheckedException If grid could not be started or 
configuration
@@ -769,7 +769,7 @@ public class IgnitionEx {
  * @param springCtx Optional Spring application context, possibly {@code 
null}.
  *  Spring bean definitions for bean injection are taken from this 
context.
  *  If provided, this context can be injected into grid tasks and grid 
jobs using
- *  {@link SpringApplicationContextResource 
@IgniteSpringApplicationContextResource} annotation.
+ *  {@link SpringApplicationContextResource 
@SpringApplicationContextResource} annotation.
  * @return Started grid. If Spring configuration contains multiple grid 
instances,
  *  then the 1st 

[3/4] incubator-ignite git commit: Fixed threads cleanup in continuous processor

2015-08-13 Thread akuznetsov
Fixed threads cleanup in continuous processor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8ecddcc2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8ecddcc2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8ecddcc2

Branch: refs/heads/ignite-843
Commit: 8ecddcc2dcb064b759486d43a4f09173f268b3cf
Parents: 260238e
Author: Valentin Kulichenko 
Authored: Thu Aug 13 16:25:09 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 16:25:09 2015 -0700

--
 .../internal/processors/continuous/GridEventConsumeSelfTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8ecddcc2/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
index 5ce2efd..7ab858b 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -125,6 +124,7 @@ public class GridEventConsumeSelfTest extends 
GridCommonAbstractTest {
 assertEquals(0, U.field(proc, "rmtInfos").size());
 assertEquals(0, U.field(proc, "startFuts").size());
 assertEquals(0, U.field(proc, "stopFuts").size());
+assertEquals(0, U.field(proc, "bufCheckThreads").size());
 }
 }
 finally {
@@ -754,7 +754,7 @@ public class GridEventConsumeSelfTest extends 
GridCommonAbstractTest {
  */
 public void testNodeJoinWithP2P() throws Exception {
 fail("https://issues.apache.org/jira/browse/IGNITE-585";);
-
+
 final Collection nodeIds = new HashSet<>();
 final AtomicInteger cnt = new AtomicInteger();
 final CountDownLatch latch = new CountDownLatch(GRID_CNT + 1);



[4/4] incubator-ignite git commit: Merge branches 'ignite-843' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-843

2015-08-13 Thread akuznetsov
Merge branches 'ignite-843' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-843


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e161346c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e161346c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e161346c

Branch: refs/heads/ignite-843
Commit: e161346cf467c92ec3f728a7739d944598b358ab
Parents: 5104594 8ecddcc
Author: AKuznetsov 
Authored: Fri Aug 14 10:26:35 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 10:26:35 2015 +0700

--
 .../java/org/apache/ignite/internal/IgnitionEx.java | 10 +-
 .../continuous/GridContinuousProcessor.java | 16 +++-
 .../GridCacheContinuousQueryAbstractSelfTest.java   |  2 +-
 .../continuous/GridEventConsumeSelfTest.java|  4 ++--
 .../main/java/org/apache/ignite/IgniteSpring.java   |  8 
 5 files changed, 23 insertions(+), 17 deletions(-)
--




[1/4] incubator-ignite git commit: Fixed threads cleanup in continuous processor

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 51045941f -> e161346cf


Fixed threads cleanup in continuous processor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ba3abcec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ba3abcec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ba3abcec

Branch: refs/heads/ignite-843
Commit: ba3abceca10a1745253a3c28e7a6fe6f5833d266
Parents: 6697b0c
Author: Valentin Kulichenko 
Authored: Thu Aug 13 15:50:39 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 15:50:39 2015 -0700

--
 .../continuous/GridContinuousProcessor.java | 16 +++-
 .../GridCacheContinuousQueryAbstractSelfTest.java   |  2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba3abcec/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index 5f1c4bb..a360e35 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.processors.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.timeout.*;
-import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -72,7 +71,7 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 private final ConcurrentMap stopFuts = new 
ConcurrentHashMap8<>();
 
 /** Threads started by this processor. */
-private final Collection threads = new 
GridConcurrentHashSet<>();
+private final Map bufCheckThreads = new 
ConcurrentHashMap8<>();
 
 /** */
 private final ConcurrentMap syncMsgFuts 
= new ConcurrentHashMap8<>();
@@ -311,8 +310,10 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 
 ctx.io().removeMessageListener(TOPIC_CONTINUOUS);
 
-U.interrupt(threads);
-U.joinThreads(threads, log);
+for (IgniteThread thread : bufCheckThreads.values()) {
+U.interrupt(thread);
+U.join(thread);
+}
 
 if (log.isDebugEnabled())
 log.debug("Continuous processor stopped.");
@@ -915,7 +916,7 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 }
 });
 
-threads.add(checker);
+bufCheckThreads.put(routineId, checker);
 
 checker.start();
 }
@@ -947,6 +948,11 @@ public class GridContinuousProcessor extends 
GridProcessorAdapter {
 ctx.io().removeMessageListener(hnd.orderedTopic());
 
 hnd.unregister(routineId, ctx);
+
+IgniteThread checker = bufCheckThreads.remove(routineId);
+
+if (checker != null)
+checker.interrupt();
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba3abcec/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 4681071..7b628b4 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.processors.datastructures.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discov

incubator-ignite git commit: IGNITE-843 Implemented agent download.

2015-08-13 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 e161346cf -> a03d6876b


IGNITE-843 Implemented agent download.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a03d6876
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a03d6876
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a03d6876

Branch: refs/heads/ignite-843
Commit: a03d6876b9a62f5fbb47267be44dea3cb72479aa
Parents: e161346
Author: AKuznetsov 
Authored: Fri Aug 14 13:50:55 2015 +0700
Committer: AKuznetsov 
Committed: Fri Aug 14 13:50:55 2015 +0700

--
 .../main/js/controllers/metadata-controller.js  | 27 ++--
 .../src/main/js/public/stylesheets/style.scss   |  4 +++
 .../src/main/js/routes/agent.js |  2 +-
 .../js/views/configuration/metadata-load.jade   | 10 
 .../configuration/CacheConfiguration.java   |  4 +--
 5 files changed, 42 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a03d6876/modules/control-center-web/src/main/js/controllers/metadata-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/metadata-controller.js 
b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index 7f79808..c3e41cf 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -187,8 +187,16 @@ controlCenterModule.controller('metadataController', [
 else
 $common.showError('JDBC drivers not found!');
 })
-.error(function (errMsg) {
-$common.showError(errMsg);
+.error(function (errMsg, status) {
+if (status == 503)
+loadMetaModal.$promise.then(function () {
+$scope.loadMeta.action = 'download';
+$scope.loadMeta.tables = [];
+
+loadMetaModal.show();
+});
+else
+$common.showError(errMsg);
 });
 };
 
@@ -205,6 +213,21 @@ controlCenterModule.controller('metadataController', [
 });
 };
 
+$scope.downloadAgent = function () {
+loadMetaModal.hide();
+
+var lnk = document.createElement('a');
+
+lnk.setAttribute('href', '/agent/agent.zip');
+lnk.style.display = 'none';
+
+document.body.appendChild(lnk);
+
+lnk.click();
+
+document.body.removeChild(lnk);
+};
+
 $scope.saveSelectedMetadata = function (preset) {
 loadMetaModal.hide();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a03d6876/modules/control-center-web/src/main/js/public/stylesheets/style.scss
--
diff --git 
a/modules/control-center-web/src/main/js/public/stylesheets/style.scss 
b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 5bf9c9a..5debf53 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -1242,6 +1242,10 @@ a {
 padding-bottom: 10px;
 }
 
+.metadata-download {
+padding: 10px 10px 10px 20px;
+}
+
 .theme-line .panel-title h3 {
 margin-top: 20px;
 margin-bottom: 20px;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a03d6876/modules/control-center-web/src/main/js/routes/agent.js
--
diff --git a/modules/control-center-web/src/main/js/routes/agent.js 
b/modules/control-center-web/src/main/js/routes/agent.js
index 9886e86..6019ba1 100644
--- a/modules/control-center-web/src/main/js/routes/agent.js
+++ b/modules/control-center-web/src/main/js/routes/agent.js
@@ -25,7 +25,7 @@ function _client(req, res) {
 var client = 
agentManager.getAgentManager().findClient(req.currentUserId());
 
 if (!client) {
-res.status(500).send("Client not found");
+res.status(503).send("Client not found");
 
 return null;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a03d6876/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/configuration/m