incubator-ignite git commit: master: visor debug reworked

2014-12-10 Thread yzhdanov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 20872dc75 -> a0e5f1bb9


master: visor debug reworked


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

Branch: refs/heads/master
Commit: a0e5f1bb9abdf979b6603927f2deb0db02101ce9
Parents: 20872dc
Author: Yakov Zhdanov 
Authored: Wed Dec 10 12:26:04 2014 +0300
Committer: Yakov Zhdanov 
Committed: Wed Dec 10 12:26:04 2014 +0300

--
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 3 files changed, 88 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a0e5f1bb/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
index 8db90e0..de6d88b 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
@@ -48,8 +47,8 @@ public abstract class VisorMultiNodeTask implements 
ComputeTask job(A arg);
 
 /** {@inheritDoc} */
-@Nullable @Override public Map 
map(List subgrid,
-@Nullable VisorTaskArgument arg) throws GridException {
+@Override public Map 
map(List subgrid, VisorTaskArgument arg)
+throws GridException {
 assert arg != null;
 
 start = U.currentTimeMillis();
@@ -61,13 +60,24 @@ public abstract class VisorMultiNodeTask 
implements ComputeTask map0(List 
subgrid, VisorTaskArgument arg)
+throws GridException {
 Collection nodeIds = arg.nodes();
 
 Map map = U.newHashMap(nodeIds.size());
 
 try {
-taskArg = arg.argument();
-
 for (ClusterNode node : subgrid)
 if (nodeIds.contains(node.id()))
 map.put(job(taskArg), node);
@@ -75,8 +85,7 @@ public abstract class VisorMultiNodeTask implements 
ComputeTask implements 
ComputeTask results) 
throws GridException;
 
 /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a0e5f1bb/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
index 1b5df78..7b3cec1 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
@@ -86,8 +86,17 @@ public class VisorNodeDataCollectorJob extends 
VisorJob endPoints = 
ggfsProc.endpoints(ggfs.name());
+long start0 = U.currentTimeMillis();
 
-if (endPoints != null) {
-for (GridIpcServerEndpoint ep : endPoints)
-if (ep.isManagement())
-res.ggfsEndpoints().add(new 
VisorGgfsEndpoint(ggfs.name(), g.name(),
-ep.getHost(), ep.getPort()));
-}
+try {
+Collection endPoints = 
ggfsProc.endpoints(ggfs.name());
 
-res.ggfss().add(VisorGgfs.from(ggfs));
+if (endPoints != null) {
+for (GridIpcServerEndpoint ep : endPoints)
+if (ep.isManagement())
+res.ggfsEndpoints().add(new 
VisorGgfsEndpoint(ggfs.name(), g.name(),
+ep.getHost(), ep.getPort()));
+}
+
+res.ggfss().add(VisorGgfs.from(ggfs));
+}
+finally {
+if (debug)
+log(g.log(), "Collected GGFS: " + ggfs.name(), 
getClass(), start0);
+}
 }
 }
 catch (Throwable ggfss

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

2014-12-10 Thread sboikov
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/682e47fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/682e47fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/682e47fe

Branch: refs/heads/master
Commit: 682e47fe205dc19f374130fb5bcd7de545fac275
Parents: 99ee7a7 a0e5f1b
Author: sboikov 
Authored: Wed Dec 10 13:40:52 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 13:40:52 2014 +0300

--
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 3 files changed, 88 insertions(+), 31 deletions(-)
--




[1/2] incubator-ignite git commit: # Ignite Fixed class names

2014-12-10 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master a0e5f1bb9 -> 682e47fe2


# Ignite Fixed class names


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

Branch: refs/heads/master
Commit: 99ee7a70110a4551df335c34b5f4c748518c9bdf
Parents: 20872dc
Author: sboikov 
Authored: Wed Dec 10 13:40:00 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 13:40:00 2014 +0300

--
 .../ignite/spi/deployment/DeploymentSpi.java|  2 +-
 modules/core/src/test/config/tests.properties   |  2 +-
 ...loymentClassLoaderMultiThreadedSelfTest.java |  4 ++--
 .../GridUriDeploymentFileProcessorSelfTest.java |  2 +-
 .../GridUriDeploymentMultiScannersSelfTest.java |  2 +-
 .../file/GridFileDeploymentSelfTest.java| 24 ++--
 .../GridFileDeploymentUndeploySelfTest.java |  4 ++--
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |  2 +-
 .../http/GridHttpDeploymentSelfTest.java|  2 +-
 9 files changed, 22 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99ee7a70/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
index 78b251c..df035de 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
@@ -40,7 +40,7 @@ import org.jetbrains.annotations.*;
  * Gridgain provides the following {@code GridDeploymentSpi} implementations:
  * 
  * {@link org.apache.ignite.spi.deployment.local.LocalDeploymentSpi}
- * {@gglink org.gridgain.grid.spi.deployment.uri.GridUriDeploymentSpi}
+ * {@gglink org.apache.ignite.spi.deployment.uri.GridUriDeploymentSpi}
  * 
  * NOTE: this SPI (i.e. methods in this interface) should never be used 
directly. SPIs provide
  * internal view on the subsystem and is used internally by GridGain kernal. 
In rare use cases when

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99ee7a70/modules/core/src/test/config/tests.properties
--
diff --git a/modules/core/src/test/config/tests.properties 
b/modules/core/src/test/config/tests.properties
index 09d2711..f093d27 100644
--- a/modules/core/src/test/config/tests.properties
+++ b/modules/core/src/test/config/tests.properties
@@ -52,7 +52,7 @@ 
deploy.uri.http=http://216.93.179.140/gridgain/gg-test/deployment/
 # Http scanner URI for secure SSL HTTPs deployment.
 deploy.uri.https=https://216.93.179.140:8445/gridgain/gg-test/deployment/
 # Directory with descriptors to construct GAR files.
-deploy.gar.descriptor.dir=modules/urideploy/src/test/java/org/gridgain/grid/spi/deployment/uri/META-INF
+deploy.gar.descriptor.dir=modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/META-INF
 
 # Directory with a number of descriptors for the Ant gar task.
 ant.gar.descriptor.dir=modules/extdata/p2p/META-INF

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99ee7a70/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
--
diff --git 
a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
 
b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
index 90c664d..83d483e 100644
--- 
a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
+++ 
b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
@@ -40,7 +40,7 @@ public class 
GridUriDeploymentClassLoaderMultiThreadedSelfTest extends GridCommo
 multithreaded(
 new Callable() {
 @Nullable @Override public Object call() throws Exception {
-
ldr.loadClass("org.gridgain.grid.spi.deployment.uri.tasks.GridUriDeploymentTestTask0");
+
ldr.loadClass("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0");
 
 return null;
 }
@@ -55,7 +55,7 @@ public class 
GridUriDeploymentClassLoaderMultiThreadedSelfTest extends GridCommo
 multithread

[3/3] incubator-ignite git commit: # ignite-21

2014-12-10 Thread sboikov
# ignite-21


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

Branch: refs/heads/ignite-21
Commit: dae4b9428cfe04fb2d0f78020e7f0ea29eb37c04
Parents: 20872dc
Author: sboikov 
Authored: Wed Dec 10 10:41:56 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 13:22:50 2014 +0300

--
 .../rest/protocols/tcp/GridMockNioSession.java  |   11 +
 .../communication/tcp/TcpCommunicationSpi.java  | 1151 +++---
 .../tcp/TcpCommunicationSpiMBean.java   |   52 +-
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |3 +-
 .../GridTcpCommunicationMessageAdapter.java |7 +
 .../GridTcpCommunicationMessageFactory.java |   10 +-
 .../grid/util/nio/GridCommunicationClient.java  |3 +-
 .../grid/util/nio/GridNioFinishedFuture.java|5 +
 .../gridgain/grid/util/nio/GridNioFuture.java   |   15 +-
 .../grid/util/nio/GridNioFutureImpl.java|7 +-
 .../util/nio/GridNioRecoveryDescriptor.java |  356 ++
 .../gridgain/grid/util/nio/GridNioServer.java   |  167 ++-
 .../gridgain/grid/util/nio/GridNioSession.java  |   10 +
 .../grid/util/nio/GridNioSessionImpl.java   |   10 +
 .../util/nio/GridSelectorNioSessionImpl.java|   97 ++
 .../util/nio/GridShmemCommunicationClient.java  |4 +-
 .../util/nio/GridTcpCommunicationClient.java|4 +-
 .../util/nio/GridTcpNioCommunicationClient.java |   39 +-
 .../GridAbstractCommunicationSelfTest.java  |   85 +-
 .../spi/communication/GridTestMessage.java  |   15 +-
 .../GridTcpCommunicationSpiAbstractTest.java|   26 +-
 ...mmunicationSpiConcurrentConnectSelfTest.java |  398 ++
 .../GridTcpCommunicationSpiConfigSelfTest.java  |4 +
 ...cpCommunicationSpiMultithreadedSelfTest.java |   77 +-
 ...pCommunicationSpiMultithreadedShmemTest.java |2 +-
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java |  426 +++
 ...GridTcpCommunicationSpiRecoverySelfTest.java |  713 +++
 .../GridTcpCommunicationSpiShmemSelfTest.java   |2 +-
 ...cpCommunicationSpiTcpNoDelayOffSelfTest.java |   20 +
 .../managers/GridManagerStopSelfTest.java   |2 +
 .../grid/spi/GridSpiStartStopAbstractTest.java  |2 +
 .../nio/impl/GridNioFilterChainSelfTest.java|   10 +
 .../gridgain/testframework/GridTestNode.java|   12 +-
 .../GridSpiCommunicationSelfTestSuite.java  |8 +-
 34 files changed, 3434 insertions(+), 319 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dae4b942/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMockNioSession.java
--
diff --git 
a/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMockNioSession.java
 
b/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMockNioSession.java
index 7071ed5..bf82f22 100644
--- 
a/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMockNioSession.java
+++ 
b/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMockNioSession.java
@@ -10,6 +10,7 @@ package 
org.gridgain.grid.kernal.processors.rest.protocols.tcp;
 
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.nio.*;
+import org.jetbrains.annotations.*;
 
 import java.net.*;
 
@@ -132,4 +133,14 @@ public class GridMockNioSession extends 
GridMetadataAwareAdapter implements Grid
 @Override public boolean readsPaused() {
 return false;
 }
+
+/** {@inheritDoc} */
+@Override public void recoveryDescriptor(GridNioRecoveryDescriptor 
recoveryDesc) {
+// No-op.
+}
+
+/** {@inheritDoc} */
+@Nullable @Override public GridNioRecoveryDescriptor recoveryDescriptor() {
+return null;
+}
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dae4b942/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index a80421e..1911b5b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -24,6 +24,7 @@ import org.gridgain.grid.kernal.managers.eventstorage.*;
 import org.apache.ignite.spi.communication.*;
 import org

[1/3] incubator-ignite git commit: # ignite-21

2014-12-10 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-21 [created] dae4b9428


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dae4b942/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
new file mode 100644
index 000..fb1c29f
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java
@@ -0,0 +1,713 @@
+/* @java.file.header */
+
+/*  __ ___
+ *  __  /___(_)__  /__  /__ (_)___
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.communication.tcp;
+
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.communication.*;
+import org.eclipse.jetty.util.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.util.direct.*;
+import org.gridgain.grid.util.lang.*;
+import org.gridgain.grid.util.nio.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.gridgain.testframework.*;
+import org.gridgain.testframework.junits.*;
+import org.gridgain.testframework.junits.spi.*;
+
+import java.net.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+
+/**
+ *
+ */
+@GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI")
+public class GridTcpCommunicationSpiRecoverySelfTest extends GridSpiAbstractTest {
+/** */
+private static final Collection spiRsrcs = new 
ArrayList<>();
+
+/** */
+protected static final List spis = new ArrayList<>();
+
+/** */
+protected static final List nodes = new ArrayList<>();
+
+/** */
+private static final int SPI_CNT = 2;
+
+/** */
+private static final int ITERS = 10;
+
+/** */
+private static int port = 30_000;
+
+/**
+ *
+ */
+static {
+GridTcpCommunicationMessageFactory.registerCustom(new 
GridTcpCommunicationMessageProducer() {
+@Override public GridTcpCommunicationMessageAdapter create(byte 
type) {
+return new GridTestMessage();
+}
+}, GridTestMessage.DIRECT_TYPE);
+}
+
+/**
+ * Disable SPI auto-start.
+ */
+public GridTcpCommunicationSpiRecoverySelfTest() {
+super(false);
+}
+
+/** */
+@SuppressWarnings({"deprecation"})
+private class TestListener implements 
CommunicationListener {
+/** */
+private boolean block;
+
+/** */
+private CountDownLatch blockLatch;
+
+/** */
+private ConcurrentHashSet msgIds = new ConcurrentHashSet<>();
+
+/** */
+private AtomicInteger rcvCnt = new AtomicInteger();
+
+/** {@inheritDoc} */
+@Override public void onMessage(UUID nodeId, 
GridTcpCommunicationMessageAdapter msg, IgniteRunnable msgC) {
+// info("Test listener received message: " + msg);
+
+assertTrue("Unexpected message: " + msg, msg instanceof 
GridTestMessage);
+
+GridTestMessage msg0 = (GridTestMessage)msg;
+
+assertTrue("Duplicated message received: " + msg0, 
msgIds.add(msg0.getMsgId()));
+
+rcvCnt.incrementAndGet();
+
+msgC.run();
+
+try {
+synchronized (this) {
+while (block) {
+info("Test listener blocks.");
+
+assert blockLatch != null;
+
+blockLatch.countDown();
+
+wait();
+
+if (block)
+continue;
+
+info("Test listener throws exception.");
+
+throw new RuntimeException("Test exception.");
+}
+}
+}
+catch (InterruptedException e) {
+fail("Unexpected error: " + e);
+}
+}
+
+/**
+ *
+ */
+void block() {
+synchronized (this) {
+block = true;
+
+blockLatch = new CountDownLatch(1);
+}
+}
+
+/**
+ *
+ */
+void unblock() {
+synchronized (this) {
+block = false;
+
+notifyAll();
+}
+}
+
+/** {@inheritDoc} */
+@Override public void onDisconnected(UUID nodeId) {
+   

[2/3] incubator-ignite git commit: # ignite-21

2014-12-10 Thread sboikov
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dae4b942/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java 
b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
index 1e61a17..ddd301b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/nio/GridNioServer.java
@@ -11,6 +11,7 @@ package org.gridgain.grid.util.nio;
 
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.lang.*;
 import org.apache.ignite.thread.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.util.*;
@@ -329,7 +330,7 @@ public class GridNioServer {
 
 NioOperationFuture fut = new NioOperationFuture(impl, 
NioOperation.REQUIRE_WRITE, msg);
 
-send0(impl, fut);
+send0(impl, fut, false);
 
 return fut;
 }
@@ -346,7 +347,7 @@ public class GridNioServer {
 
 NioOperationFuture fut = new NioOperationFuture(impl, 
NioOperation.REQUIRE_WRITE, msg);
 
-send0(impl, fut);
+send0(impl, fut, false);
 
 return fut;
 }
@@ -354,19 +355,17 @@ public class GridNioServer {
 /**
  * @param ses Session.
  * @param fut Future.
+ * @param sys System message flag.
  */
-private void send0(GridSelectorNioSessionImpl ses, NioOperationFuture 
fut) {
+private void send0(GridSelectorNioSessionImpl ses, NioOperationFuture 
fut, boolean sys) {
 assert ses != null;
 assert fut != null;
 
-int msgCnt = ses.offerFuture(fut);
+int msgCnt = sys ? ses.offerSystemFuture(fut) : ses.offerFuture(fut);
 
 if (ses.closed()) {
-NioOperationFuture fut0;
-
-// Cleanup as session.close() may have been already finished.
-while ((fut0 = (NioOperationFuture)ses.pollFuture()) != null)
-fut0.connectionClosed();
+if (ses.removeFuture(fut))
+fut.connectionClosed();
 }
 else if (msgCnt == 1)
 // Change from 0 to 1 means that worker thread should be waken up.
@@ -374,6 +373,76 @@ public class GridNioServer {
 }
 
 /**
+ * Adds message at the front of the queue without acquiring back pressure 
semaphore.
+ *
+ * @param ses Session.
+ * @param msg Message.
+ * @return Future.
+ */
+public GridNioFuture sendSystem(GridNioSession ses, 
GridTcpCommunicationMessageAdapter msg) {
+return sendSystem(ses, msg, null);
+}
+
+/**
+ * Adds message at the front of the queue without acquiring back pressure 
semaphore.
+ *
+ * @param ses Session.
+ * @param msg Message.
+ * @param lsnr Future listener notified from the session thread.
+ * @return Future.
+ */
+public GridNioFuture sendSystem(GridNioSession ses,
+GridTcpCommunicationMessageAdapter msg,
+@Nullable IgniteInClosure> lsnr) {
+assert ses instanceof GridSelectorNioSessionImpl;
+
+GridSelectorNioSessionImpl impl = (GridSelectorNioSessionImpl)ses;
+
+NioOperationFuture fut = new NioOperationFuture(impl, 
NioOperation.REQUIRE_WRITE, msg);
+
+if (lsnr != null) {
+fut.listenAsync(lsnr);
+
+assert !fut.isDone();
+}
+
+send0(impl, fut, true);
+
+return fut;
+}
+
+/**
+ * @param ses Session.
+ */
+public void resend(GridNioSession ses) {
+assert ses instanceof GridSelectorNioSessionImpl;
+
+GridNioRecoveryDescriptor recoveryDesc = ses.recoveryDescriptor();
+
+if (recoveryDesc != null && !recoveryDesc.messagesFutures().isEmpty()) 
{
+Deque> futs = recoveryDesc.messagesFutures();
+
+if (log.isDebugEnabled())
+log.debug("Resend messages [rmtNode=" + 
recoveryDesc.node().id() + ", msgCnt=" + futs.size() + ']');
+
+GridSelectorNioSessionImpl ses0 = (GridSelectorNioSessionImpl)ses;
+
+GridNioFuture fut0 = futs.iterator().next();
+
+for (GridNioFuture fut : futs) {
+fut.messageThread(true);
+
+((NioOperationFuture)fut).resetMessage(ses0);
+}
+
+ses0.resend(futs);
+
+// Wake up worker.
+
clientWorkers.get(ses0.selectorIndex()).offer(((NioOperationFuture)fut0));
+}
+}
+
+/**
  * @param ses Session.
  * @param op Operation.
  * @return Future for operation.
@@ -385,7 +454,8 @@ public class GridNioServer {
 GridSelectorNioSessionImpl impl = (GridSelectorNioSessionImpl)ses;
 
 if (impl.closed())
-return new GridNioFinishedFuture(new IOException("Failed to send 
message (connection was closed): " + ses));
+return new GridNioFinishedFuture(ne

[2/4] incubator-ignite git commit: # Ignite Fixed class names

2014-12-10 Thread sboikov
# Ignite Fixed class names


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

Branch: refs/heads/ignite-21
Commit: 99ee7a70110a4551df335c34b5f4c748518c9bdf
Parents: 20872dc
Author: sboikov 
Authored: Wed Dec 10 13:40:00 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 13:40:00 2014 +0300

--
 .../ignite/spi/deployment/DeploymentSpi.java|  2 +-
 modules/core/src/test/config/tests.properties   |  2 +-
 ...loymentClassLoaderMultiThreadedSelfTest.java |  4 ++--
 .../GridUriDeploymentFileProcessorSelfTest.java |  2 +-
 .../GridUriDeploymentMultiScannersSelfTest.java |  2 +-
 .../file/GridFileDeploymentSelfTest.java| 24 ++--
 .../GridFileDeploymentUndeploySelfTest.java |  4 ++--
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |  2 +-
 .../http/GridHttpDeploymentSelfTest.java|  2 +-
 9 files changed, 22 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99ee7a70/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
 
b/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
index 78b251c..df035de 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/spi/deployment/DeploymentSpi.java
@@ -40,7 +40,7 @@ import org.jetbrains.annotations.*;
  * Gridgain provides the following {@code GridDeploymentSpi} implementations:
  * 
  * {@link org.apache.ignite.spi.deployment.local.LocalDeploymentSpi}
- * {@gglink org.gridgain.grid.spi.deployment.uri.GridUriDeploymentSpi}
+ * {@gglink org.apache.ignite.spi.deployment.uri.GridUriDeploymentSpi}
  * 
  * NOTE: this SPI (i.e. methods in this interface) should never be used 
directly. SPIs provide
  * internal view on the subsystem and is used internally by GridGain kernal. 
In rare use cases when

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99ee7a70/modules/core/src/test/config/tests.properties
--
diff --git a/modules/core/src/test/config/tests.properties 
b/modules/core/src/test/config/tests.properties
index 09d2711..f093d27 100644
--- a/modules/core/src/test/config/tests.properties
+++ b/modules/core/src/test/config/tests.properties
@@ -52,7 +52,7 @@ 
deploy.uri.http=http://216.93.179.140/gridgain/gg-test/deployment/
 # Http scanner URI for secure SSL HTTPs deployment.
 deploy.uri.https=https://216.93.179.140:8445/gridgain/gg-test/deployment/
 # Directory with descriptors to construct GAR files.
-deploy.gar.descriptor.dir=modules/urideploy/src/test/java/org/gridgain/grid/spi/deployment/uri/META-INF
+deploy.gar.descriptor.dir=modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/META-INF
 
 # Directory with a number of descriptors for the Ant gar task.
 ant.gar.descriptor.dir=modules/extdata/p2p/META-INF

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/99ee7a70/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
--
diff --git 
a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
 
b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
index 90c664d..83d483e 100644
--- 
a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
+++ 
b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java
@@ -40,7 +40,7 @@ public class 
GridUriDeploymentClassLoaderMultiThreadedSelfTest extends GridCommo
 multithreaded(
 new Callable() {
 @Nullable @Override public Object call() throws Exception {
-
ldr.loadClass("org.gridgain.grid.spi.deployment.uri.tasks.GridUriDeploymentTestTask0");
+
ldr.loadClass("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0");
 
 return null;
 }
@@ -55,7 +55,7 @@ public class 
GridUriDeploymentClassLoaderMultiThreadedSelfTest extends GridCommo
 multithreaded(
 new Callable() {
 @Nullable @Override public Object call

[1/4] incubator-ignite git commit: master: visor debug reworked

2014-12-10 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-21 dae4b9428 -> ce518b187


master: visor debug reworked


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

Branch: refs/heads/ignite-21
Commit: a0e5f1bb9abdf979b6603927f2deb0db02101ce9
Parents: 20872dc
Author: Yakov Zhdanov 
Authored: Wed Dec 10 12:26:04 2014 +0300
Committer: Yakov Zhdanov 
Committed: Wed Dec 10 12:26:04 2014 +0300

--
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 3 files changed, 88 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a0e5f1bb/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
index 8db90e0..de6d88b 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
@@ -48,8 +47,8 @@ public abstract class VisorMultiNodeTask implements 
ComputeTask job(A arg);
 
 /** {@inheritDoc} */
-@Nullable @Override public Map 
map(List subgrid,
-@Nullable VisorTaskArgument arg) throws GridException {
+@Override public Map 
map(List subgrid, VisorTaskArgument arg)
+throws GridException {
 assert arg != null;
 
 start = U.currentTimeMillis();
@@ -61,13 +60,24 @@ public abstract class VisorMultiNodeTask 
implements ComputeTask map0(List 
subgrid, VisorTaskArgument arg)
+throws GridException {
 Collection nodeIds = arg.nodes();
 
 Map map = U.newHashMap(nodeIds.size());
 
 try {
-taskArg = arg.argument();
-
 for (ClusterNode node : subgrid)
 if (nodeIds.contains(node.id()))
 map.put(job(taskArg), node);
@@ -75,8 +85,7 @@ public abstract class VisorMultiNodeTask implements 
ComputeTask implements 
ComputeTask results) 
throws GridException;
 
 /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a0e5f1bb/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
index 1b5df78..7b3cec1 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
@@ -86,8 +86,17 @@ public class VisorNodeDataCollectorJob extends 
VisorJob endPoints = 
ggfsProc.endpoints(ggfs.name());
+long start0 = U.currentTimeMillis();
 
-if (endPoints != null) {
-for (GridIpcServerEndpoint ep : endPoints)
-if (ep.isManagement())
-res.ggfsEndpoints().add(new 
VisorGgfsEndpoint(ggfs.name(), g.name(),
-ep.getHost(), ep.getPort()));
-}
+try {
+Collection endPoints = 
ggfsProc.endpoints(ggfs.name());
 
-res.ggfss().add(VisorGgfs.from(ggfs));
+if (endPoints != null) {
+for (GridIpcServerEndpoint ep : endPoints)
+if (ep.isManagement())
+res.ggfsEndpoints().add(new 
VisorGgfsEndpoint(ggfs.name(), g.name(),
+ep.getHost(), ep.getPort()));
+}
+
+res.ggfss().add(VisorGgfs.from(ggfs));
+}
+finally {
+if (debug)
+log(g.log(), "Collected GGFS: " + ggfs.name(), 
getClass(), start0);
+}
 }
 }
 catch (Throwable

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

2014-12-10 Thread sboikov
Merge remote-tracking branch 'remotes/origin/master' into ignite-21


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

Branch: refs/heads/ignite-21
Commit: ce518b187e6af490da9e67a91e3d861c0c9f270f
Parents: dae4b94 682e47f
Author: sboikov 
Authored: Wed Dec 10 13:52:44 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 13:52:44 2014 +0300

--
 .../ignite/spi/deployment/DeploymentSpi.java|  2 +-
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 modules/core/src/test/config/tests.properties   |  2 +-
 ...loymentClassLoaderMultiThreadedSelfTest.java |  4 +-
 .../GridUriDeploymentFileProcessorSelfTest.java |  2 +-
 .../GridUriDeploymentMultiScannersSelfTest.java |  2 +-
 .../file/GridFileDeploymentSelfTest.java| 24 
 .../GridFileDeploymentUndeploySelfTest.java |  4 +-
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |  2 +-
 .../http/GridHttpDeploymentSelfTest.java|  2 +-
 12 files changed, 110 insertions(+), 53 deletions(-)
--




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

2014-12-10 Thread sboikov
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/682e47fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/682e47fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/682e47fe

Branch: refs/heads/ignite-21
Commit: 682e47fe205dc19f374130fb5bcd7de545fac275
Parents: 99ee7a7 a0e5f1b
Author: sboikov 
Authored: Wed Dec 10 13:40:52 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 13:40:52 2014 +0300

--
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 3 files changed, 88 insertions(+), 31 deletions(-)
--




incubator-ignite git commit: # Ignite Added initial cache interfaces

2014-12-10 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 682e47fe2 -> a4f69c406


# Ignite Added initial cache interfaces


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

Branch: refs/heads/master
Commit: a4f69c40605b4a4f36e62ef899d19a6392dca8ae
Parents: 682e47f
Author: sboikov 
Authored: Wed Dec 10 14:31:47 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 14:31:47 2014 +0300

--
 .../src/main/java/org/apache/ignite/Ignite.java |  22 +-
 .../java/org/apache/ignite/IgniteCache.java | 300 +++
 .../apache/ignite/cache/CacheConfiguration.java |  23 ++
 .../apache/ignite/cache/CacheEntryEvent.java|  36 +++
 .../java/org/apache/ignite/cache/CacheFlag.java |  68 +
 .../org/apache/ignite/cache/CachePeekMode.java  |  72 +
 .../ignite/cache/eviction/EvictableEntry.java   |  39 +++
 .../cache/query/QueryAffinityPredicate.java | 124 
 .../cache/query/QueryContinuousPredicate.java   | 204 +
 .../apache/ignite/cache/query/QueryCursor.java  |  29 ++
 .../ignite/cache/query/QueryPredicate.java  |  68 +
 .../apache/ignite/cache/query/QueryReducer.java |  22 ++
 .../ignite/cache/query/QuerySqlPredicate.java   | 107 +++
 .../ignite/cache/query/QueryTextPredicate.java  |  79 +
 .../query/annotations/QueryGroupIndex.java  |  50 
 .../cache/query/annotations/QuerySqlField.java  | 125 
 .../query/annotations/QuerySqlFunction.java |  59 
 .../cache/query/annotations/QueryTextField.java |  25 ++
 .../org/gridgain/grid/kernal/GridKernal.java|   5 +
 .../java/org/gridgain/grid/GridSpringBean.java  |   5 +
 20 files changed, 1456 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a4f69c40/modules/core/src/main/java/org/apache/ignite/Ignite.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java 
b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 5cc0b50..94fcce8 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -11,6 +11,7 @@ package org.apache.ignite;
 
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.fs.IgniteFsConfiguration;
 import org.apache.ignite.plugin.*;
 import org.apache.ignite.product.*;
 import org.gridgain.grid.*;
@@ -205,9 +206,9 @@ public interface Ignite extends AutoCloseable {
  * @param  Value type.
  * @param name Cache name.
  * @return Cache instance for given name.
- * @see org.apache.ignite.fs.IgniteFsConfiguration
- * @see org.apache.ignite.fs.IgniteFsConfiguration#getDataCacheName()
- * @see org.apache.ignite.fs.IgniteFsConfiguration#getMetaCacheName()
+ * @see IgniteFsConfiguration
+ * @see IgniteFsConfiguration#getDataCacheName()
+ * @see IgniteFsConfiguration#getMetaCacheName()
  */
 public  GridCache cache(@Nullable String name);
 
@@ -215,14 +216,23 @@ public interface Ignite extends AutoCloseable {
  * Gets all configured caches.
  * Caches that are used as GGFS meta and data caches will not be returned 
in resulting collection.
  *
- * @see org.apache.ignite.fs.IgniteFsConfiguration
- * @see org.apache.ignite.fs.IgniteFsConfiguration#getDataCacheName()
- * @see org.apache.ignite.fs.IgniteFsConfiguration#getMetaCacheName()
+ * @see IgniteFsConfiguration
+ * @see IgniteFsConfiguration#getDataCacheName()
+ * @see IgniteFsConfiguration#getMetaCacheName()
  * @return All configured caches.
  */
 public Collection> caches();
 
 /**
+ * Gets an instance of {@link IgniteCache} API. {@code IgniteCache} is a 
fully-compatible
+ * implementation of {@code JCache (JSR 107)} specification.
+ *
+ * @param name Cache name.
+ * @return Instance of the cache for the specified name.
+ */
+public  GridCache jcache(@Nullable String name);
+
+/**
  * Gets grid transactions facade.
  *
  * @return Grid transactions facade.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a4f69c40/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java 
b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
new file mode 100644
index 000..6a05ce5
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -0,0 +1,300 @@
+

[5/6] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry

2014-12-10 Thread sergi
Merge branch 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry


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

Branch: refs/heads/ignite-qry
Commit: 34115a788357cddbd9afba37f397ff53baf84001
Parents: 2a605d1 a0e5f1b
Author: S.Vladykin 
Authored: Wed Dec 10 12:27:26 2014 +0300
Committer: S.Vladykin 
Committed: Wed Dec 10 12:27:26 2014 +0300

--
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 3 files changed, 88 insertions(+), 31 deletions(-)
--




[2/6] incubator-ignite git commit: # Ignite: fixed class names in xml

2014-12-10 Thread sergi
# Ignite: fixed class names in xml


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

Branch: refs/heads/ignite-qry
Commit: 20872dc75fd248c61a122d1e3e8afd3004a271fe
Parents: d8f9345
Author: sboikov 
Authored: Wed Dec 10 09:17:47 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 09:17:47 2014 +0300

--
 config/hadoop/default-config.xml   | 6 +++---
 .../org/apache/ignite/fs/IgniteFsGroupDataBlocksKeyMapper.java | 2 +-
 .../main/java/org/apache/ignite/fs/mapreduce/IgniteFsTask.java | 2 +-
 ...fsServerManagerIpcEndpointRegistrationAbstractSelfTest.java | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20872dc7/config/hadoop/default-config.xml
--
diff --git a/config/hadoop/default-config.xml b/config/hadoop/default-config.xml
index 6d7d566..70a8d21 100644
--- a/config/hadoop/default-config.xml
+++ b/config/hadoop/default-config.xml
@@ -46,7 +46,7 @@
 
-
+
 
 
 
@@ -64,7 +64,7 @@
 
 
 
-
+
 
 
 
@@ -104,7 +104,7 @@
 -->
 
 
-
+
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20872dc7/modules/core/src/main/java/org/apache/ignite/fs/IgniteFsGroupDataBlocksKeyMapper.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/fs/IgniteFsGroupDataBlocksKeyMapper.java
 
b/modules/core/src/main/java/org/apache/ignite/fs/IgniteFsGroupDataBlocksKeyMapper.java
index 0410c17..777d606 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/fs/IgniteFsGroupDataBlocksKeyMapper.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/fs/IgniteFsGroupDataBlocksKeyMapper.java
@@ -36,7 +36,7 @@ import org.gridgain.grid.util.typedef.internal.*;
  * 
  * ...
  * 
- * 
+ * 
  * 
  * 
  * 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20872dc7/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsTask.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsTask.java 
b/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsTask.java
index c1383bf..32580ab 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsTask.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/fs/mapreduce/IgniteFsTask.java
@@ -29,7 +29,7 @@ import java.util.*;
  * {@link IgniteFsTask#createJob(org.apache.ignite.fs.IgniteFsPath, 
IgniteFsFileRange, IgniteFsTaskArgs)} method.
  * 
  * Each file participating in GGFS task is split into {@link 
IgniteFsFileRange}s first. Normally range is a number of
- * consequent bytes located on a single node (see {@code 
GridGgfsGroupDataBlocksKeyMapper}). In case maximum range size
+ * consequent bytes located on a single node (see {@code 
IgniteFsGroupDataBlocksKeyMapper}). In case maximum range size
  * is provided (either through {@link 
org.apache.ignite.fs.IgniteFsConfiguration#getMaximumTaskRangeLength()} or 
{@code GridGgfs.execute()}
  * argument), then ranges could be further divided into smaller chunks.
  * 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20872dc7/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
 
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
index fbf1148..57bb6a0 100644
--- 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
+++ 
b/modules/core/src/test/

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

2014-12-10 Thread sergi
Merge branches 'ignite-qry' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry


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

Branch: refs/heads/ignite-qry
Commit: 2a605d1ad3cde56b7963c1e50809c6f47ac1e355
Parents: 59204a5 20872dc
Author: S.Vladykin 
Authored: Wed Dec 10 12:07:57 2014 +0300
Committer: S.Vladykin 
Committed: Wed Dec 10 12:07:57 2014 +0300

--
 config/hadoop/default-config.xml|   6 +-
 .../fs/IgniteFsGroupDataBlocksKeyMapper.java|   2 +-
 .../ignite/fs/mapreduce/IgniteFsTask.java   |   2 +-
 .../processors/cache/GridCacheMapEntry.java |  40 --
 .../processors/cache/GridCacheSwapManager.java  |  14 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  32 +
 .../distributed/dht/GridDhtLockFuture.java  |   3 +
 .../distributed/dht/GridDhtLockResponse.java|  12 ++
 .../dht/GridDhtTransactionalCacheAdapter.java   |   2 +
 .../colocated/GridDhtDetachedCacheEntry.java|   5 +
 .../dht/preloader/GridDhtPreloader.java |  10 +-
 .../cache/GridCacheOffheapUpdateSelfTest.java   | 130 +++
 ...IpcEndpointRegistrationAbstractSelfTest.java |   4 +-
 .../bamboo/GridDataGridTestSuite.java   |   1 +
 14 files changed, 235 insertions(+), 28 deletions(-)
--




[4/6] incubator-ignite git commit: master: visor debug reworked

2014-12-10 Thread sergi
master: visor debug reworked


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

Branch: refs/heads/ignite-qry
Commit: a0e5f1bb9abdf979b6603927f2deb0db02101ce9
Parents: 20872dc
Author: Yakov Zhdanov 
Authored: Wed Dec 10 12:26:04 2014 +0300
Committer: Yakov Zhdanov 
Committed: Wed Dec 10 12:26:04 2014 +0300

--
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 3 files changed, 88 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a0e5f1bb/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
index 8db90e0..de6d88b 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorMultiNodeTask.java
@@ -14,7 +14,6 @@ import org.apache.ignite.compute.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
@@ -48,8 +47,8 @@ public abstract class VisorMultiNodeTask implements 
ComputeTask job(A arg);
 
 /** {@inheritDoc} */
-@Nullable @Override public Map 
map(List subgrid,
-@Nullable VisorTaskArgument arg) throws GridException {
+@Override public Map 
map(List subgrid, VisorTaskArgument arg)
+throws GridException {
 assert arg != null;
 
 start = U.currentTimeMillis();
@@ -61,13 +60,24 @@ public abstract class VisorMultiNodeTask 
implements ComputeTask map0(List 
subgrid, VisorTaskArgument arg)
+throws GridException {
 Collection nodeIds = arg.nodes();
 
 Map map = U.newHashMap(nodeIds.size());
 
 try {
-taskArg = arg.argument();
-
 for (ClusterNode node : subgrid)
 if (nodeIds.contains(node.id()))
 map.put(job(taskArg), node);
@@ -75,8 +85,7 @@ public abstract class VisorMultiNodeTask implements 
ComputeTask implements 
ComputeTask results) 
throws GridException;
 
 /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a0e5f1bb/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
index 1b5df78..7b3cec1 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/node/VisorNodeDataCollectorJob.java
@@ -86,8 +86,17 @@ public class VisorNodeDataCollectorJob extends 
VisorJob endPoints = 
ggfsProc.endpoints(ggfs.name());
+long start0 = U.currentTimeMillis();
 
-if (endPoints != null) {
-for (GridIpcServerEndpoint ep : endPoints)
-if (ep.isManagement())
-res.ggfsEndpoints().add(new 
VisorGgfsEndpoint(ggfs.name(), g.name(),
-ep.getHost(), ep.getPort()));
-}
+try {
+Collection endPoints = 
ggfsProc.endpoints(ggfs.name());
 
-res.ggfss().add(VisorGgfs.from(ggfs));
+if (endPoints != null) {
+for (GridIpcServerEndpoint ep : endPoints)
+if (ep.isManagement())
+res.ggfsEndpoints().add(new 
VisorGgfsEndpoint(ggfs.name(), g.name(),
+ep.getHost(), ep.getPort()));
+}
+
+res.ggfss().add(VisorGgfs.from(ggfs));
+}
+finally {
+if (debug)
+log(g.log(), "Collected GGFS: " + ggfs.name(), 
getClass(), start0);
+}
 }
 }
 catch (Throwable ggfssEx) {
@@ -124,8 +141,17 @@ public class VisorNodeDataCollectorJob extends 
VisorJobhttp:

[1/6] incubator-ignite git commit: Ignite - Porting GG-9476 to Ignite branch.

2014-12-10 Thread sergi
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-qry 59204a517 -> 73b5ef6b0


Ignite - Porting GG-9476 to Ignite branch.


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

Branch: refs/heads/ignite-qry
Commit: d8f93450062e83e19bb8c83357a2cb7d6c85f170
Parents: 06fbf57
Author: Alexey Goncharuk 
Authored: Tue Dec 9 16:23:11 2014 -0800
Committer: Alexey Goncharuk 
Committed: Tue Dec 9 16:23:11 2014 -0800

--
 .../processors/cache/GridCacheMapEntry.java |  40 --
 .../processors/cache/GridCacheSwapManager.java  |  14 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  32 +
 .../distributed/dht/GridDhtLockFuture.java  |   3 +
 .../distributed/dht/GridDhtLockResponse.java|  12 ++
 .../dht/GridDhtTransactionalCacheAdapter.java   |   2 +
 .../colocated/GridDhtDetachedCacheEntry.java|   5 +
 .../dht/preloader/GridDhtPreloader.java |  10 +-
 .../cache/GridCacheOffheapUpdateSelfTest.java   | 130 +++
 .../bamboo/GridDataGridTestSuite.java   |   1 +
 10 files changed, 228 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8f93450/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
index 8427dbe..c2846f2 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMapEntry.java
@@ -205,6 +205,8 @@ public abstract class GridCacheMapEntry implements 
GridCacheEntryEx
 if (!isOffHeapValuesOnly()) {
 this.val = val;
 this.valBytes = isStoreValueBytes() ? valBytes : null;
+
+valPtr = 0;
 }
 else {
 try {
@@ -271,6 +273,14 @@ public abstract class GridCacheMapEntry implements 
GridCacheEntryEx
 if (!isOffHeapValuesOnly()) {
 if (valBytes != null)
 return GridCacheValueBytes.marshaled(valBytes);
+
+try {
+if (valPtr != 0 && cctx.offheapTiered())
+return offheapValueBytes();
+}
+catch (GridException e) {
+throw new GridRuntimeException(e);
+}
 }
 else {
 if (valPtr != 0) {
@@ -509,6 +519,10 @@ public abstract class GridCacheMapEntry implements 
GridCacheEntryEx
 // Set unswapped value.
 update(val, e.valueBytes(), e.expireTime(), e.ttl(), 
e.version());
 
+// Must update valPtr again since update() will reset 
it.
+if (cctx.offheapTiered() && e.offheapPointer() > 0)
+valPtr = e.offheapPointer();
+
 return val;
 }
 else
@@ -524,16 +538,15 @@ public abstract class GridCacheMapEntry implements 
GridCacheEntryEx
  * @throws GridException If failed.
  */
 private void swap() throws GridException {
-if (cctx.isSwapOrOffheapEnabled() && !deletedUnlocked() && 
hasValueUnlocked()) {
+if (cctx.isSwapOrOffheapEnabled() && !deletedUnlocked() && 
hasValueUnlocked() && !detached()) {
 assert Thread.holdsLock(this);
 
 long expireTime = expireTimeExtras();
 
 if (expireTime > 0 && U.currentTimeMillis() >= expireTime) { // 
Don't swap entry if it's expired.
-if (cctx.offheapTiered() && valPtr > 0) {
-boolean rmv = cctx.swap().removeOffheap(key, 
getOrMarshalKeyBytes());
-
-assert rmv;
+// Entry might have been updated.
+if (cctx.offheapTiered()) {
+cctx.swap().removeOffheap(key, getOrMarshalKeyBytes());
 
 valPtr = 0;
 }
@@ -939,9 +952,14 @@ public abstract class GridCacheMapEntry implements 
GridCacheEntryEx
 // Update indexes before actual write to entry.
 updateIndex(ret, null, expTime, nextVer, prevVal);
 
+boolean hadValPtr = valPtr != 0;
+
 // Don't change version for read-through.
 update(ret, null, expTime, ttl, nextVer);
 
+if (hadValPtr && cctx.offheap

[6/6] incubator-ignite git commit: ignite-qry - spring

2014-12-10 Thread sergi
ignite-qry - spring


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

Branch: refs/heads/ignite-qry
Commit: 73b5ef6b040c0a9805d939bef2effba767181c66
Parents: 34115a7
Author: S.Vladykin 
Authored: Wed Dec 10 15:17:11 2014 +0300
Committer: S.Vladykin 
Committed: Wed Dec 10 15:17:11 2014 +0300

--
 examples/config/example-cache.xml   | 17 +++
 .../clients/src/test/resources/spring-cache.xml | 29 +++
 .../configuration/IgniteConfiguration.java  |  8 +--
 .../ignite/spi/indexing/GridIndexingSpi.java|  4 +-
 .../grid/cache/query/GridCacheQuery.java|  6 +--
 .../cache/query/GridCacheQuerySqlField.java |  2 +-
 .../cache/query/GridCacheQuerySqlFunction.java  |  4 +-
 .../loadtests/colocation/spring-colocation.xml  | 13 -
 .../core/src/test/webapp/META-INF/gg-config.xml | 53 
 .../processors/query/h2/GridH2Indexing.java |  2 +-
 .../test/resources/spring-ping-pong-partner.xml | 21 
 11 files changed, 60 insertions(+), 99 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/73b5ef6b/examples/config/example-cache.xml
--
diff --git a/examples/config/example-cache.xml 
b/examples/config/example-cache.xml
index 6e95de4..b3b6877 100644
--- a/examples/config/example-cache.xml
+++ b/examples/config/example-cache.xml
@@ -191,15 +191,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
 
 
 
@@ -215,5 +206,13 @@
 
 
 
+
+
+
+
+
+
+
+
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/73b5ef6b/modules/clients/src/test/resources/spring-cache.xml
--
diff --git a/modules/clients/src/test/resources/spring-cache.xml 
b/modules/clients/src/test/resources/spring-cache.xml
index ba89926..c63e8ec 100644
--- a/modules/clients/src/test/resources/spring-cache.xml
+++ b/modules/clients/src/test/resources/spring-cache.xml
@@ -41,27 +41,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
@@ -105,6 +84,14 @@
 -->
 
 
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/73b5ef6b/modules/core/src/test/webapp/META-INF/gg-config.xml
--
diff --git a/modules/core/src/test/webapp/META-INF/gg-config.xml 
b/modules/core/src/test/webapp/META-INF/gg-config.xml
index b0f0af8..1f60c3e 100644
--- a/modules/core/src/test/webapp/META-INF/gg-config.xml
+++ b/modules/core/src/test/webapp/META-INF/gg-config.xml
@@ -72,27 +72,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
 
+
+
+
+
+
+
+
+
 
 
 
+
+
+
+
+
+
+
+
 
 
+
+
+
+
+
+
+
+
 
 
 
 
+
+
+
+
+
+
+
+
 
 
 

http://git-wip-us.apache.org/repos/

incubator-ignite git commit: # Ignite Added initial cache interfaces

2014-12-10 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master a4f69c406 -> 3b41e6205


# Ignite Added initial cache interfaces


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

Branch: refs/heads/master
Commit: 3b41e62050d368a211fd7f579a14aac8137d6282
Parents: a4f69c4
Author: sboikov 
Authored: Wed Dec 10 15:24:58 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 15:24:58 2014 +0300

--
 modules/core/src/main/java/org/apache/ignite/Ignite.java   | 2 +-
 .../core/src/main/java/org/gridgain/grid/kernal/GridKernal.java| 2 +-
 modules/spring/src/main/java/org/gridgain/grid/GridSpringBean.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3b41e620/modules/core/src/main/java/org/apache/ignite/Ignite.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java 
b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 94fcce8..d53e8a3 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -230,7 +230,7 @@ public interface Ignite extends AutoCloseable {
  * @param name Cache name.
  * @return Instance of the cache for the specified name.
  */
-public  GridCache jcache(@Nullable String name);
+public  IgniteCache jcache(@Nullable String name);
 
 /**
  * Gets grid transactions facade.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3b41e620/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java 
b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
index bdc80b9..0741240 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
@@ -2926,7 +2926,7 @@ public class GridKernal extends ClusterGroupAdapter 
implements GridEx, IgniteMBe
 }
 
 /** {@inheritDoc} */
-@Override public  GridCache jcache(@Nullable String name) {
+@Override public  IgniteCache jcache(@Nullable String name) {
 throw new UnsupportedOperationException();
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3b41e620/modules/spring/src/main/java/org/gridgain/grid/GridSpringBean.java
--
diff --git a/modules/spring/src/main/java/org/gridgain/grid/GridSpringBean.java 
b/modules/spring/src/main/java/org/gridgain/grid/GridSpringBean.java
index 370f542..e9dc2fe 100644
--- a/modules/spring/src/main/java/org/gridgain/grid/GridSpringBean.java
+++ b/modules/spring/src/main/java/org/gridgain/grid/GridSpringBean.java
@@ -257,7 +257,7 @@ public class GridSpringBean extends 
GridMetadataAwareAdapter implements Ignite,
 }
 
 /** {@inheritDoc} */
-@Override public  GridCache jcache(@Nullable String name) {
+@Override public  IgniteCache jcache(@Nullable String name) {
 throw new UnsupportedOperationException();
 }
 



incubator-ignite git commit: # Ignite temporary disabled javadoc check.

2014-12-10 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 3b41e6205 -> 7f6fdca44


# Ignite temporary disabled javadoc check.


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

Branch: refs/heads/master
Commit: 7f6fdca445a7423d1170eade56d2b52462249c3f
Parents: 3b41e62
Author: sboikov 
Authored: Wed Dec 10 16:05:50 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 16:05:50 2014 +0300

--
 pom.xml | 34 ++
 1 file changed, 18 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f6fdca4/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 9fbf986..72f667e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1093,22 +1093,24 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 

+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 



incubator-ignite git commit: # ignite-1

2014-12-10 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1 [created] f0773f5dc


# ignite-1


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

Branch: refs/heads/ignite-1
Commit: f0773f5dc9d163921d9ce1f55378e202974b6f53
Parents: a4f69c4
Author: sboikov 
Authored: Wed Dec 10 15:23:53 2014 +0300
Committer: sboikov 
Committed: Wed Dec 10 16:45:34 2014 +0300

--
 .../src/main/java/org/apache/ignite/Ignite.java |   2 +-
 .../java/org/apache/ignite/IgniteCache.java |   4 +-
 .../processors/cache/IgniteCacheProxy.java  | 589 +++
 .../org/gridgain/grid/kernal/GridKernal.java|  17 +-
 .../processors/cache/GridCacheProcessor.java|  23 +
 .../processors/cache/IgniteCacheTest.java   | 115 
 .../bamboo/GridDataGridTestSuite.java   |   3 +
 .../java/org/gridgain/grid/GridSpringBean.java  |   6 +-
 8 files changed, 752 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0773f5d/modules/core/src/main/java/org/apache/ignite/Ignite.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java 
b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 94fcce8..d53e8a3 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -230,7 +230,7 @@ public interface Ignite extends AutoCloseable {
  * @param name Cache name.
  * @return Instance of the cache for the specified name.
  */
-public  GridCache jcache(@Nullable String name);
+public  IgniteCache jcache(@Nullable String name);
 
 /**
  * Gets grid transactions facade.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0773f5d/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java 
b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 6a05ce5..0b513ba 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -170,7 +170,7 @@ public interface IgniteCache extends 
javax.cache.Cache, IgniteAsyncS
 
 public Lock lock(K key) throws CacheException;
 
-public Lock lockAll(Set keys) throws CacheException;
+public Lock lockAll(Set keys) throws CacheException;
 
 /**
  * Checks if any node owns a lock for this key.
@@ -241,7 +241,7 @@ public interface IgniteCache extends 
javax.cache.Cache, IgniteAsyncS
  * @return Peeked value.
  * @throws NullPointerException If key is {@code null}.
  */
-@Nullable public V localPeek(K key, GridCachePeekMode... peekModes);
+@Nullable public V localPeek(K key, CachePeekMode... peekModes);
 
 /**
  * This method unswaps cache entries by given keys, if any, from swap 
storage

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0773f5d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
new file mode 100644
index 000..044f433
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -0,0 +1,589 @@
+/* @java.file.header */
+
+/*  __ ___
+ *  __  /___(_)__  /__  /__ (_)___
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.lang.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.util.tostring.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import javax.cache.*;
+import javax.cache.configuration.*;
+import javax.cache.expiry.*;
+import javax.cache.integration.*;
+import javax.cache.processor.*;
+import java.io.*;
+import java.ut

[3/3] incubator-ignite git commit: Merged from master

2014-12-10 Thread vkulichenko
Merged from 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/b9ba2bb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b9ba2bb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b9ba2bb7

Branch: refs/heads/ignite-9469
Commit: b9ba2bb7c19eaf3291ed09ff8dce59b98ea532e5
Parents: 027ff7f
Author: Valentin Kulichenko 
Authored: Wed Dec 10 17:58:44 2014 +0300
Committer: Valentin Kulichenko 
Committed: Wed Dec 10 17:58:44 2014 +0300

--
 .../core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b9ba2bb7/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java 
b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java
index fcbd13e..e7e35cf 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java
@@ -9,7 +9,6 @@
 
 package org.gridgain.grid.kernal.visor;
 
-import org.apache.ignite.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;



[1/3] incubator-ignite git commit: GG-9469 - Portable mode in store

2014-12-10 Thread vkulichenko
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-9469 [created] b9ba2bb7c


GG-9469 - Portable mode in store


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

Branch: refs/heads/ignite-9469
Commit: 641a7488f1c0939b94ff6ec5877021e48e9eb4dd
Parents: 984373d
Author: Valentin Kulichenko 
Authored: Wed Dec 10 17:56:23 2014 +0300
Committer: Valentin Kulichenko 
Committed: Wed Dec 10 17:56:23 2014 +0300

--
 .../grid/cache/GridCacheConfiguration.java  |  40 ++
 .../grid/cache/store/GridCacheStore.java|  23 ++-
 .../processors/cache/GridCacheAdapter.java  |  36 ++---
 .../processors/cache/GridCacheContext.java  |  50 ---
 .../processors/cache/GridCacheProcessor.java|  10 +-
 .../processors/cache/GridCacheStoreManager.java | 143 ++-
 .../cache/GridCacheTxLocalAdapter.java  |  17 ++-
 .../cache/GridCacheWriteBehindStore.java|   5 +
 .../cache/distributed/dht/GridDhtGetFuture.java |   2 +-
 .../dht/GridPartitionedGetFuture.java   |  18 +--
 .../dht/atomic/GridDhtAtomicCache.java  |   9 +-
 .../dht/colocated/GridDhtColocatedCache.java|  11 +-
 .../distributed/near/GridNearGetFuture.java |  13 +-
 .../processors/interop/GridInteropAware.java|   7 +
 .../dataload/GridDataLoaderImplSelfTest.java|  96 +
 15 files changed, 268 insertions(+), 212 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/641a7488/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
 
b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
index f2c5682..07d1628 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
@@ -336,6 +336,9 @@ public class GridCacheConfiguration {
 /** */
 private boolean portableEnabled;
 
+/** */
+private boolean keepPortableInStore = true;
+
 /** Query configuration. */
 private GridCacheQueryConfiguration qryCfg;
 
@@ -379,6 +382,7 @@ public class GridCacheConfiguration {
 indexingSpiName = cc.getIndexingSpiName();
 interceptor = cc.getInterceptor();
 invalidate = cc.isInvalidate();
+keepPortableInStore = cc.isKeepPortableInStore();
 offHeapMaxMem = cc.getOffHeapMaxMemory();
 maxConcurrentAsyncOps = cc.getMaxConcurrentAsyncOperations();
 maxQryIterCnt = cc.getMaximumQueryIteratorCount();
@@ -1757,6 +1761,42 @@ public class GridCacheConfiguration {
 }
 
 /**
+ * Flag indicating that {@link GridCacheStore} implementation
+ * is working with portable objects instead of Java objects
+ * if portable mode for this cache is enabled ({@link #isPortableEnabled()}
+ * flag is {@code true}). Default value of this flag is {@code true},
+ * because this is recommended behavior from performance standpoint.
+ * 
+ * If set to {@code false}, GridGain will deserialize keys and
+ * values stored in portable format before they are passed
+ * to cache store.
+ * 
+ * Note that setting this flag to {@code false} can simplify
+ * store implementation in some cases, but it can cause performance
+ * degradation due to additional serializations and deserializations
+ * of portable objects. You will also need to have key and value
+ * classes on all nodes since portables will be deserialized when
+ * store is called.
+ * 
+ * This flag is ignored if portable mode is disabled for this
+ * cache ({@link #isPortableEnabled()} flag is {@code false}).
+ *
+ * @return Keep portables in store flag.
+ */
+public boolean isKeepPortableInStore() {
+return keepPortableInStore;
+}
+
+/**
+ * Sets keep portables in store flag.
+ *
+ * @param keepPortableInStore Keep portables in store flag.
+ */
+public void setKeepPortableInStore(boolean keepPortableInStore) {
+this.keepPortableInStore = keepPortableInStore;
+}
+
+/**
  * Gets query configuration. Query configuration defines which fields 
should be indexed for objects
  * without annotations or portable objects.
  *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/641a7488/modules/core/src/main/java/org/gridgain/grid/cache/store/GridCacheStore.java

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

2014-12-10 Thread vkulichenko
Merge remote-tracking branch 'origin/master' into ignite-9469

Conflicts:

modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java


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

Branch: refs/heads/ignite-9469
Commit: 027ff7f570937aade9f9c6037705b622368c1cac
Parents: 641a748 7f6fdca
Author: Valentin Kulichenko 
Authored: Wed Dec 10 17:58:20 2014 +0300
Committer: Valentin Kulichenko 
Committed: Wed Dec 10 17:58:20 2014 +0300

--
 config/hadoop/default-config.xml|   6 +-
 .../aop/aspectj/GridifyAspectJAspect.java   |   2 +-
 .../aspectj/GridifySetToSetAspectJAspect.java   |   2 +-
 .../aspectj/GridifySetToValueAspectJAspect.java |   2 +-
 .../test/config/aop/aspectj/META-INF/aop.xml|   4 +-
 .../grid/gridify/GridAbstractAopTest.java   |   2 +-
 .../grid/gridify/GridNonSpringAopSelfTest.java  |   2 +-
 .../src/main/java/org/apache/ignite/Ignite.java |  22 +-
 .../java/org/apache/ignite/IgniteCache.java | 300 +++
 .../apache/ignite/cache/CacheConfiguration.java |  23 ++
 .../apache/ignite/cache/CacheEntryEvent.java|  36 +++
 .../java/org/apache/ignite/cache/CacheFlag.java |  68 +
 .../org/apache/ignite/cache/CachePeekMode.java  |  72 +
 .../ignite/cache/eviction/EvictableEntry.java   |  39 +++
 .../cache/query/QueryAffinityPredicate.java | 124 
 .../cache/query/QueryContinuousPredicate.java   | 204 +
 .../apache/ignite/cache/query/QueryCursor.java  |  29 ++
 .../ignite/cache/query/QueryPredicate.java  |  68 +
 .../apache/ignite/cache/query/QueryReducer.java |  22 ++
 .../ignite/cache/query/QuerySqlPredicate.java   | 107 +++
 .../ignite/cache/query/QueryTextPredicate.java  |  79 +
 .../query/annotations/QueryGroupIndex.java  |  50 
 .../cache/query/annotations/QuerySqlField.java  | 125 
 .../query/annotations/QuerySqlFunction.java |  59 
 .../cache/query/annotations/QueryTextField.java |  25 ++
 .../ignite/compute/ComputeJobAfterSend.java |   2 +-
 .../compute/ComputeJobBeforeFailover.java   |   2 +-
 .../compute/ComputeJobContinuationAdapter.java  |   2 +-
 .../ignite/compute/ComputeLoadBalancer.java |   6 +-
 .../org/apache/ignite/compute/ComputeTask.java  |   4 +-
 .../ignite/compute/ComputeTaskAdapter.java  |   2 +-
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../fs/IgniteFsGroupDataBlocksKeyMapper.java|   2 +-
 .../ignite/fs/mapreduce/IgniteFsTask.java   |   2 +-
 .../ignite/marshaller/IgniteMarshaller.java |   4 +-
 .../marshaller/jdk/IgniteJdkMarshaller.java |   4 +-
 .../optimized/IgniteOptimizedMarshaller.java|   4 +-
 .../IgniteExecutorServiceResource.java  |   4 +-
 .../ignite/resources/IgniteHomeResource.java|   4 +-
 .../resources/IgniteInstanceResource.java   |   4 +-
 .../resources/IgniteJobContextResource.java |   4 +-
 .../resources/IgniteLocalHostResource.java  |   4 +-
 .../resources/IgniteLocalNodeIdResource.java|   4 +-
 .../ignite/resources/IgniteLoggerResource.java  |   4 +-
 .../resources/IgniteMBeanServerResource.java|   4 +-
 .../resources/IgniteMarshallerResource.java |   4 +-
 .../ignite/resources/IgniteNameResource.java|   4 +-
 .../ignite/resources/IgniteServiceResource.java |   4 +-
 .../IgniteSpringApplicationContextResource.java |   4 +-
 .../ignite/resources/IgniteSpringResource.java  |   4 +-
 .../IgniteTaskContinuousMapperResource.java |   4 +-
 .../resources/IgniteTaskSessionResource.java|   4 +-
 .../ignite/resources/IgniteUserResource.java|   4 +-
 .../PriorityQueueCollisionSpi.java  |   8 +-
 .../ignite/spi/deployment/DeploymentSpi.java|   2 +-
 .../spi/loadbalancing/LoadBalancingSpi.java |   6 +-
 .../adaptive/AdaptiveLoadBalancingSpi.java  |   4 +-
 .../roundrobin/RoundRobinLoadBalancingSpi.java  |   4 +-
 .../WeightedRandomLoadBalancingSpi.java |   4 +-
 .../org/gridgain/grid/kernal/GridKernal.java|   5 +
 .../deployment/GridDeploymentClassLoader.java   |   4 +-
 .../processors/cache/GridCacheAdapter.java  |   7 +
 .../processors/cache/GridCacheMapEntry.java |  40 ++-
 .../processors/cache/GridCacheMvccManager.java  |  31 +-
 .../processors/cache/GridCacheSwapManager.java  |  14 +-
 .../processors/cache/GridCacheTxAdapter.java|  14 +-
 .../processors/cache/GridCacheTxHandler.java|   4 +-
 .../cache/GridCacheTxLocalAdapter.java  |   5 +-
 .../processors/cache/GridCacheTxManager.java|   7 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  32 ++
 .../distributed/dht/GridDhtLockFuture.java  |   3 +
 .../distributed/dht

[06/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridLuceneIndex.java
--
diff --git 
a/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridLuceneIndex.java
 
b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridLuceneIndex.java
new file mode 100644
index 000..dd2a29e
--- /dev/null
+++ 
b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridLuceneIndex.java
@@ -0,0 +1,384 @@
+/* @java.file.header */
+
+/*  __ ___
+ *  __  /___(_)__  /__  /__ (_)___
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.query.h2.opt;
+
+import org.apache.commons.codec.binary.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.*;
+import org.apache.ignite.spi.indexing.*;
+import org.apache.lucene.analysis.standard.*;
+import org.apache.lucene.document.*;
+import org.apache.lucene.index.*;
+import org.apache.lucene.queryParser.*;
+import org.apache.lucene.search.*;
+import org.apache.lucene.util.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.kernal.processors.query.*;
+import org.gridgain.grid.util.*;
+import org.gridgain.grid.util.lang.*;
+import org.gridgain.grid.util.offheap.unsafe.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+import static org.gridgain.grid.kernal.processors.query.h2.GridH2Indexing.*;
+
+/**
+ * Lucene fulltext index.
+ */
+public class GridLuceneIndex implements Closeable {
+/** Field name for string representation of value. */
+public static final String VAL_STR_FIELD_NAME = "_gg_val_str__";
+
+/** Field name for value version. */
+public static final String VER_FIELD_NAME = "_gg_ver__";
+
+/** Field name for value expiration time. */
+public static final String EXPIRATION_TIME_FIELD_NAME = "_gg_expires__";
+
+/** */
+private final IgniteMarshaller marshaller;
+
+/** */
+private final String spaceName;
+
+/** */
+private final GridQueryTypeDescriptor type;
+
+/** */
+private final IndexWriter writer;
+
+/** */
+private final String[] idxdFields;
+
+/** */
+private final boolean storeVal;
+
+/** */
+private final BitSet keyFields = new BitSet();
+
+/** */
+private final AtomicLong updateCntr = new GridAtomicLong();
+
+/** */
+private final GridLuceneDirectory dir;
+
+/**
+ * Constructor.
+ *
+ * @param marshaller Indexing marshaller.
+ * @param mem Unsafe memory.
+ * @param spaceName Space name.
+ * @param type Type descriptor.
+ * @param storeVal Store value in index.
+ * @throws GridException If failed.
+ */
+public GridLuceneIndex(IgniteMarshaller marshaller, @Nullable 
GridUnsafeMemory mem,
+@Nullable String spaceName, GridQueryTypeDescriptor type, boolean 
storeVal) throws GridException {
+this.marshaller = marshaller;
+this.spaceName = spaceName;
+this.type = type;
+this.storeVal = storeVal;
+
+dir = new GridLuceneDirectory(mem == null ? new GridUnsafeMemory(0) : 
mem);
+
+try {
+writer = new IndexWriter(dir, new 
IndexWriterConfig(Version.LUCENE_30, new StandardAnalyzer(
+Version.LUCENE_30)));
+}
+catch (IOException e) {
+throw new GridException(e);
+}
+
+GridQueryIndexDescriptor idx = null;
+
+for (GridQueryIndexDescriptor descriptor : type.indexes().values()) {
+if (descriptor.type() == GridQueryIndexType.FULLTEXT) {
+idx = descriptor;
+
+break;
+}
+}
+
+if (idx != null) {
+Collection fields = idx.fields();
+
+idxdFields = new String[fields.size() + 1];
+
+fields.toArray(idxdFields);
+
+for (int i = 0, len = fields.size() ; i < len; i++)
+keyFields.set(i, type.keyFields().containsKey(idxdFields[i]));
+}
+else {
+assert type.valueTextIndex() || type.valueClass() == String.class;
+
+idxdFields = new String[1];
+}
+
+idxdFields[idxdFields.length - 1] = VAL_STR_FIELD_NAME;
+}
+
+/**
+ * Stores given data in this fulltext index.
+ *
+ * @param key Key.
+ * @param val Value.
+ * @param ver Version.
+ * @param expires Expiration time.
+ * @throws GridException If failed.
+ */
+public void store(Object

[13/17] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry

2014-12-10 Thread sergi
Merge branch 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry


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

Branch: refs/heads/master
Commit: 59204a517bca1678ebfb06e1aa6267193f08e10b
Parents: 922a2ba 06fbf57
Author: S.Vladykin 
Authored: Tue Dec 9 19:32:26 2014 +0300
Committer: S.Vladykin 
Committed: Tue Dec 9 19:32:26 2014 +0300

--
 .../aop/aspectj/GridifyAspectJAspect.java   |   2 +-
 .../aspectj/GridifySetToSetAspectJAspect.java   |   2 +-
 .../aspectj/GridifySetToValueAspectJAspect.java |   2 +-
 .../test/config/aop/aspectj/META-INF/aop.xml|   4 +-
 .../grid/gridify/GridAbstractAopTest.java   |   2 +-
 .../grid/gridify/GridNonSpringAopSelfTest.java  |   2 +-
 .../ignite/compute/ComputeJobAfterSend.java |   2 +-
 .../compute/ComputeJobBeforeFailover.java   |   2 +-
 .../compute/ComputeJobContinuationAdapter.java  |   2 +-
 .../ignite/compute/ComputeLoadBalancer.java |   6 +-
 .../org/apache/ignite/compute/ComputeTask.java  |   4 +-
 .../ignite/compute/ComputeTaskAdapter.java  |   2 +-
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../ignite/marshaller/IgniteMarshaller.java |   4 +-
 .../marshaller/jdk/IgniteJdkMarshaller.java |   4 +-
 .../optimized/IgniteOptimizedMarshaller.java|   4 +-
 .../IgniteExecutorServiceResource.java  |   4 +-
 .../ignite/resources/IgniteHomeResource.java|   4 +-
 .../resources/IgniteInstanceResource.java   |   4 +-
 .../resources/IgniteJobContextResource.java |   4 +-
 .../resources/IgniteLocalHostResource.java  |   4 +-
 .../resources/IgniteLocalNodeIdResource.java|   4 +-
 .../ignite/resources/IgniteLoggerResource.java  |   4 +-
 .../resources/IgniteMBeanServerResource.java|   4 +-
 .../resources/IgniteMarshallerResource.java |   4 +-
 .../ignite/resources/IgniteNameResource.java|   4 +-
 .../ignite/resources/IgniteServiceResource.java |   4 +-
 .../IgniteSpringApplicationContextResource.java |   4 +-
 .../ignite/resources/IgniteSpringResource.java  |   4 +-
 .../IgniteTaskContinuousMapperResource.java |   4 +-
 .../resources/IgniteTaskSessionResource.java|   4 +-
 .../ignite/resources/IgniteUserResource.java|   4 +-
 .../PriorityQueueCollisionSpi.java  |   8 +-
 .../spi/loadbalancing/LoadBalancingSpi.java |   6 +-
 .../adaptive/AdaptiveLoadBalancingSpi.java  |   4 +-
 .../roundrobin/RoundRobinLoadBalancingSpi.java  |   4 +-
 .../WeightedRandomLoadBalancingSpi.java |   4 +-
 .../deployment/GridDeploymentClassLoader.java   |   4 +-
 .../processors/cache/GridCacheAdapter.java  |   7 +-
 .../processors/cache/GridCacheMvccManager.java  |  31 ++-
 .../processors/cache/GridCacheTxAdapter.java|  14 +-
 .../processors/cache/GridCacheTxHandler.java|   4 +-
 .../cache/GridCacheTxLocalAdapter.java  |   5 +-
 .../processors/cache/GridCacheTxManager.java|   7 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   |   1 +
 .../cache/distributed/dht/GridDhtTxLocal.java   |   2 +
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   5 +-
 .../cache/distributed/near/GridNearTxLocal.java |   4 +-
 .../processors/cache/local/GridLocalTx.java |   4 +-
 .../transactions/IgniteTransactionsImpl.java|   8 +
 .../gridgain/grid/kernal/visor/VisorJob.java|  27 +-
 .../grid/kernal/visor/VisorMultiNodeTask.java   |  51 +++-
 .../grid/kernal/visor/VisorOneNodeTask.java |   2 +-
 .../grid/kernal/visor/VisorTaskArgument.java|  29 ++-
 .../kernal/visor/cache/VisorCacheClearTask.java |   7 +-
 .../visor/cache/VisorCacheCompactTask.java  |  13 +-
 .../kernal/visor/cache/VisorCacheLoadTask.java  |   7 +-
 .../visor/cache/VisorCacheMetadataTask.java |   7 +-
 .../cache/VisorCacheMetricsCollectorTask.java   |   9 +-
 .../visor/cache/VisorCachePreloadTask.java  |   7 +-
 .../visor/cache/VisorCacheResetMetricsTask.java |   7 +-
 .../visor/cache/VisorCacheSwapBackupsTask.java  |   7 +-
 .../compute/VisorComputeCancelSessionsTask.java |   9 +-
 .../compute/VisorComputeResetMetricsTask.java   |   7 +-
 .../VisorComputeToggleMonitoringTask.java   |  17 +-
 .../kernal/visor/debug/VisorThreadDumpTask.java |   7 +-
 .../kernal/visor/file/VisorFileBlockTask.java   |   7 +-
 .../visor/file/VisorLatestTextFilesTask.java|   7 +-
 .../kernal/visor/ggfs/VisorGgfsFormatTask.java  |   7 +-
 .../visor/ggfs/VisorGgfsProfilerClearTask.java  |   7 +-
 .../visor/ggfs/VisorGgfsProfilerTask.java   |  13 +-
 .../visor/ggfs/VisorGgfsResetMetricsTask.java   |   7 +-
 .../visor/ggfs/VisorGgfsSamplingStateTask.java  |   7 +-
 .../kernal/visor/log/VisorLogSearchTask.java|  12 +-
 .../g

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

2014-12-10 Thread sergi
Merge branches 'ignite-qry' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite


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

Branch: refs/heads/master
Commit: 7b13de91745a1c3f95715a4724a325421c16d8e7
Parents: 73b5ef6 7f6fdca
Author: S.Vladykin 
Authored: Wed Dec 10 18:58:03 2014 +0300
Committer: S.Vladykin 
Committed: Wed Dec 10 18:58:03 2014 +0300

--
 .../src/main/java/org/apache/ignite/Ignite.java |  22 +-
 .../java/org/apache/ignite/IgniteCache.java | 300 +++
 .../apache/ignite/cache/CacheConfiguration.java |  23 ++
 .../apache/ignite/cache/CacheEntryEvent.java|  36 +++
 .../java/org/apache/ignite/cache/CacheFlag.java |  68 +
 .../org/apache/ignite/cache/CachePeekMode.java  |  72 +
 .../ignite/cache/eviction/EvictableEntry.java   |  39 +++
 .../cache/query/QueryAffinityPredicate.java | 124 
 .../cache/query/QueryContinuousPredicate.java   | 204 +
 .../apache/ignite/cache/query/QueryCursor.java  |  29 ++
 .../ignite/cache/query/QueryPredicate.java  |  68 +
 .../apache/ignite/cache/query/QueryReducer.java |  22 ++
 .../ignite/cache/query/QuerySqlPredicate.java   | 107 +++
 .../ignite/cache/query/QueryTextPredicate.java  |  79 +
 .../query/annotations/QueryGroupIndex.java  |  50 
 .../cache/query/annotations/QuerySqlField.java  | 125 
 .../query/annotations/QuerySqlFunction.java |  59 
 .../cache/query/annotations/QueryTextField.java |  25 ++
 .../ignite/spi/deployment/DeploymentSpi.java|   2 +-
 .../org/gridgain/grid/kernal/GridKernal.java|   5 +
 modules/core/src/test/config/tests.properties   |   2 +-
 .../java/org/gridgain/grid/GridSpringBean.java  |   5 +
 ...loymentClassLoaderMultiThreadedSelfTest.java |   4 +-
 .../GridUriDeploymentFileProcessorSelfTest.java |   2 +-
 .../GridUriDeploymentMultiScannersSelfTest.java |   2 +-
 .../file/GridFileDeploymentSelfTest.java|  24 +-
 .../GridFileDeploymentUndeploySelfTest.java |   4 +-
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |   2 +-
 .../http/GridHttpDeploymentSelfTest.java|   2 +-
 pom.xml |  34 ++-
 30 files changed, 1496 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b13de91/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java
--



[10/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
index d221c47..dbb2665 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
@@ -21,10 +21,10 @@ import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.managers.eventstorage.*;
-import org.gridgain.grid.kernal.managers.indexing.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.datastructures.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
+import org.gridgain.grid.kernal.processors.query.*;
 import org.gridgain.grid.kernal.processors.task.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
@@ -36,7 +36,6 @@ import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
-import java.lang.reflect.*;
 import java.sql.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -52,10 +51,7 @@ import static 
org.gridgain.grid.kernal.processors.cache.query.GridCacheQueryType
 @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
 public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapter {
 /** */
-protected GridIndexingManager idxMgr;
-
-/** Indexing SPI name. */
-private String spi;
+protected GridQueryProcessor idxProc;
 
 /** */
 private String space;
@@ -82,8 +78,7 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 
 /** {@inheritDoc} */
 @Override public void start0() throws GridException {
-idxMgr = cctx.kernalContext().indexing();
-spi = cctx.config().getIndexingSpiName();
+idxProc = cctx.kernalContext().query();
 space = cctx.name();
 maxIterCnt = cctx.config().getMaximumQueryIteratorCount();
 
@@ -170,7 +165,7 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 throw new IllegalStateException("Failed to get size (grid is 
stopping).");
 
 try {
-return idxMgr.size(spi, space, valType);
+return idxProc.size(space, valType);
 }
 finally {
 leaveBusy();
@@ -198,7 +193,7 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 throw new IllegalStateException("Failed to rebuild indexes (grid 
is stopping).");
 
 try {
-return idxMgr.rebuildIndexes(spi, space, typeName);
+return idxProc.rebuildIndexes(space, typeName);
 }
 finally {
 leaveBusy();
@@ -215,7 +210,7 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 throw new IllegalStateException("Failed to rebuild indexes (grid 
is stopping).");
 
 try {
-return idxMgr.rebuildAllIndexes(spi);
+return idxProc.rebuildAllIndexes();
 }
 finally {
 leaveBusy();
@@ -260,14 +255,14 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
  *
  * @param swapSpaceName Swap space name.
  * @param key Key.
- * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+ * @throws GridException If failed.
  */
-public void onSwap(String swapSpaceName, K key) throws IgniteSpiException {
+public void onSwap(String swapSpaceName, K key) throws GridException {
 if (!enterBusy())
 return; // Ignore index update when node is stopping.
 
 try {
-idxMgr.onSwap(spi, space, swapSpaceName, key);
+idxProc.onSwap(space, key);
 }
 finally {
 leaveBusy();
@@ -280,14 +275,14 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
  * @param key Key.
  * @param val Value
  * @param valBytes Value bytes.
- * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+ * @throws GridException If failed.
  */
-public void onUnswap(K key, V val, byte[] valBytes) throws 
IgniteSpiException {
+public void onUnswap(K key, V val, byte[] valBytes) throws GridException {
 if (!enterBusy())
 return; // Ignore index update when node is stopping.
 
 try {
-idxMgr.onUnswap(spi, space, key, val, valBytes);
+idxProc.onUnswap(space, key, val, valBytes);
 }
 finally {
 leaveBusy();

[02/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
 
b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
index b2355ee..430c4cb 100644
--- 
a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
@@ -14,7 +14,6 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
-import org.gridgain.grid.spi.indexing.h2.*;
 import org.gridgain.grid.util.typedef.*;
 
 import java.util.*;
@@ -48,12 +47,6 @@ public class GridCacheReduceQueryMultithreadedSelfTest 
extends GridCacheAbstract
 @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
 IgniteConfiguration c = super.getConfiguration(gridName);
 
-GridH2IndexingSpi indexing = new GridH2IndexingSpi();
-
-indexing.setDefaultIndexPrimitiveKey(true);
-
-c.setIndexingSpi(indexing);
-
 c.setMarshaller(new IgniteOptimizedMarshaller(false));
 
 return c;
@@ -67,6 +60,12 @@ public class GridCacheReduceQueryMultithreadedSelfTest 
extends GridCacheAbstract
 cfg.setBackups(1);
 cfg.setWriteSynchronizationMode(FULL_SYNC);
 
+GridCacheQueryConfiguration qcfg = new GridCacheQueryConfiguration();
+
+qcfg.setIndexPrimitiveKey(true);
+
+cfg.setQueryConfiguration(qcfg);
+
 return cfg;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
 
b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
index 11ddf84..3a03ea8 100644
--- 
a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
@@ -10,12 +10,11 @@
 package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.configuration.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.gridgain.grid.spi.indexing.h2.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.query.*;
 import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
 
@@ -44,10 +43,6 @@ public class GridCacheSqlQueryMultiThreadedSelfTest extends 
GridCommonAbstractTe
 
 c.setDiscoverySpi(disco);
 
-GridH2IndexingSpi indexing = new GridH2IndexingSpi();
-
-c.setIndexingSpi(indexing);
-
 GridCacheConfiguration ccfg = new GridCacheConfiguration();
 
 ccfg.setCacheMode(PARTITIONED);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java
 
b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java
index 1df68e9..c8adf83 100644
--- 
a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapSelfTest.java
@@ -14,13 +14,13 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.spi.swapspace.*;
 import org.apache.ignite.spi.swapspace.noop.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.query.*;
 import o

[05/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2IndexingSpi.java
--
diff --git 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2IndexingSpi.java
 
b/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2IndexingSpi.java
deleted file mode 100644
index 9d42582..000
--- 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2IndexingSpi.java
+++ /dev/null
@@ -1,2398 +0,0 @@
-/* @java.file.header */
-
-/*  __ ___
-*  __  /___(_)__  /__  /__ (_)___
-*  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
-*  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
-*  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
-*/
-
-package org.gridgain.grid.spi.indexing.h2;
-
-import org.apache.ignite.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.resources.*;
-import org.apache.ignite.spi.*;
-import org.apache.ignite.spi.indexing.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.cache.query.*;
-import org.gridgain.grid.spi.indexing.h2.opt.*;
-import org.gridgain.grid.util.*;
-import org.gridgain.grid.util.offheap.unsafe.*;
-import org.gridgain.grid.util.typedef.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.h2.api.*;
-import org.h2.command.*;
-import org.h2.constant.*;
-import org.h2.index.*;
-import org.h2.jdbc.*;
-import org.h2.message.*;
-import org.h2.mvstore.cache.*;
-import org.h2.server.web.*;
-import org.h2.table.*;
-import org.h2.tools.*;
-import org.h2.util.*;
-import org.h2.value.*;
-import org.jdk8.backport.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.math.*;
-import java.sql.*;
-import java.text.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-import static org.apache.ignite.IgniteSystemProperties.*;
-import static org.apache.ignite.spi.indexing.IndexType.*;
-import static 
org.gridgain.grid.spi.indexing.h2.opt.GridH2AbstractKeyValueRow.*;
-import static org.h2.result.SortOrder.*;
-
-/**
- * Indexing SPI implementation based on H2 database engine. In this 
implementation main query language is SQL,
- * fulltext indexing can be performed using Lucene or using embedded H2 
mechanism. For each registered space
- * the SPI will create respective schema, for default space (where space name 
is null) schema
- * with name {@code PUBLIC} will be used. To avoid name conflicts user should 
not explicitly name
- * a schema {@code PUBLIC}.
- * 
- * For each registered {@link 
org.apache.ignite.spi.indexing.IndexingTypeDescriptor} this SPI will create 
respective SQL table with
- * {@code '_key'} and {@code '_val'} fields for key and value, and fields from
- * {@link org.apache.ignite.spi.indexing.IndexingTypeDescriptor#keyFields()} 
and {@link org.apache.ignite.spi.indexing.IndexingTypeDescriptor#valueFields()}.
- * For each table it will create indexes declared in {@link 
org.apache.ignite.spi.indexing.IndexingTypeDescriptor#indexes()}.
- * 
- * Note that you can monitor longer queries by setting {@link 
#setLongQueryExplain(boolean)} to {@code true}.
- * In this case a warning and execution plan are printed out if query exceeds 
certain time threshold. The
- * time threshold for long queries is configured via {@link 
#setLongQueryExecutionTimeout(long)} parameter.
- * Configuration
- * Mandatory
- * This SPI has no mandatory configuration parameters.
- * Optional
- * The following configuration parameters are optional:
- * 
- * Whether SPI will convert key type to SQL type or store keys in binary 
form
- * (see {@link #setDefaultIndexFixedTyping(boolean)})
- * Whether SPI will create tables for each primitive key-value pair
- * (see {@link #setDefaultIndexPrimitiveKey(boolean)})
- * Whether SPI will create indexes for each primitive value
- * (see {@link #setDefaultIndexPrimitiveValue(boolean)})
- * Search path for SQL objects (see {@link #setSearchPath(String...)})
- * Off-heap memory (see {@link #setMaxOffHeapMemory(long)})
- * Deserialized off-heap rows cache size (see {@link 
#setMaxOffheapRowsCacheSize(int)})
- * Name (see {@link #setName(String)})
- * SPI will issue a warning if query execution takes longer than specified 
period in milliseconds (see
- * {@link #setLongQueryExecutionTimeout(long)})
- * Whether SPI will print execution plan for slow queries (see {@link 
#setLongQueryExplain(boolean)})
- * Classes containing user defined functions (see {@link 
#setIndexCustomFunctionClasses(Class[])})
- * Per-space configurations (see {@link 
#setSpaceConfigurations(GridH2IndexingSpaceConfiguration...)})
- * 
- * Some important defaults.
- * 
- * All the data will be kept in memory
- * Primitive types will not be indexed (e.g. java types which can be 
directl

[04/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2ResultSetIterator.java
--
diff --git 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2ResultSetIterator.java
 
b/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2ResultSetIterator.java
deleted file mode 100644
index c37752f..000
--- 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/GridH2ResultSetIterator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/* @java.file.header */
-
-/*  __ ___
- *  __  /___(_)__  /__  /__ (_)___
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing.h2;
-
-import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.util.typedef.internal.*;
-
-import java.sql.*;
-import java.util.*;
-
-
-/**
- * Iterator over result set.
- */
-abstract class GridH2ResultSetIterator implements 
IgniteSpiCloseableIterator {
-/** */
-private static final long serialVersionUID = 0L;
-
-/** */
-private final ResultSet data;
-
-/** */
-protected final Object[] row;
-
-/** */
-private boolean hasRow;
-
-/**
- * @param data Data array.
- * @throws org.apache.ignite.spi.IgniteSpiException If failed.
- */
-protected GridH2ResultSetIterator(ResultSet data) throws 
IgniteSpiException {
-this.data = data;
-
-if (data != null) {
-try {
-row = new Object[data.getMetaData().getColumnCount()];
-}
-catch (SQLException e) {
-throw new IgniteSpiException(e);
-}
-}
-else
-row = null;
-}
-
-/**
- * @return {@code true} If next row was fetched successfully.
- */
-private boolean fetchNext() {
-if (data == null)
-return false;
-
-try {
-if (!data.next())
-return false;
-
-for (int c = 0; c < row.length; c++)
-row[c] = data.getObject(c + 1);
-
-return true;
-}
-catch (SQLException e) {
-throw new GridRuntimeException(e);
-}
-}
-
-/** {@inheritDoc} */
-@Override public boolean hasNext() {
-return hasRow || (hasRow = fetchNext());
-}
-
-/** {@inheritDoc} */
-@SuppressWarnings("IteratorNextCanNotThrowNoSuchElementException")
-@Override public T next() {
-if (!hasNext())
-throw new NoSuchElementException();
-
-hasRow = false;
-
-return createRow();
-}
-
-/**
- * @return Row.
- */
-protected abstract T createRow();
-
-/** {@inheritDoc} */
-@Override public void remove() {
-throw new UnsupportedOperationException();
-}
-
-/** {@inheritDoc} */
-@Override public void close() throws GridException {
-if (data == null)
-// Nothing to close.
-return;
-
-try {
-U.closeQuiet(data.getStatement());
-}
-catch (SQLException e) {
-throw new GridException(e);
-}
-
-U.closeQuiet(data);
-}
-
-/** {@inheritDoc} */
-@Override public String toString() {
-return S.toString((Class)getClass(), this);
-}
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2AbstractKeyValueRow.java
--
diff --git 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2AbstractKeyValueRow.java
 
b/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2AbstractKeyValueRow.java
deleted file mode 100644
index ce56b57..000
--- 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2AbstractKeyValueRow.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/* @java.file.header */
-
-/*  __ ___
- *  __  /___(_)__  /__  /__ (_)___
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing.h2.opt;
-
-import org.apache.ignite.spi.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.h2.message.*;
-import org.h2.result.*;
-import org.h2.value.*;
-import org.jetbrains.annotations.*;
-
-import java.lang.ref.*;
-import java.math.*;
-import j

[07/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
--
diff --git 
a/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
 
b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
new file mode 100644
index 000..90fa24d
--- /dev/null
+++ 
b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
@@ -0,0 +1,346 @@
+/* @java.file.header */
+
+/*  __ ___
+ *  __  /___(_)__  /__  /__ (_)___
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.query.h2.opt;
+
+import org.apache.ignite.spi.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.util.*;
+import org.gridgain.grid.util.offheap.unsafe.*;
+import org.h2.store.*;
+import org.h2.value.*;
+import org.jetbrains.annotations.*;
+
+import java.util.concurrent.locks.*;
+
+/**
+ * Offheap row.
+ */
+public class GridH2KeyValueRowOffheap extends GridH2AbstractKeyValueRow {
+/** */
+private static final GridStripedLock lock;
+
+/**
+ * Init locks.
+ */
+static {
+int cpus = Runtime.getRuntime().availableProcessors();
+
+lock = new GridStripedLock(cpus * cpus * 8);
+}
+
+/** */
+private static final int OFFSET_KEY_SIZE = 4; // 4 after ref cnt int
+
+/** */
+private static final int OFFSET_VALUE_REF = OFFSET_KEY_SIZE + 4; // 8
+
+/** */
+private static final int OFFSET_EXPIRATION = OFFSET_VALUE_REF + 8; // 16
+
+/** */
+private static final int OFFSET_KEY = OFFSET_EXPIRATION + 8; // 24
+
+/** */
+private static final int OFFSET_VALUE = 4; // 4 on separate page after val 
size int
+
+/** */
+private static final Data SIZE_CALCULATOR = Data.create(null, null);
+
+/** */
+@SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
+private long ptr;
+
+/**
+ * @param desc Row descriptor.
+ * @param ptr Pointer.
+ */
+public GridH2KeyValueRowOffheap(GridH2RowDescriptor desc, long ptr) {
+super(desc);
+
+assert ptr > 0 : ptr;
+
+this.ptr = ptr;
+}
+
+/**
+ * Constructor.
+ *
+ * @param desc Row descriptor.
+ * @param key Key.
+ * @param keyType Key type.
+ * @param val Value.
+ * @param valType Value type.
+ * @param expirationTime Expiration time.
+ * @throws IgniteSpiException If failed.
+ */
+public GridH2KeyValueRowOffheap(GridH2RowDescriptor desc, Object key, int 
keyType, @Nullable Object val, int valType,
+long expirationTime) throws IgniteSpiException {
+super(desc, key, keyType, val, valType, expirationTime);
+}
+
+/** {@inheritDoc} */
+@Override public long expirationTime() {
+if (expirationTime == 0) {
+long p = ptr;
+
+assert p > 0 : p;
+
+// We don't need any synchronization or volatility here because we 
publish via
+// volatile write to tree node.
+expirationTime = desc.memory().readLong(p + OFFSET_EXPIRATION);
+}
+
+return expirationTime;
+}
+
+/** {@inheritDoc} */
+@Override protected void cache() {
+desc.cache(this);
+}
+
+/**
+ * @param ptr Pointer to get lock for.
+ * @return Locked lock, must be released in {@code finally} block.
+ */
+@SuppressWarnings("LockAcquiredButNotSafelyReleased")
+private static Lock lock(long ptr) {
+assert (ptr & 7) == 0 : ptr; // Unsafe allocated pointers aligned.
+
+Lock l = lock.getLock(ptr >>> 3);
+
+l.lock();
+
+return l;
+}
+
+/** {@inheritDoc} */
+@SuppressWarnings("LockAcquiredButNotSafelyReleased")
+@Override protected Value getOffheapValue(int col) {
+GridUnsafeMemory mem = desc.memory();
+
+long p = ptr;
+
+assert p > 0 : p;
+
+byte[] bytes = null;
+
+if (col == KEY_COL) {
+int size = mem.readInt(p + OFFSET_KEY_SIZE);
+
+assert size > 0 : size;
+
+bytes = mem.readBytes(p + OFFSET_KEY, size);
+}
+else if (col == VAL_COL) {
+Lock l = lock(p);
+
+desc.guard().begin();
+
+try {
+long valPtr = mem.readLongVolatile(p + OFFSET_VALUE_REF);
+
+if (valPtr == 0) // Value was evicted.
+return null;
+
+int size = mem.readInt(valPtr);
+
+assert size > 0 : size;
+
+ 

[01/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
Repository: incubator-ignite
Updated Branches:
  refs/heads/master 7f6fdca44 -> 7b13de917


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/test/java/org/gridgain/grid/spi/indexing/GridIndexingSpiAbstractSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/gridgain/grid/spi/indexing/GridIndexingSpiAbstractSelfTest.java
 
b/modules/indexing/src/test/java/org/gridgain/grid/spi/indexing/GridIndexingSpiAbstractSelfTest.java
deleted file mode 100644
index bd647f5..000
--- 
a/modules/indexing/src/test/java/org/gridgain/grid/spi/indexing/GridIndexingSpiAbstractSelfTest.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/* @java.file.header */
-
-/*  __ ___
- *  __  /___(_)__  /__  /__ (_)___
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import org.apache.ignite.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.spi.*;
-import org.apache.ignite.spi.indexing.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.spi.indexing.h2.*;
-import org.gridgain.grid.util.typedef.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.*;
-import org.gridgain.testframework.junits.spi.*;
-
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-/**
- * Tests for all SQL based indexing SPI implementations.
- */
-public abstract class GridIndexingSpiAbstractSelfTest
-extends GridSpiAbstractTest {
-/** */
-private static final TextIndex textIdx = new TextIndex(F.asList("txt"));
-
-/** */
-private static final Map> fieldsAA = new HashMap<>();
-
-/** */
-private static final Map> fieldsAB = new HashMap<>();
-
-/** */
-private static final Map> fieldsBA = new HashMap<>();
-
-/**
- * Fields initialization.
- */
-static {
-fieldsAA.put("id", Long.class);
-fieldsAA.put("name", String.class);
-fieldsAA.put("age", Integer.class);
-
-fieldsAB.putAll(fieldsAA);
-fieldsAB.put("txt", String.class);
-
-fieldsBA.putAll(fieldsAA);
-fieldsBA.put("sex", Boolean.class);
-}
-
-/** */
-private static TypeDesc typeAA = new TypeDesc("A", "A", fieldsAA, null);
-
-/** */
-private static TypeDesc typeAB = new TypeDesc("A", "B", fieldsAB, textIdx);
-
-/** */
-private static TypeDesc typeBA = new TypeDesc("B", "A", fieldsBA, null);
-
-/** {@inheritDoc} */
-@Override protected void spiConfigure(X spi) throws Exception {
-super.spiConfigure(spi);
-
-spi.registerMarshaller(new 
IdxMarshaller(getTestResources().getMarshaller()));
-
-spi.registerSpace("A");
-spi.registerSpace("B");
-}
-
-/**
- * @param id Id.
- * @param name Name.
- * @param age Age.
- * @return AA.
- */
-private Map aa(long id, String name, int age) {
-Map map = new HashMap<>();
-
-map.put("id", id);
-map.put("name", name);
-map.put("age", age);
-
-return map;
-}
-
-/**
- * @param id Id.
- * @param name Name.
- * @param age Age.
- * @param txt Text.
- * @return AB.
- */
-private Map ab(long id, String name, int age, String txt) {
-Map map = aa(id, name, age);
-
-map.put("txt", txt);
-
-return map;
-}
-
-/**
- * @param id Id.
- * @param name Name.
- * @param age Age.
- * @param sex Sex.
- * @return BA.
- */
-private Map ba(long id, String name, int age, boolean sex) 
{
-Map map = aa(id, name, age);
-
-map.put("sex", sex);
-
-return map;
-}
-
-/**
- * @param val Value.
- * @param  Value type.
- * @return Indexing entity.
- * @throws GridException If failed.
- */
-private  IndexingEntity entity(T val) throws GridException {
-return new IndexingEntityAdapter<>(val, 
getTestResources().getMarshaller().marshal(val));
-}
-
-/**
- * @param row Row
- * @return Value.
- * @throws org.apache.ignite.spi.IgniteSpiException If failed.
- */
-private Map value(IndexingKeyValueRow> row) throws IgniteSpiException {
-return row.value().value();
-}
-
-/**
- * @throws Exception If failed.
- */
-public void testSpi() throws Exception {
-X spi = getSpi();
-
-assertEquals(-1, spi.size(typeAA.space(), typeAA));
-assertEquals(-1, spi.size(typeAB.space(), typeAB));
-assertEquals(-1, spi.size(typeBA.space(), typeBA));
-
-spi.registerType(typeAA.space(), typeAA);
-
-assertEquals(0, spi.size(typeAA.space(), typeAA));
-assertEquals(-1, spi.size(

[16/17] incubator-ignite git commit: ignite-qry - spring

2014-12-10 Thread sergi
ignite-qry - spring


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

Branch: refs/heads/master
Commit: 73b5ef6b040c0a9805d939bef2effba767181c66
Parents: 34115a7
Author: S.Vladykin 
Authored: Wed Dec 10 15:17:11 2014 +0300
Committer: S.Vladykin 
Committed: Wed Dec 10 15:17:11 2014 +0300

--
 examples/config/example-cache.xml   | 17 +++
 .../clients/src/test/resources/spring-cache.xml | 29 +++
 .../configuration/IgniteConfiguration.java  |  8 +--
 .../ignite/spi/indexing/GridIndexingSpi.java|  4 +-
 .../grid/cache/query/GridCacheQuery.java|  6 +--
 .../cache/query/GridCacheQuerySqlField.java |  2 +-
 .../cache/query/GridCacheQuerySqlFunction.java  |  4 +-
 .../loadtests/colocation/spring-colocation.xml  | 13 -
 .../core/src/test/webapp/META-INF/gg-config.xml | 53 
 .../processors/query/h2/GridH2Indexing.java |  2 +-
 .../test/resources/spring-ping-pong-partner.xml | 21 
 11 files changed, 60 insertions(+), 99 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/73b5ef6b/examples/config/example-cache.xml
--
diff --git a/examples/config/example-cache.xml 
b/examples/config/example-cache.xml
index 6e95de4..b3b6877 100644
--- a/examples/config/example-cache.xml
+++ b/examples/config/example-cache.xml
@@ -191,15 +191,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
 
 
 
@@ -215,5 +206,13 @@
 
 
 
+
+
+
+
+
+
+
+
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/73b5ef6b/modules/clients/src/test/resources/spring-cache.xml
--
diff --git a/modules/clients/src/test/resources/spring-cache.xml 
b/modules/clients/src/test/resources/spring-cache.xml
index ba89926..c63e8ec 100644
--- a/modules/clients/src/test/resources/spring-cache.xml
+++ b/modules/clients/src/test/resources/spring-cache.xml
@@ -41,27 +41,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
@@ -105,6 +84,14 @@
 -->
 
 
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/73b5ef6b/modules/core/src/test/webapp/META-INF/gg-config.xml
--
diff --git a/modules/core/src/test/webapp/META-INF/gg-config.xml 
b/modules/core/src/test/webapp/META-INF/gg-config.xml
index b0f0af8..1f60c3e 100644
--- a/modules/core/src/test/webapp/META-INF/gg-config.xml
+++ b/modules/core/src/test/webapp/META-INF/gg-config.xml
@@ -72,27 +72,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
 
+
+
+
+
+
+
+
+
 
 
 
+
+
+
+
+
+
+
+
 
 
+
+
+
+
+
+
+
+
 
 
 
 
+
+
+
+
+
+
+
+
 
 
 

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

[12/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
ignite-qry - merged


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

Branch: refs/heads/master
Commit: 922a2bab07206f930cab3eb4d930425757bb50b7
Parents: 984373d
Author: S.Vladykin 
Authored: Tue Dec 9 19:32:11 2014 +0300
Committer: S.Vladykin 
Committed: Tue Dec 9 19:32:11 2014 +0300

--
 .../MemcacheRestExampleNodeStartup.java |   16 +-
 .../jdbc/GridJdbcLocalCachesSelfTest.java   |   10 +-
 .../configuration/GridQueryConfiguration.java   |  194 ++
 .../configuration/IgniteConfiguration.java  |   28 +-
 .../events/IgniteCacheQueryReadEvent.java   |6 +-
 .../spi/indexing/GridIndexingQueryFilter.java   |   26 +
 .../ignite/spi/indexing/GridIndexingSpi.java|  104 +
 .../spi/indexing/GridNoopIndexingSpi.java   |   58 +
 .../ignite/spi/indexing/IndexDescriptor.java|   42 -
 .../apache/ignite/spi/indexing/IndexType.java   |   24 -
 .../ignite/spi/indexing/IndexingEntity.java |   50 -
 .../spi/indexing/IndexingEntityAdapter.java |   57 -
 .../spi/indexing/IndexingFieldMetadata.java |   46 -
 .../spi/indexing/IndexingFieldsResult.java  |   35 -
 .../indexing/IndexingFieldsResultAdapter.java   |   49 -
 .../spi/indexing/IndexingKeyValueRow.java   |   42 -
 .../indexing/IndexingKeyValueRowAdapter.java|   82 -
 .../ignite/spi/indexing/IndexingMarshaller.java |   38 -
 .../spi/indexing/IndexingQueryFilter.java   |   27 -
 .../apache/ignite/spi/indexing/IndexingSpi.java |  188 --
 .../spi/indexing/IndexingTypeDescriptor.java|   84 -
 .../ignite/spi/indexing/NoopIndexingSpi.java|  119 -
 .../query/GridCacheQueryConfiguration.java  |  117 +
 .../grid/cache/query/GridCacheQueryType.java|5 +-
 .../gridgain/grid/kernal/GridComponentType.java |8 +-
 .../org/gridgain/grid/kernal/GridGainEx.java|5 +-
 .../org/gridgain/grid/kernal/GridKernal.java|2 +
 .../gridgain/grid/kernal/GridKernalContext.java |8 +
 .../grid/kernal/GridKernalContextImpl.java  |   12 +
 .../managers/indexing/GridIndexingManager.java  | 1778 +
 .../GridCacheDistributedFieldsQueryFuture.java  |8 +-
 .../query/GridCacheDistributedQueryManager.java |6 +-
 .../query/GridCacheFieldsQueryErrorFuture.java  |6 +-
 .../query/GridCacheLocalFieldsQueryFuture.java  |8 +-
 .../cache/query/GridCacheLocalQueryManager.java |6 +-
 .../cache/query/GridCacheQueriesEx.java |7 +
 .../cache/query/GridCacheQueriesImpl.java   |   21 +-
 .../cache/query/GridCacheQueriesProxy.java  |   12 +
 .../cache/query/GridCacheQueryAdapter.java  |4 +-
 .../cache/query/GridCacheQueryManager.java  |  396 +--
 .../query/GridCacheQueryMetadataAware.java  |4 +-
 .../cache/query/GridCacheQueryRequest.java  |4 +-
 .../cache/query/GridCacheQueryResponse.java |  135 +-
 .../cache/query/GridCacheQueryType.java |5 +
 .../cache/query/GridCacheSqlMetadata.java   |3 +-
 .../query/jdbc/GridCacheQueryJdbcTask.java  |6 +-
 .../query/GridQueryFieldMetadata.java   |   46 +
 .../processors/query/GridQueryFieldsResult.java |   34 +
 .../query/GridQueryFieldsResultAdapter.java |   49 +
 .../query/GridQueryIndexDescriptor.java |   42 +
 .../processors/query/GridQueryIndexType.java|   24 +
 .../processors/query/GridQueryIndexing.java |  162 ++
 .../processors/query/GridQueryProcessor.java| 1672 
 .../query/GridQueryTypeDescriptor.java  |   79 +
 .../visor/node/VisorSpisConfiguration.java  |2 +-
 .../grid/kernal/visor/query/VisorQueryTask.java |6 +-
 .../java/org/gridgain/grid/util/GridUtils.java  |   20 +
 .../GridCacheTxExceptionAbstractSelfTest.java   |   66 +-
 .../processors/query/h2/GridH2Indexing.java | 1998 +++
 .../query/h2/GridH2ResultSetIterator.java   |  122 +
 .../query/h2/opt/GridH2AbstractKeyValueRow.java |  447 
 .../processors/query/h2/opt/GridH2Cursor.java   |   62 +
 .../query/h2/opt/GridH2IndexBase.java   |  198 ++
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |  346 +++
 .../query/h2/opt/GridH2KeyValueRowOnheap.java   |   46 +
 .../processors/query/h2/opt/GridH2Row.java  |   40 +
 .../query/h2/opt/GridH2RowDescriptor.java   |  102 +
 .../query/h2/opt/GridH2SpatialIndex.java|  318 +++
 .../processors/query/h2/opt/GridH2Table.java|  889 +++
 .../query/h2/opt/GridH2TreeIndex.java   |  469 
 .../processors/query/h2/opt/GridH2Utils.java|  125 +
 .../query/h2/opt/GridLuceneDirectory.java   |  189 ++
 .../processors/query/h2/opt/GridLuceneFile.java |  186 ++
 .../query/h2/opt/GridLuceneIndex.java   |  384 +++
 .../quer

[03/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2TreeIndex.java
--
diff --git 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2TreeIndex.java
 
b/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2TreeIndex.java
deleted file mode 100644
index 9788414..000
--- 
a/modules/indexing/src/main/java/org/gridgain/grid/spi/indexing/h2/opt/GridH2TreeIndex.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/* @java.file.header */
-
-/*  __ ___
- *  __  /___(_)__  /__  /__ (_)___
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing.h2.opt;
-
-import org.apache.ignite.spi.indexing.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.util.*;
-import org.gridgain.grid.util.snaptree.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.offheap.unsafe.*;
-import org.h2.engine.*;
-import org.h2.index.*;
-import org.h2.index.IndexType;
-import org.h2.result.*;
-import org.h2.table.*;
-import org.h2.value.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-/**
- * Base class for snapshotable tree indexes.
- */
-@SuppressWarnings("ComparatorNotSerializable")
-public class GridH2TreeIndex extends GridH2IndexBase implements 
Comparator {
-/** */
-protected final ConcurrentNavigableMap 
tree;
-
-/** */
-private final ThreadLocal> snapshot =
-new ThreadLocal<>();
-
-/**
- * Constructor with index initialization.
- *
- * @param name Index name.
- * @param tbl Table.
- * @param pk If this index is primary key.
- * @param keyCol Primary key column index.
- * @param valCol Value column index.
- * @param cols Index columns list.
- */
-@SuppressWarnings("unchecked")
-public GridH2TreeIndex(String name, GridH2Table tbl, boolean pk, int 
keyCol, int valCol, IndexColumn... cols) {
-super(keyCol, valCol);
-if (!pk) {
-// For other indexes we add primary key at the end to avoid 
conflicts.
-cols = Arrays.copyOf(cols, cols.length + 1);
-
-cols[cols.length - 1] = tbl.indexColumn(keyCol, 
SortOrder.ASCENDING);
-}
-
-IndexColumn.mapColumns(cols, tbl);
-
-initBaseIndex(tbl, 0, name, cols,
-pk ? IndexType.createUnique(false, false) : 
IndexType.createNonUnique(false, false, false));
-
-final GridH2RowDescriptor desc = tbl.rowDescriptor();
-
-tree = desc == null || desc.memory() == null ? new 
SnapTreeMap(this) {
-@Override protected void 
afterNodeUpdate_nl(Node node, Object val) {
-if (val != null)
-node.key = (GridSearchRowPointer)val;
-}
-
-@Override protected Comparable 
comparable(Object key) {
-if (key instanceof ComparableRow)
-return (Comparable)key;
-
-return super.comparable(key);
-}
-} : new GridOffHeapSnapTreeMap(desc, 
desc, desc.memory(), desc.guard(), this) {
-@Override protected void afterNodeUpdate_nl(long node, GridH2Row 
val) {
-final long oldKey = keyPtr(node);
-
-if (val != null) {
-key(node, val);
-
-guard.finalizeLater(new Runnable() {
-@Override public void run() {
-desc.createPointer(oldKey).decrementRefCount();
-}
-});
-}
-}
-
-@Override protected Comparable 
comparable(Object key) {
-if (key instanceof ComparableRow)
-return (Comparable)key;
-
-return super.comparable(key);
-}
-};
-}
-
-/**
- * Closes index and releases resources.
- */
-public void close() {
-if (tree instanceof Closeable)
-U.closeQuiet((Closeable)tree);
-}
-
-/**
- * Takes snapshot to be used in current thread. If argument is null it 
will be taken from current trees.
- *
- * @param s Map to be used as snapshot if not null.
- * @return Taken snapshot or given argument back.
- */
-@SuppressWarnings("unchecked")
-@Override public Object takeSnapshot(@Nullable Object s) {
-assert snapshot.get() == null;
-
-if (s == null)
-s = tree instanceof SnapTreeMap ? ((SnapTreeMap)tree).clone() :
-((GridOffHeapSnapTreeMap)tree).clone();
-
-snapshot.set((ConcurrentN

[11/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
index 3cbeea1..52cb769 100644
--- 
a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
@@ -9,82 +9,28 @@
 
 package org.gridgain.grid.kernal.managers.indexing;
 
-import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.portables.*;
 import org.apache.ignite.spi.*;
-import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.*;
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.kernal.managers.*;
-import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.util.*;
-import org.gridgain.grid.util.future.*;
-import org.gridgain.grid.util.lang.*;
-import org.gridgain.grid.util.tostring.*;
-import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.worker.*;
-import org.jdk8.backport.*;
-import org.jetbrains.annotations.*;
+import org.gridgain.grid.kernal.managers.*;
+import org.apache.ignite.spi.indexing.*;
 
-import java.io.*;
-import java.lang.reflect.*;
 import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
-
-import static org.apache.ignite.spi.indexing.IndexType.*;
 
 /**
  * Manages cache indexing.
  */
-public class GridIndexingManager extends GridManagerAdapter {
-/** */
-private IgniteMarshaller marsh;
-
-/** Type descriptors. */
-private final ConcurrentMap types = new 
ConcurrentHashMap8<>();
-
-/** Type descriptors. */
-private final ConcurrentMap typesByName = new 
ConcurrentHashMap8<>();
-
-/** */
-private final ConcurrentMap ldrById = new 
ConcurrentHashMap8<>();
-
-/** */
-private final ConcurrentMap idByLdr = new 
ConcurrentHashMap8<>();
-
-/** */
-private final AtomicLong ldrIdGen = new AtomicLong();
-
+public class GridIndexingManager extends GridManagerAdapter {
 /** */
 private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
 
-/** Configuration-declared types. */
-private Map declaredTypesById;
-
-/** Configuration-declared types. */
-private final Map 
declaredTypesByName = new HashMap<>();
-
-/** Portable IDs. */
-private Map portableIds;
-
-/** Type resolvers per space name. */
-private Map typeResolvers = new 
HashMap<>();
-
-/** */
-private ExecutorService execSvc;
-
 /**
  * @param ctx  Kernal context.
  */
 public GridIndexingManager(GridKernalContext ctx) {
 super(ctx, ctx.config().getIndexingSpi());
-
-marsh = ctx.config().getMarshaller();
 }
 
 /**
@@ -95,33 +41,10 @@ public class GridIndexingManager extends 
GridManagerAdapter {
 return;
 
 if (!enabled())
-U.warn(log, "Indexing is disabled (to enable please configure 
GridH2IndexingSpi).");
-
-IndexingMarshaller m = new IdxMarshaller();
-
-for (IndexingSpi spi : getSpis()) {
-spi.registerMarshaller(m);
-
-for (GridCacheConfiguration cacheCfg : 
ctx.config().getCacheConfiguration())
-spi.registerSpace(cacheCfg.getName());
-}
-
-execSvc = ctx.config().getExecutorService();
+U.warn(log, "Indexing is disabled (to enable please configure 
GridIndexingSpi).");
 
 startSpi();
 
-for (GridCacheConfiguration ccfg : 
ctx.config().getCacheConfiguration()){
-GridCacheQueryConfiguration qryCfg = ccfg.getQueryConfiguration();
-
-if (qryCfg != null) {
-for (GridCacheQueryTypeMetadata meta : 
qryCfg.getTypeMetadata())
-declaredTypesByName.put(new TypeName(ccfg.getName(), 
meta.getType()), meta);
-
-if (qryCfg.getTypeResolver() != null)
-typeResolvers.put(ccfg.getName(), 
qryCfg.getTypeResolver());
-}
-}
-
 if (log.isDebugEnabled())
 log.debug(startInfo());
 }
@@ -148,162 +71,22 @@ public class GridIndexingManager extends 
GridManagerAdapter {
 }
 
 /**
- * Returns number of objects of given type for given space of spi.
- *
- * @param spi SPI Name.
- * @param space Space.
- * @param valType Value type.
- * @return Objects number or -1 if this type is unknown for given SPI and 
space.
- * @throws GridException If failed.
- */
-public long size(@Nullable String s

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

2014-12-10 Thread sergi
Merge branches 'ignite-qry' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry


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

Branch: refs/heads/master
Commit: 2a605d1ad3cde56b7963c1e50809c6f47ac1e355
Parents: 59204a5 20872dc
Author: S.Vladykin 
Authored: Wed Dec 10 12:07:57 2014 +0300
Committer: S.Vladykin 
Committed: Wed Dec 10 12:07:57 2014 +0300

--
 config/hadoop/default-config.xml|   6 +-
 .../fs/IgniteFsGroupDataBlocksKeyMapper.java|   2 +-
 .../ignite/fs/mapreduce/IgniteFsTask.java   |   2 +-
 .../processors/cache/GridCacheMapEntry.java |  40 --
 .../processors/cache/GridCacheSwapManager.java  |  14 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  32 +
 .../distributed/dht/GridDhtLockFuture.java  |   3 +
 .../distributed/dht/GridDhtLockResponse.java|  12 ++
 .../dht/GridDhtTransactionalCacheAdapter.java   |   2 +
 .../colocated/GridDhtDetachedCacheEntry.java|   5 +
 .../dht/preloader/GridDhtPreloader.java |  10 +-
 .../cache/GridCacheOffheapUpdateSelfTest.java   | 130 +++
 ...IpcEndpointRegistrationAbstractSelfTest.java |   4 +-
 .../bamboo/GridDataGridTestSuite.java   |   1 +
 14 files changed, 235 insertions(+), 28 deletions(-)
--




[08/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
--
diff --git 
a/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
 
b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
new file mode 100644
index 000..3a850cc
--- /dev/null
+++ 
b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/GridH2Indexing.java
@@ -0,0 +1,1998 @@
+/* @java.file.header */
+
+/*  __ ___
+*  __  /___(_)__  /__  /__ (_)___
+*  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+*  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+*  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
+*/
+
+package org.gridgain.grid.kernal.processors.query.h2;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.indexing.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.query.*;
+import org.gridgain.grid.kernal.*;
+import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.query.*;
+import org.gridgain.grid.kernal.processors.query.h2.opt.*;
+import org.gridgain.grid.util.*;
+import org.gridgain.grid.util.lang.*;
+import org.gridgain.grid.util.offheap.unsafe.*;
+import org.gridgain.grid.util.typedef.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.h2.api.*;
+import org.h2.command.*;
+import org.h2.constant.*;
+import org.h2.index.*;
+import org.h2.jdbc.*;
+import org.h2.message.*;
+import org.h2.mvstore.cache.*;
+import org.h2.server.web.*;
+import org.h2.table.*;
+import org.h2.tools.*;
+import org.h2.util.*;
+import org.h2.value.*;
+import org.jdk8.backport.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.lang.reflect.*;
+import java.math.*;
+import java.sql.*;
+import java.text.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+import static org.apache.ignite.IgniteSystemProperties.*;
+import static org.gridgain.grid.kernal.processors.query.GridQueryIndexType.*;
+import static 
org.gridgain.grid.kernal.processors.query.h2.opt.GridH2AbstractKeyValueRow.*;
+import static org.h2.result.SortOrder.*;
+
+/**
+ * Indexing implementation based on H2 database engine. In this implementation 
main query language is SQL,
+ * fulltext indexing can be performed using Lucene. For each registered space
+ * the SPI will create respective schema, for default space (where space name 
is null) schema
+ * with name {@code PUBLIC} will be used. To avoid name conflicts user should 
not explicitly name
+ * a schema {@code PUBLIC}.
+ * 
+ * For each registered {@link GridQueryTypeDescriptor} this SPI will create 
respective SQL table with
+ * {@code '_key'} and {@code '_val'} fields for key and value, and fields from
+ * {@link GridQueryTypeDescriptor#keyFields()} and {@link 
GridQueryTypeDescriptor#valueFields()}.
+ * For each table it will create indexes declared in {@link 
GridQueryTypeDescriptor#indexes()}.
+ * Some important defaults.
+ * 
+ * All the data will be kept in memory
+ * Primitive types will not be indexed (e.g. java types which can be 
directly converted to SQL types)
+ * 
+ * Key types will be converted to SQL types, so it is impossible to 
store one value type with
+ * different key types
+ * 
+ * 
+ * @see GridIndexingSpi
+ */
+@SuppressWarnings({"UnnecessaryFullyQualifiedName", 
"NonFinalStaticVariableUsedInClassInitialization"})
+public class GridH2Indexing implements GridQueryIndexing {
+/** Default DB options. */
+private static final String DFLT_DB_OPTIONS = 
";LOCK_MODE=3;MULTI_THREADED=1;DB_CLOSE_ON_EXIT=FALSE" +
+";DEFAULT_LOCK_TIMEOUT=1";
+
+/** Options for optimized mode to work properly. */
+private static final String OPTIMIZED_DB_OPTIONS = 
";OPTIMIZE_REUSE_RESULTS=0;QUERY_CACHE_SIZE=0;" +
+"RECOMPILE_ALWAYS=1;MAX_OPERATION_MEMORY=0";
+
+/** Field name for key. */
+public static final String KEY_FIELD_NAME = "_key";
+
+/** Field name for value. */
+public static final String VAL_FIELD_NAME = "_val";
+
+/** */
+private static final Field COMMAND_FIELD;
+
+/**
+ * Command in H2 prepared statement.
+ */
+static {
+try {
+COMMAND_FIELD = 
JdbcPreparedStatement.class.getDeclaredField("command");
+
+COMMAND_FIELD.setAccessible(true);
+}
+catch (NoSuchFieldException e) {
+throw new IllegalStateException("Check H2 version in classpath.", 
e);

[09/17] incubator-ignite git commit: ignite-qry - merged

2014-12-10 Thread sergi
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/922a2bab/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
 
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
new file mode 100644
index 000..94db08d
--- /dev/null
+++ 
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/query/GridQueryProcessor.java
@@ -0,0 +1,1672 @@
+/* @java.file.header */
+
+/*  __ ___
+ *  __  /___(_)__  /__  /__ (_)___
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /_  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \/   /_/ /_/   \_,__/   \/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.query;
+
+import org.apache.ignite.lang.*;
+import org.apache.ignite.portables.*;
+import org.apache.ignite.spi.indexing.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.query.*;
+import org.gridgain.grid.kernal.*;
+import org.gridgain.grid.kernal.processors.*;
+import org.gridgain.grid.util.*;
+import org.gridgain.grid.util.future.*;
+import org.gridgain.grid.util.lang.*;
+import org.gridgain.grid.util.tostring.*;
+import org.gridgain.grid.util.typedef.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.gridgain.grid.util.worker.*;
+import org.jdk8.backport.*;
+import org.jetbrains.annotations.*;
+
+import java.lang.reflect.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+import static org.gridgain.grid.kernal.GridComponentType.*;
+import static org.gridgain.grid.kernal.processors.query.GridQueryIndexType.*;
+
+/**
+ * Indexing processor.
+ */
+public class GridQueryProcessor extends GridProcessorAdapter {
+/** For tests. */
+public static Class idxCls;
+
+/** */
+private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
+
+/** Type descriptors. */
+private final ConcurrentMap types = new 
ConcurrentHashMap8<>();
+
+/** Type descriptors. */
+private final ConcurrentMap typesByName = new 
ConcurrentHashMap8<>();
+
+/** */
+private ExecutorService execSvc;
+
+/** */
+private final GridQueryIndexing idx;
+
+/** Configuration-declared types. */
+private final Map 
declaredTypesByName = new HashMap<>();
+
+/** Configuration-declared types. */
+private Map declaredTypesById;
+
+/** Portable IDs. */
+private Map portableIds;
+
+/** Type resolvers per space name. */
+private Map typeResolvers = new 
HashMap<>();
+
+/**
+ * @param ctx Kernal context.
+ */
+public GridQueryProcessor(GridKernalContext ctx) throws GridException {
+super(ctx);
+
+if (idxCls != null) {
+idx = U.newInstance(idxCls);
+
+idxCls = null;
+}
+else
+idx = INDEXING.inClassPath() ? 
U.newInstance(INDEXING.className()) : null;
+}
+
+/** {@inheritDoc} */
+@Override public void start() throws GridException {
+super.start();
+
+if (idx != null) {
+ctx.resource().injectGeneric(idx);
+
+idx.start(ctx);
+
+for (GridCacheConfiguration ccfg : 
ctx.config().getCacheConfiguration()){
+GridCacheQueryConfiguration qryCfg = 
ccfg.getQueryConfiguration();
+
+if (qryCfg != null) {
+if (!F.isEmpty(qryCfg.getTypeMetadata())) {
+for (GridCacheQueryTypeMetadata meta : 
qryCfg.getTypeMetadata())
+declaredTypesByName.put(new 
TypeName(ccfg.getName(), meta.getType()), meta);
+}
+
+if (qryCfg.getTypeResolver() != null)
+typeResolvers.put(ccfg.getName(), 
qryCfg.getTypeResolver());
+}
+}
+
+execSvc = ctx.config().getExecutorService();
+}
+}
+
+/** {@inheritDoc} */
+@Override public void onKernalStop(boolean cancel) {
+super.onKernalStop(cancel);
+
+busyLock.block();
+}
+
+/** {@inheritDoc} */
+@Override public void stop(boolean cancel) throws GridException {
+super.stop(cancel);
+
+if (idx != null)
+idx.stop();
+}
+
+/**
+ * Returns number of objects of given type for given space of spi.
+ *
+ * @param space Space.
+ * @param valType Value type.
+ * @return Objects number or -1 if this type is unknown for given SPI and 
space.
+ * @throws GridException If failed.
+ */
+public long size(@Nullable String space, Class valType) throws 
GridException {
+checkEnabled();
+
+if (!busyLock.enterBusy())
+throw new Illegal

[15/17] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry

2014-12-10 Thread sergi
Merge branch 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-qry


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

Branch: refs/heads/master
Commit: 34115a788357cddbd9afba37f397ff53baf84001
Parents: 2a605d1 a0e5f1b
Author: S.Vladykin 
Authored: Wed Dec 10 12:27:26 2014 +0300
Committer: S.Vladykin 
Committed: Wed Dec 10 12:27:26 2014 +0300

--
 .../grid/kernal/visor/VisorMultiNodeTask.java   | 31 +++---
 .../visor/node/VisorNodeDataCollectorJob.java   | 64 
 .../visor/node/VisorNodeDataCollectorTask.java  | 24 
 3 files changed, 88 insertions(+), 31 deletions(-)
--




svn commit: r1644562 [9/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Added: incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid-framework.scss
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid-framework.scss?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid-framework.scss 
(added)
+++ incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid-framework.scss Thu 
Dec 11 06:20:14 2014
@@ -0,0 +1,81 @@
+// Framework grid generation
+//
+// Used only by Bootstrap to generate the correct number of grid classes given
+// any value of `$grid-columns`.
+
+// [converter] This is defined recursively in LESS, but Sass supports real 
loops
+@mixin make-grid-columns($i: 1, $list: ".col-xs-#{$i}, .col-sm-#{$i}, 
.col-md-#{$i}, .col-lg-#{$i}") {
+  @for $i from (1 + 1) through $grid-columns {
+$list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, 
.col-lg-#{$i}";
+  }
+  #{$list} {
+position: relative;
+// Prevent columns from collapsing when empty
+min-height: 1px;
+// Inner gutter via padding
+padding-left:  ($grid-gutter-width / 2);
+padding-right: ($grid-gutter-width / 2);
+  }
+}
+
+
+// [converter] This is defined recursively in LESS, but Sass supports real 
loops
+@mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
+  @for $i from (1 + 1) through $grid-columns {
+$list: "#{$list}, .col-#{$class}-#{$i}";
+  }
+  #{$list} {
+float: left;
+  }
+}
+
+
+@mixin calc-grid-column($index, $class, $type) {
+  @if ($type == width) and ($index > 0) {
+.col-#{$class}-#{$index} {
+  width: percentage(($index / $grid-columns));
+}
+  }
+  @if ($type == push) and ($index > 0) {
+.col-#{$class}-push-#{$index} {
+  left: percentage(($index / $grid-columns));
+}
+  }
+  @if ($type == push) and ($index == 0) {
+.col-#{$class}-push-0 {
+  left: auto;
+}
+  }
+  @if ($type == pull) and ($index > 0) {
+.col-#{$class}-pull-#{$index} {
+  right: percentage(($index / $grid-columns));
+}
+  }
+  @if ($type == pull) and ($index == 0) {
+.col-#{$class}-pull-0 {
+  right: auto;
+}
+  }
+  @if ($type == offset) {
+.col-#{$class}-offset-#{$index} {
+  margin-left: percentage(($index / $grid-columns));
+}
+  }
+}
+
+// [converter] This is defined recursively in LESS, but Sass supports real 
loops
+@mixin loop-grid-columns($columns, $class, $type) {
+  @for $i from 0 through $columns {
+@include calc-grid-column($i, $class, $type);
+  }
+}
+
+
+// Create grid for specific class
+@mixin make-grid($class) {
+  @include float-grid-columns($class);
+  @include loop-grid-columns($grid-columns, $class, width);
+  @include loop-grid-columns($grid-columns, $class, pull);
+  @include loop-grid-columns($grid-columns, $class, push);
+  @include loop-grid-columns($grid-columns, $class, offset);
+}

Propchange: 
incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid-framework.scss
--
svn:executable = *

Added: incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid.scss
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid.scss?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid.scss (added)
+++ incubator/ignite/site/trunk/scss/bootstrap/mixins/_grid.scss Thu Dec 11 
06:20:14 2014
@@ -0,0 +1,122 @@
+// Grid system
+//
+// Generate semantic grid columns with these mixins.
+
+// Centered container element
+@mixin container-fixed($gutter: $grid-gutter-width) {
+  margin-right: auto;
+  margin-left: auto;
+  padding-left:  ($gutter / 2);
+  padding-right: ($gutter / 2);
+  @include clearfix();
+}
+
+// Creates a wrapper for a series of columns
+@mixin make-row($gutter: $grid-gutter-width) {
+  margin-left:  ($gutter / -2);
+  margin-right: ($gutter / -2);
+  @include clearfix();
+}
+
+// Generate the extra small columns
+@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
+  position: relative;
+  float: left;
+  width: percentage(($columns / $grid-columns));
+  min-height: 1px;
+  padding-left:  ($gutter / 2);
+  padding-right: ($gutter / 2);
+}
+@mixin make-xs-column-offset($columns) {
+  margin-left: percentage(($columns / $grid-columns));
+}
+@mixin make-xs-column-push($columns) {
+  left: percentage(($columns / $grid-columns));
+}
+@mixin make-xs-column-pull($columns) {
+  right: percentage(($columns / $grid-columns));
+}
+
+// Generate the small columns
+@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
+  position: relative;
+  min-height: 1px;
+  padding-left:  ($gutter / 2);
+  padding-right: ($gutter / 2);
+
+  @media (min-width: $screen-sm-min) {
+float: left;
+width: percentage(($columns / $grid-columns));
+  }
+}
+@mixin make-sm-column-offset($columns) {
+  @media (min-width

svn commit: r1644562 [3/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Propchange: incubator/ignite/site/trunk/css/all.css
--
svn:executable = *

Added: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.eot
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/atilla_normal-webfont.eot?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.eot
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.eot
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.svg
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/atilla_normal-webfont.svg?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/fonts/atilla_normal-webfont.svg (added)
+++ incubator/ignite/site/trunk/fonts/atilla_normal-webfont.svg Thu Dec 11 
06:20:14 2014
@@ -0,0 +1,235 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"; >
+http://www.w3.org/2000/svg";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
\ No newline at end of file

Propchange: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.svg
--
svn:executable = *

Added: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.ttf
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/atilla_normal-webfont.ttf?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.ttf
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.ttf
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.woff
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/atilla_normal-webfont.woff?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.woff
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/atilla_normal-webfont.woff
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/generator_config.txt
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/generator_config.txt?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/fonts/generator_config.txt (added)
+++ incubator/ignite/site/trunk/fonts/generator_config.txt Thu Dec 11 06:20:14 
2014
@@ -0,0 +1,5 @@
+# Font Squirrel Font-face Generator Configuration File
+# Upload this file to the generator to recreate the settings
+# you used to create these fonts.
+
+{"mode":"expert","formats":["ttf","woff","eotz","svg"],"tt_instructor":"default","fix_vertical_metrics":"Y","fix_gasp":"xy","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"}
\ No newline at end of file

Propchange: incubator/ignite/site/trunk/fonts/generator_config.txt
--
svn:executable = *

Added: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.eot
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.eot?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.eot
-

svn commit: r1644562 [5/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Added: incubator/ignite/site/trunk/fonts/harabara-webfont.svg
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/harabara-webfont.svg?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/fonts/harabara-webfont.svg (added)
+++ incubator/ignite/site/trunk/fonts/harabara-webfont.svg Thu Dec 11 06:20:14 
2014
@@ -0,0 +1,204 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"; >
+http://www.w3.org/2000/svg";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
\ No newline at end of file

Propchange: incubator/ignite/site/trunk/fonts/harabara-webfont.svg
--
svn:executable = *

Added: incubator/ignite/site/trunk/fonts/harabara-webfont.ttf
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/harabara-webfont.ttf?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/harabara-webfont.ttf
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/harabara-webfont.ttf
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/harabara-webfont.woff
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/harabara-webfont.woff?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/harabara-webfont.woff
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/harabara-webfont.woff
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/icomoon.eot
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/icomoon.eot?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/icomoon.eot
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/icomoon.eot
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/icomoon.svg
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/icomoon.svg?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/fonts/icomoon.svg (added)
+++ incubator/ignite/site/trunk/fonts/icomoon.svg Thu Dec 11 06:20:14 2014
@@ -0,0 +1,16 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"; >
+http://www.w3.org/2000/svg";>
+Generated by IcoMoon
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file

Propchange: incubator/ignite/site/trunk/fonts/icomoon.svg
--
svn:executable = *

Added: incubator/ignite/site/trunk/fonts/icomoon.ttf
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/icomoon.ttf?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/icomoon.ttf
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/icomoon.ttf
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/icomoon.woff
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/icomoon.woff?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/icomoon.woff
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/icomoon.woff
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk

svn commit: r1644562 [7/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Added: incubator/ignite/site/trunk/scss/bootstrap/_glyphicons.scss
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/scss/bootstrap/_glyphicons.scss?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/scss/bootstrap/_glyphicons.scss (added)
+++ incubator/ignite/site/trunk/scss/bootstrap/_glyphicons.scss Thu Dec 11 
06:20:14 2014
@@ -0,0 +1,237 @@
+//= depend_on "bootstrap/glyphicons-halflings-regular.eot"
+//= depend_on "bootstrap/glyphicons-halflings-regular.svg"
+//= depend_on "bootstrap/glyphicons-halflings-regular.ttf"
+//= depend_on "bootstrap/glyphicons-halflings-regular.woff"
+//
+// Glyphicons for Bootstrap
+//
+// Since icons are fonts, they can be placed anywhere text is placed and are
+// thus automatically sized to match the surrounding child. To use, create an
+// inline element with the appropriate classes, like so:
+//
+//  Star
+
+// Import the fonts
+@font-face {
+  font-family: 'Glyphicons Halflings';
+  src: url(if($bootstrap-sass-asset-helper, 
twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), 
'#{$icon-font-path}#{$icon-font-name}.eot'));
+  src: url(if($bootstrap-sass-asset-helper, 
twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix'), 
'#{$icon-font-path}#{$icon-font-name}.eot?#iefix')) format('embedded-opentype'),
+   url(if($bootstrap-sass-asset-helper, 
twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff'), 
'#{$icon-font-path}#{$icon-font-name}.woff')) format('woff'),
+   url(if($bootstrap-sass-asset-helper, 
twbs-font-path('#{$icon-font-path}#{$icon-font-name}.ttf'), 
'#{$icon-font-path}#{$icon-font-name}.ttf')) format('truetype'),
+   url(if($bootstrap-sass-asset-helper, 
twbs-font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}'),
 '#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}')) 
format('svg');
+}
+
+// Catchall baseclass
+.glyphicon {
+  position: relative;
+  top: 1px;
+  display: inline-block;
+  font-family: 'Glyphicons Halflings';
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+// Individual icons
+.glyphicon-asterisk   { &:before { content: "\2a"; } }
+.glyphicon-plus   { &:before { content: "\2b"; } }
+.glyphicon-euro   { &:before { content: "\20ac"; } }
+.glyphicon-minus  { &:before { content: "\2212"; } }
+.glyphicon-cloud  { &:before { content: "\2601"; } }
+.glyphicon-envelope   { &:before { content: "\2709"; } }
+.glyphicon-pencil { &:before { content: "\270f"; } }
+.glyphicon-glass  { &:before { content: "\e001"; } }
+.glyphicon-music  { &:before { content: "\e002"; } }
+.glyphicon-search { &:before { content: "\e003"; } }
+.glyphicon-heart  { &:before { content: "\e005"; } }
+.glyphicon-star   { &:before { content: "\e006"; } }
+.glyphicon-star-empty { &:before { content: "\e007"; } }
+.glyphicon-user   { &:before { content: "\e008"; } }
+.glyphicon-film   { &:before { content: "\e009"; } }
+.glyphicon-th-large   { &:before { content: "\e010"; } }
+.glyphicon-th { &:before { content: "\e011"; } }
+.glyphicon-th-list{ &:before { content: "\e012"; } }
+.glyphicon-ok { &:before { content: "\e013"; } }
+.glyphicon-remove { &:before { content: "\e014"; } }
+.glyphicon-zoom-in{ &:before { content: "\e015"; } }
+.glyphicon-zoom-out   { &:before { content: "\e016"; } }
+.glyphicon-off{ &:before { content: "\e017"; } }
+.glyphicon-signal { &:before { content: "\e018"; } }
+.glyphicon-cog{ &:before { content: "\e019"; } }
+.glyphicon-trash  { &:before { content: "\e020"; } }
+.glyphicon-home   { &:before { content: "\e021"; } }
+.glyphicon-file   { &:before { content: "\e022"; } }
+.glyphicon-time   { &:before { content: "\e023"; } }
+.glyphicon-road   { &:before { content: "\e024"; } }
+.glyphicon-download-alt   { &:before { content: "\e025"; } }
+.glyphicon-download   { &:before { content: "\e026"; } }
+.glyphicon-upload { &:before { content: "\e027"; } }
+.glyphicon-inbox  { &:before { content: "\e028"; } }
+.glyphicon-play-circle{ &:before { content: "\e029"; } }
+.glyphicon-repeat { &:before { content: "\e030"; } }
+.glyphicon-refresh{ &:before { content: "\e031"; } }
+.glyphicon-list-alt   { &:before { content: "\e032"; } }
+.glyphicon-lock   { &:before { content: "\e033"; } }
+.glyphicon-flag   

svn commit: r1644562 [8/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Added: incubator/ignite/site/trunk/scss/bootstrap/_responsive-embed.scss
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/scss/bootstrap/_responsive-embed.scss?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/scss/bootstrap/_responsive-embed.scss (added)
+++ incubator/ignite/site/trunk/scss/bootstrap/_responsive-embed.scss Thu Dec 
11 06:20:14 2014
@@ -0,0 +1,34 @@
+// Embeds responsive
+//
+// Credit: Nicolas Gallagher and SUIT CSS.
+
+.embed-responsive {
+  position: relative;
+  display: block;
+  height: 0;
+  padding: 0;
+  overflow: hidden;
+
+  .embed-responsive-item,
+  iframe,
+  embed,
+  object {
+position: absolute;
+top: 0;
+left: 0;
+bottom: 0;
+height: 100%;
+width: 100%;
+border: 0;
+  }
+
+  // Modifier class for 16:9 aspect ratio
+  &.embed-responsive-16by9 {
+padding-bottom: 56.25%;
+  }
+
+  // Modifier class for 4:3 aspect ratio
+  &.embed-responsive-4by3 {
+padding-bottom: 75%;
+  }
+}

Propchange: incubator/ignite/site/trunk/scss/bootstrap/_responsive-embed.scss
--
svn:executable = *

Added: incubator/ignite/site/trunk/scss/bootstrap/_responsive-utilities.scss
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/scss/bootstrap/_responsive-utilities.scss?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/scss/bootstrap/_responsive-utilities.scss 
(added)
+++ incubator/ignite/site/trunk/scss/bootstrap/_responsive-utilities.scss Thu 
Dec 11 06:20:14 2014
@@ -0,0 +1,174 @@
+//
+// Responsive: Utility classes
+// --
+
+
+// IE10 in Windows (Phone) 8
+//
+// Support for responsive views via media queries is kind of borked in IE10, 
for
+// Surface/desktop in split view and for Windows Phone 8. This particular fix
+// must be accompanied by a snippet of JavaScript to sniff the user agent and
+// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
+// our Getting Started page for more information on this bug.
+//
+// For more information, see the following:
+//
+// Issue: https://github.com/twbs/bootstrap/issues/10497
+// Docs: http://getbootstrap.com/getting-started/#support-ie10-width
+// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
+// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
+
+@-ms-viewport {
+  width: device-width;
+}
+
+
+// Visibility utilities
+// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as 
of v3.2.0
+
+@include responsive-invisibility('.visible-xs, .visible-sm, .visible-md, 
.visible-lg');
+
+.visible-xs-block,
+.visible-xs-inline,
+.visible-xs-inline-block,
+.visible-sm-block,
+.visible-sm-inline,
+.visible-sm-inline-block,
+.visible-md-block,
+.visible-md-inline,
+.visible-md-inline-block,
+.visible-lg-block,
+.visible-lg-inline,
+.visible-lg-inline-block {
+  display: none !important;
+}
+
+@media (max-width: $screen-xs-max) {
+  @include responsive-visibility('.visible-xs');
+}
+.visible-xs-block {
+  @media (max-width: $screen-xs-max) {
+display: block !important;
+  }
+}
+.visible-xs-inline {
+  @media (max-width: $screen-xs-max) {
+display: inline !important;
+  }
+}
+.visible-xs-inline-block {
+  @media (max-width: $screen-xs-max) {
+display: inline-block !important;
+  }
+}
+
+@media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
+  @include responsive-visibility('.visible-sm');
+}
+.visible-sm-block {
+  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
+display: block !important;
+  }
+}
+.visible-sm-inline {
+  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
+display: inline !important;
+  }
+}
+.visible-sm-inline-block {
+  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
+display: inline-block !important;
+  }
+}
+
+@media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
+  @include responsive-visibility('.visible-md');
+}
+.visible-md-block {
+  @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
+display: block !important;
+  }
+}
+.visible-md-inline {
+  @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
+display: inline !important;
+  }
+}
+.visible-md-inline-block {
+  @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
+display: inline-block !important;
+  }
+}
+
+@media (min-width: $screen-lg-min) {
+  @include responsive-visibility('.visible-lg');
+}
+.visible-lg-block {
+  @media (min-width: $screen-lg-min) {
+display: block !important;
+  }
+}
+.visible-lg-inline {
+  @media (min-width: $screen-lg-min) {
+display: inline !important;
+  }
+}
+.visible-lg-inline-block {
+  @media (min-width: $screen-lg-min) {
+disp

svn commit: r1644562 [4/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Added: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.svg
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.svg?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.svg (added)
+++ incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.svg Thu Dec 
11 06:20:14 2014
@@ -0,0 +1,229 @@
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"; >
+http://www.w3.org/2000/svg";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file

Propchange: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.svg
--
svn:executable = *

Added: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.ttf
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.ttf?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.ttf
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.ttf
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.woff
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.woff?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.woff
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.woff
--
svn:mime-type = application/octet-stream

Added: incubator/ignite/site/trunk/fonts/harabara-webfont.eot
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/fonts/harabara-webfont.eot?rev=1644562&view=auto
==
Binary file - no diff available.

Propchange: incubator/ignite/site/trunk/fonts/harabara-webfont.eot
--
svn:executable = *

Propchange: incubator/ignite/site/trunk/fonts/harabara-webfont.eot
--
svn:mime-type = application/octet-stream




svn commit: r1644562 [6/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Added: incubator/ignite/site/trunk/js/jquery.main.js
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/js/jquery.main.js?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/js/jquery.main.js (added)
+++ incubator/ignite/site/trunk/js/jquery.main.js Thu Dec 11 06:20:14 2014
@@ -0,0 +1,268 @@
+// page init
+jQuery(function(){
+   initAnchors();
+});
+
+// initialize fixed blocks on scroll
+function initAnchors() {
+   new SmoothScroll({
+   anchorLinks: 'a[href^="#"]',
+   activeClasses: 'parent',
+   anchorActiveClass: 'active',
+   sectionActiveClass: 'active'
+   });
+}
+
+/*!
+ * SmoothScroll module
+ */
+;(function($, exports) {
+
+   // private variables
+   var page,
+   win = $(window),
+   activeBlock, activeWheelHandler,
+   wheelEvents = ('onwheel' in document || document.documentMode 
>= 9 ? 'wheel' : 'mousewheel DOMMouseScroll');
+
+   // animation handlers
+   function scrollTo(offset, options, callback) {
+   // initialize variables
+   var scrollBlock;
+   if(document.body) {
+   if(typeof options === 'number') {
+   options = { duration: options };
+   } else {
+   options = options || {};
+   }
+   page = page || $('html, body');
+   scrollBlock = options.container || page;
+   } else {
+   return;
+   }
+
+   // treat single number as scrollTop
+   if(typeof offset === 'number') {
+   offset = { top: offset };
+   }
+
+   // handle mousewheel/trackpad while animation is active
+   if(activeBlock && activeWheelHandler) {
+   activeBlock.off('mousewheel', activeWheelHandler);
+   }
+   if(options.wheelBehavior && options.wheelBehavior !== 'none') {
+   activeWheelHandler = function(e) {
+   if(options.wheelBehavior === 'stop') {
+   scrollBlock.off('mousewheel', 
activeWheelHandler);
+   scrollBlock.stop();
+   } else if(options.wheelBehavior === 'ignore') {
+   e.preventDefault();
+   }
+   };
+   activeBlock = scrollBlock.on('mousewheel', 
activeWheelHandler);
+   }
+
+   // start scrolling animation
+   scrollBlock.stop().animate({
+   scrollLeft: offset.left,
+   scrollTop: offset.top
+   }, options.duration, function(){
+   if(activeWheelHandler) {
+   scrollBlock.off('mousewheel', 
activeWheelHandler);
+   }
+   if($.isFunction(callback)) {
+   callback();
+   }
+   });
+   }
+
+   // smooth scroll contstructor
+   function SmoothScroll(options) {
+   this.options = $.extend({
+   anchorLinks: 'a[href^="#"]',// selector or jQuery 
object
+   container: null,// specify container 
for scrolling (default - whole page)
+   extraOffset: null,  // function or fixed 
number
+   activeClasses: null,// null, "link", "parent"
+   easing: 'swing',// easing of scrolling
+   animMode: 'duration',   // or "speed" mode
+   animDuration: 800,  // total duration for 
scroll (any distance)
+   animSpeed: 1500,// pixels per second
+   anchorActiveClass: 'anchor-active',
+   sectionActiveClass: 'section-active',
+   wheelBehavior: 'stop', // "stop", "ignore" or "none"
+   useNativeAnchorScrolling: false // do not handle click 
in devices with native smooth scrolling
+   }, options);
+   this.init();
+   }
+   SmoothScroll.prototype = {
+   init: function() {
+   this.initStructure();
+   this.attachEvents();
+   },
+   initStructure: function(options) {
+   this.container = this.options.container ? 
$(this.options.container) : $('html,body');
+   this.scrollContainer = this.options.container ? 
this.container : win;
+   this.anchorLinks = $(this.options.anchorLinks);
+ 

svn commit: r1644562 [1/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan
Author: dsetrakyan
Date: Thu Dec 11 06:20:14 2014
New Revision: 1644562

URL: http://svn.apache.org/r1644562
Log:
initial website version

Added:
incubator/ignite/site/trunk/css/
incubator/ignite/site/trunk/css/all.css   (with props)
incubator/ignite/site/trunk/fonts/
incubator/ignite/site/trunk/fonts/atilla_normal-webfont.eot   (with props)
incubator/ignite/site/trunk/fonts/atilla_normal-webfont.svg   (with props)
incubator/ignite/site/trunk/fonts/atilla_normal-webfont.ttf   (with props)
incubator/ignite/site/trunk/fonts/atilla_normal-webfont.woff   (with props)
incubator/ignite/site/trunk/fonts/generator_config.txt   (with props)
incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.eot   (with 
props)
incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.svg   (with 
props)
incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.ttf   (with 
props)
incubator/ignite/site/trunk/fonts/glyphicons-halflings-regular.woff   (with 
props)
incubator/ignite/site/trunk/fonts/harabara-webfont.eot   (with props)
incubator/ignite/site/trunk/fonts/harabara-webfont.svg   (with props)
incubator/ignite/site/trunk/fonts/harabara-webfont.ttf   (with props)
incubator/ignite/site/trunk/fonts/harabara-webfont.woff   (with props)
incubator/ignite/site/trunk/fonts/icomoon.eot   (with props)
incubator/ignite/site/trunk/fonts/icomoon.svg   (with props)
incubator/ignite/site/trunk/fonts/icomoon.ttf   (with props)
incubator/ignite/site/trunk/fonts/icomoon.woff   (with props)
incubator/ignite/site/trunk/images/
incubator/ignite/site/trunk/images/bg-carousel.jpg   (with props)
incubator/ignite/site/trunk/images/fabric.jpg   (with props)
incubator/ignite/site/trunk/images/ico-hadoop.png   (with props)
incubator/ignite/site/trunk/images/ico-java.png   (with props)
incubator/ignite/site/trunk/images/ico-net.png   (with props)
incubator/ignite/site/trunk/images/ico-trust.png   (with props)
incubator/ignite/site/trunk/images/ico-verisign.png   (with props)
incubator/ignite/site/trunk/images/img1.png   (with props)
incubator/ignite/site/trunk/images/in_memory_compute.png   (with props)
incubator/ignite/site/trunk/images/in_memory_data.png   (with props)
incubator/ignite/site/trunk/images/in_memory_streaming.png   (with props)
incubator/ignite/site/trunk/images/logo.png   (with props)
incubator/ignite/site/trunk/images/logo2.png   (with props)
incubator/ignite/site/trunk/images/sprite.png   (with props)
incubator/ignite/site/trunk/js/
incubator/ignite/site/trunk/js/jquery-1.11.1.min.js   (with props)
incubator/ignite/site/trunk/js/jquery.main.js   (with props)
incubator/ignite/site/trunk/scss/
incubator/ignite/site/trunk/scss/_bootstrap-custom.scss   (with props)
incubator/ignite/site/trunk/scss/_markup-mixins.scss   (with props)
incubator/ignite/site/trunk/scss/all.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/
incubator/ignite/site/trunk/scss/bootstrap.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_alerts.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_badges.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_breadcrumbs.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_button-groups.scss   (with 
props)
incubator/ignite/site/trunk/scss/bootstrap/_buttons.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_carousel.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_close.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_code.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_component-animations.scss   
(with props)
incubator/ignite/site/trunk/scss/bootstrap/_dropdowns.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_forms.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_glyphicons.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_grid.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_input-groups.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_jumbotron.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_labels.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_list-group.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_media.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_mixins.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_modals.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_navbar.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_navs.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_normalize.scss   (with props)
incubator/ignite/site/trunk/scss/bootstrap/_pager.scss   (with props)
incubator/ignite/site/trunk/scss/bootstra

svn commit: r1644562 [2/9] - in /incubator/ignite/site/trunk: ./ css/ fonts/ images/ js/ scss/ scss/bootstrap/ scss/bootstrap/mixins/

2014-12-10 Thread dsetrakyan

Added: incubator/ignite/site/trunk/css/all.css
URL: 
http://svn.apache.org/viewvc/incubator/ignite/site/trunk/css/all.css?rev=1644562&view=auto
==
--- incubator/ignite/site/trunk/css/all.css (added)
+++ incubator/ignite/site/trunk/css/all.css Thu Dec 11 06:20:14 2014
@@ -0,0 +1,7621 @@
+/* colors */
+/* Scaffolding */
+/* Typography */
+/* Iconography */
+/* Buttons */
+/* Grid system */
+/* Container sizes */
+/* Navbar */
+/* Media queries breakpoints */
+/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
+html {
+  font-family: sans-serif;
+  -ms-text-size-adjust: 100%;
+  -webkit-text-size-adjust: 100%;
+}
+
+body {
+  margin: 0;
+}
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+  display: block;
+}
+
+audio,
+canvas,
+progress,
+video {
+  display: inline-block;
+  vertical-align: baseline;
+}
+
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+
+[hidden],
+template {
+  display: none;
+}
+
+a {
+  background: transparent;
+}
+
+a:active,
+a:hover {
+  outline: 0;
+}
+
+abbr[title] {
+  border-bottom: 1px dotted;
+}
+
+b,
+strong {
+  font-weight: bold;
+}
+
+dfn {
+  font-style: italic;
+}
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+mark {
+  background: #ff0;
+  color: #000;
+}
+
+small {
+  font-size: 80%;
+}
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sup {
+  top: -0.5em;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+img {
+  border: 0;
+}
+
+svg:not(:root) {
+  overflow: hidden;
+}
+
+figure {
+  margin: 1em 40px;
+}
+
+hr {
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  height: 0;
+}
+
+pre {
+  overflow: auto;
+}
+
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em;
+}
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  color: inherit;
+  font: inherit;
+  margin: 0;
+}
+
+button {
+  overflow: visible;
+}
+
+button,
+select {
+  text-transform: none;
+}
+
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+
+button[disabled],
+html input[disabled] {
+  cursor: default;
+}
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  border: 0;
+  padding: 0;
+}
+
+input {
+  line-height: normal;
+}
+
+input[type="checkbox"],
+input[type="radio"] {
+  box-sizing: border-box;
+  padding: 0;
+}
+
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+input[type="search"] {
+  -webkit-appearance: textfield;
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+fieldset {
+  border: 1px solid #c0c0c0;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em;
+}
+
+legend {
+  border: 0;
+  padding: 0;
+}
+
+textarea {
+  overflow: auto;
+}
+
+optgroup {
+  font-weight: bold;
+}
+
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+td,
+th {
+  padding: 0;
+}
+
+@media print {
+  * {
+text-shadow: none !important;
+color: #000 !important;
+background: transparent !important;
+box-shadow: none !important;
+  }
+
+  a,
+  a:visited {
+text-decoration: underline;
+  }
+
+  a[href]:after {
+content: " (" attr(href) ")";
+  }
+
+  abbr[title]:after {
+content: " (" attr(title) ")";
+  }
+
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+content: "";
+  }
+
+  pre,
+  blockquote {
+border: 1px solid #999;
+page-break-inside: avoid;
+  }
+
+  thead {
+display: table-header-group;
+  }
+
+  tr,
+  img {
+page-break-inside: avoid;
+  }
+
+  img {
+max-width: 100% !important;
+  }
+
+  p,
+  h2,
+  h3 {
+orphans: 3;
+widows: 3;
+  }
+
+  h2,
+  h3 {
+page-break-after: avoid;
+  }
+
+  select {
+background: #fff !important;
+  }
+
+  .navbar {
+display: none;
+  }
+
+  .table td,
+  .table th {
+background-color: #fff !important;
+  }
+
+  .btn > .caret,
+  .dropup > .btn > .caret {
+border-top-color: #000 !important;
+  }
+
+  .label {
+border: 1px solid #000;
+  }
+
+  .table {
+border-collapse: collapse !important;
+  }
+
+  .table-bordered th,
+  .table-bordered td {
+border: 1px solid #ddd !important;
+  }
+}
+@font-face {
+  font-family: 'Glyphicons Halflings';
+  src: url("../fonts/glyphicons-halflings-regular.eot");
+  src: url("../fonts/glyphicons-halflings-regular.eot?#iefix") 
format("embedded-opentype"), url("../fonts/glyphicons-halflings-regular.woff") 
format("woff"), url("../fonts/glyphicons-halflings-regular.ttf") 
format("truetype"), 
url("../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") 
format("svg");
+}
+.glyphicon {
+  position: relative;
+  top