ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [19/27] ignite git commit: IGNITE-6120 Fixed lazy query since version for Web Console.
Date Fri, 08 Sep 2017 08:26:39 GMT
IGNITE-6120 Fixed lazy query since version for Web Console.


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

Branch: refs/heads/ignite-3478
Commit: c03549e8fd1853e90aa9ed20902f4bcb6cfc7271
Parents: fea96f7
Author: Andrey Novikov <anovikov@gridgain.com>
Authored: Mon Sep 4 16:05:34 2017 +0700
Committer: Andrey Novikov <anovikov@gridgain.com>
Committed: Thu Sep 7 14:40:49 2017 +0700

----------------------------------------------------------------------
 .../app/modules/agent/AgentManager.service.js   |  2 +-
 .../modules/configuration/Version.service.js    |  2 +-
 .../frontend/app/modules/sql/sql.controller.js  |  2 +-
 .../console/agent/handlers/ClusterListener.java | 21 +++++++++++++++-----
 4 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c03549e8/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/agent/AgentManager.service.js b/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
index 4ef274d..7c84edc 100644
--- a/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
+++ b/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
@@ -495,7 +495,7 @@ export default class IgniteAgentManager {
      */
     querySql(nid, cacheName, query, nonCollocatedJoins, enforceJoinOrder, replicatedOnly,
local, pageSz, lazy) {
         if (this.available('2.0.0')) {
-            const task = this.available('2.1.4') ?
+            const task = this.available('2.1.4-p1') ?
                 this.visorTask('querySqlX2', nid, cacheName, query, nonCollocatedJoins, enforceJoinOrder,
replicatedOnly, local, pageSz, lazy) :
                 this.visorTask('querySqlX2', nid, cacheName, query, nonCollocatedJoins, enforceJoinOrder,
replicatedOnly, local, pageSz);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c03549e8/modules/web-console/frontend/app/modules/configuration/Version.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/Version.service.js b/modules/web-console/frontend/app/modules/configuration/Version.service.js
index ad8916c..210b34a 100644
--- a/modules/web-console/frontend/app/modules/configuration/Version.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/Version.service.js
@@ -68,7 +68,7 @@ const compare = (a, b) => {
     if (res !== 0)
         return res;
 
-    return numberComparator(a.revTs, b.revTs);
+    return numberComparator(a.stage, b.stage);
 };
 
 export default class IgniteVersion {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c03549e8/modules/web-console/frontend/app/modules/sql/sql.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/sql/sql.controller.js b/modules/web-console/frontend/app/modules/sql/sql.controller.js
index ddc2fca..c43dc5c 100644
--- a/modules/web-console/frontend/app/modules/sql/sql.controller.js
+++ b/modules/web-console/frontend/app/modules/sql/sql.controller.js
@@ -30,7 +30,7 @@ const NON_COLLOCATED_JOINS_SINCE = '1.7.0';
 
 const ENFORCE_JOIN_VERS = [['1.7.9', '1.8.0'], ['1.8.4', '1.9.0'], ['1.9.1']];
 
-const LAZY_QUERY_VERS = ['2.1.4'];
+const LAZY_QUERY_VERS = ['2.1.4-p1'];
 
 const _fullColName = (col) => {
     const res = [];

http://git-wip-us.apache.org/repos/asf/ignite/blob/c03549e8/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
index 435ce74..8eed3dd 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
@@ -24,6 +24,7 @@ import io.socket.emitter.Emitter;
 import java.net.ConnectException;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.UUID;
 import java.util.concurrent.Executors;
@@ -35,6 +36,7 @@ import org.apache.ignite.console.agent.rest.RestResult;
 import org.apache.ignite.internal.processors.rest.client.message.GridClientNodeBean;
 import org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyObjectMapper;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteProductVersion;
@@ -203,14 +205,23 @@ public class ClusterListener {
         TopologySnapshot(Collection<GridClientNodeBean> nodes) {
             nids = F.viewReadOnly(nodes, NODE2ID);
 
-            Collection<IgniteProductVersion> vers = F.transform(nodes,
-                new IgniteClosure<GridClientNodeBean, IgniteProductVersion>() {
-                    @Override public IgniteProductVersion apply(GridClientNodeBean bean)
{
-                        return IgniteProductVersion.fromString((String)bean.getAttributes().get(ATTR_BUILD_VER));
+            Collection<T2<String, IgniteProductVersion>> vers = F.transform(nodes,
+                new IgniteClosure<GridClientNodeBean, T2<String, IgniteProductVersion>>()
{
+                    @Override public T2<String, IgniteProductVersion> apply(GridClientNodeBean
bean) {
+                        String ver = (String)bean.getAttributes().get(ATTR_BUILD_VER);
+
+                        return new T2<>(ver, IgniteProductVersion.fromString(ver));
                     }
                 });
 
-            clusterVer = Collections.min(vers).toString();
+            T2<String, IgniteProductVersion> min = Collections.min(vers, new Comparator<T2<String,
IgniteProductVersion>>() {
+                @SuppressWarnings("ConstantConditions")
+                @Override public int compare(T2<String, IgniteProductVersion> o1, T2<String,
IgniteProductVersion> o2) {
+                    return o1.get2().compareTo(o2.get2());
+                }
+            });
+
+            clusterVer = min.get1();
         }
 
         /**


Mime
View raw message