Skip to content

Commit

Permalink
IGNITE-6120 Fixed lazy query since version for Web Console.
Browse files Browse the repository at this point in the history
  • Loading branch information
nva committed Sep 7, 2017
1 parent fea96f7 commit c03549e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
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;
Expand All @@ -35,6 +36,7 @@
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;
Expand Down Expand Up @@ -203,14 +205,23 @@ private static class TopologySnapshot {
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();
}

/**
Expand Down

0 comments on commit c03549e

Please sign in to comment.