You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/04/10 17:48:48 UTC
[01/17] incubator-ignite git commit: # ignite 692 Reworked to use new
SQL API.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-sprint-3 dedcda164 -> cd09524ea
# ignite 692 Reworked to use new SQL API.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c06a4ae1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c06a4ae1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c06a4ae1
Branch: refs/heads/ignite-sprint-3
Commit: c06a4ae1aae210ab200767b05e4da78b518fa111
Parents: d20d29b
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Apr 7 18:43:06 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Apr 7 18:43:06 2015 +0700
----------------------------------------------------------------------
.../processors/cache/GridCacheProcessor.java | 15 ++-
.../visor/query/VisorQueryCleanupTask.java | 2 +-
.../internal/visor/query/VisorQueryCursor.java | 72 ++++++++++++
.../visor/query/VisorQueryNextPageTask.java | 45 +++++---
.../visor/query/VisorQueryResultEx.java | 6 +-
.../internal/visor/query/VisorQueryTask.java | 111 +++++++------------
.../internal/visor/query/VisorQueryUtils.java | 47 ++++----
7 files changed, 178 insertions(+), 120 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c06a4ae1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 5ca4bcd..65c6e54 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -2306,12 +2306,13 @@ public class GridCacheProcessor extends GridProcessorAdapter {
/**
* @param cacheName Cache name.
+ * @param userOnly If {@code true} then throws {@link IllegalStateException} in case of system cache.
* @param <K> type of keys.
* @param <V> type of values.
* @return Cache instance for given name.
*/
@SuppressWarnings("unchecked")
- public <K, V> IgniteCache<K, V> publicJCache(@Nullable String cacheName) {
+ public <K, V> IgniteCache<K, V> privateJCache(@Nullable String cacheName, boolean userOnly) {
if (log.isDebugEnabled())
log.debug("Getting public cache for name: " + cacheName);
@@ -2322,7 +2323,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
DynamicCacheDescriptor desc = registeredCaches.get(masked);
- if (desc != null && !desc.cacheType().userCache())
+ if (userOnly && desc != null && !desc.cacheType().userCache())
throw new IllegalStateException("Failed to get cache because it is a system cache: " + cacheName);
if (cache == null) {
@@ -2361,6 +2362,16 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
/**
+ * @param cacheName Cache name.
+ * @param <K> type of keys.
+ * @param <V> type of values.
+ * @return Cache instance for given name.
+ */
+ public <K, V> IgniteCache<K, V> publicJCache(@Nullable String cacheName) {
+ return privateJCache(cacheName, true);
+ }
+
+ /**
* @param name Cache name.
* @return Cache instance for given name.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c06a4ae1/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
index 11e5c81..1386638 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
@@ -86,7 +86,7 @@ public class VisorQueryCleanupTask extends VisorMultiNodeTask<Map<UUID, Collecti
/** {@inheritDoc} */
@Override protected Void run(Collection<String> qryIds) {
- ConcurrentMap<String, VisorQueryTask.VisorFutureResultSetHolder> locMap = ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> locMap = ignite.cluster().nodeLocalMap();
for (String qryId : qryIds)
locMap.remove(qryId);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c06a4ae1/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java
new file mode 100644
index 0000000..981b297
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.query;
+
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.query.*;
+
+import java.util.*;
+
+/**
+ * Wrapper for query cursor.
+ */
+public class VisorQueryCursor<T> implements Iterator<T>, AutoCloseable {
+ /** */
+ private final QueryCursor<T> cur;
+
+ /** */
+ private final Iterator<T> itr;
+
+ /**
+ * @param cur Cursor.
+ */
+ public VisorQueryCursor(QueryCursor<T> cur) {
+ this.cur = cur;
+
+ itr = cur.iterator();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean hasNext() {
+ return itr.hasNext();
+ }
+
+ /** {@inheritDoc} */
+ @Override public T next() {
+ return itr.next();
+ }
+
+ /** {@inheritDoc} */
+ @Override public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+ /** {@inheritDoc} */
+ @Override public void close() throws Exception {
+ cur.close();
+ }
+
+ /**
+ * @return SQL Fields query result metadata.
+ */
+ @SuppressWarnings("unchecked")
+ public Collection<GridQueryFieldMetadata> fieldsMeta() {
+ return ((QueryCursorImpl)cur).fieldsMeta();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c06a4ae1/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
index d922ad1..8d21fcf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
@@ -67,53 +67,68 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin
}
}
- /** Collect data from SQL query */
+ /**
+ * Collect data from SQL query.
+ *
+ * @param arg
+ * @return
+ * @throws IgniteCheckedException
+ */
private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryTask.VisorFutureResultSetHolder<List<?>>> storage =
+ ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> storage =
ignite.cluster().nodeLocalMap();
- VisorQueryTask.VisorFutureResultSetHolder<List<?>> t = storage.get(arg.get1());
+ VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
if (t == null)
throw new GridInternalException("SQL query results are expired.");
- IgniteBiTuple<List<Object[]>, List<?>> nextRows = VisorQueryUtils.fetchSqlQueryRows(t.future(), t.next(), arg.get2());
+ VisorQueryCursor cur = t.cursor();
+
+ List<Object[]> nextRows = VisorQueryUtils.fetchSqlQueryRows(cur, arg.get2());
- boolean hasMore = nextRows.get2() != null;
+ boolean hasMore = cur.hasNext();
if (hasMore)
- storage.put(arg.get1(), new VisorQueryTask.VisorFutureResultSetHolder<>(t.future(), nextRows.get2(), true));
+ storage.put(arg.get1(), new VisorQueryTask.VisorQueryCursorHolder(t.cursor(), true));
else
storage.remove(arg.get1());
- return new VisorQueryResult(nextRows.get1(), hasMore, U.currentTimeMillis() - start);
+ return new VisorQueryResult(nextRows, hasMore, U.currentTimeMillis() - start);
}
- /** Collect data from SCAN query */
+ /**
+ * Collect data from SCAN query
+ *
+ * @param arg
+ * @return
+ * @throws IgniteCheckedException
+ */
private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>>> storage =
+ ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> storage =
ignite.cluster().nodeLocalMap();
- VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>> t = storage.get(arg.get1());
+ VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
if (t == null)
throw new GridInternalException("Scan query results are expired.");
- IgniteBiTuple<List<Object[]>, Map.Entry<Object, Object>> rows =
- VisorQueryUtils.fetchScanQueryRows(t.future(), t.next(), arg.get2());
+ VisorQueryCursor cur = t.cursor();
+
+ List<Object[]> rows = VisorQueryUtils.fetchScanQueryRows(cur, arg.get2());
- Boolean hasMore = rows.get2() != null;
+ Boolean hasMore = cur.hasNext();
if (hasMore)
- storage.put(arg.get1(), new VisorQueryTask.VisorFutureResultSetHolder<>(t.future(), rows.get2(), true));
+ storage.put(arg.get1(), new VisorQueryTask.VisorQueryCursorHolder(cur, true));
else
storage.remove(arg.get1());
- return new VisorQueryResult(rows.get1(), hasMore, U.currentTimeMillis() - start);
+ return new VisorQueryResult(rows, hasMore, U.currentTimeMillis() - start);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c06a4ae1/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
index ace9929..35ed790 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
@@ -35,7 +35,7 @@ public class VisorQueryResultEx extends VisorQueryResult {
private final String qryId;
/** Query columns descriptors. */
- private final VisorQueryField[] colNames;
+ private final Collection<VisorQueryField> colNames;
/**
* @param resNodeId Node where query executed.
@@ -48,7 +48,7 @@ public class VisorQueryResultEx extends VisorQueryResult {
public VisorQueryResultEx(
UUID resNodeId,
String qryId,
- VisorQueryField[] colNames,
+ Collection<VisorQueryField> colNames,
List<Object[]> rows,
Boolean hasMore,
long duration
@@ -77,7 +77,7 @@ public class VisorQueryResultEx extends VisorQueryResult {
/**
* @return Columns names.
*/
- public VisorQueryField[] columnNames() {
+ public Collection<VisorQueryField> columnNames() {
return colNames;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c06a4ae1/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index 5744f62..ae63e3c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -18,8 +18,8 @@
package org.apache.ignite.internal.visor.query;
import org.apache.ignite.*;
+import org.apache.ignite.cache.query.*;
import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.processors.query.*;
import org.apache.ignite.internal.processors.task.*;
import org.apache.ignite.internal.processors.timeout.*;
@@ -27,13 +27,13 @@ import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.internal.visor.*;
import org.apache.ignite.lang.*;
+import javax.cache.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.concurrent.*;
import static org.apache.ignite.internal.visor.query.VisorQueryUtils.*;
-import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
/**
* Task for execute SCAN or SQL query and get first page of results.
@@ -115,42 +115,30 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
* ResultSet future holder.
*/
@SuppressWarnings("PublicInnerClass")
- public static class VisorFutureResultSetHolder<R> implements Serializable {
+ public static class VisorQueryCursorHolder implements Serializable {
/** */
private static final long serialVersionUID = 0L;
- /** Future with query results. */
- private final CacheQueryFuture<R> fut;
-
- /** Next record from future. */
- private final R next;
+ /** Query cursor. */
+ private final VisorQueryCursor cur;
/** Flag indicating that this future was read from last check. */
- private Boolean accessed;
+ private boolean accessed;
/**
- * @param fut Future.
- * @param next Next value.
+ * @param cur Future.
* @param accessed {@code true} if query was accessed before remove timeout expired.
*/
- public VisorFutureResultSetHolder(CacheQueryFuture<R> fut, R next, Boolean accessed) {
- this.fut = fut;
- this.next = next;
+ public VisorQueryCursorHolder(VisorQueryCursor cur, boolean accessed) {
+ this.cur = cur;
this.accessed = accessed;
}
/**
- * @return Future with query results.
+ * @return Query cursor.
*/
- public CacheQueryFuture<R> future() {
- return fut;
- }
-
- /**
- * @return Next record from future.
- */
- public R next() {
- return next;
+ public VisorQueryCursor cursor() {
+ return cur;
}
/**
@@ -194,78 +182,59 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
String qryId = (scan ? SCAN_QRY_NAME : SQL_QRY_NAME) + "-" +
UUID.randomUUID();
- GridCache<Object, Object> c = ignite.cachex(arg.cacheName());
-
- if (c == null)
- return new IgniteBiTuple<>(new IgniteCheckedException("Cache not found: " +
- escapeName(arg.cacheName())), null);
+ GridCacheProcessor cacheProcessor = ignite.context().cache();
- CacheProjection<Object, Object> cp = c.keepPortable();
+ IgniteCache<Object, Object> c = cacheProcessor.privateJCache(arg.cacheName(), false);
if (scan) {
- CacheQueryFuture<Map.Entry<Object, Object>> fut = cp.queries().createScanQuery(null)
- .pageSize(arg.pageSize())
- .projection(ignite.cluster().forNodeIds(arg.proj()))
- .execute();
+ ScanQuery<Object, Object> qry = new ScanQuery<>(null);
+ qry.setPageSize(arg.pageSize());
long start = U.currentTimeMillis();
- IgniteBiTuple<List<Object[]>, Map.Entry<Object, Object>> rows =
- fetchScanQueryRows(fut, null, arg.pageSize());
-
- long fetchDuration = U.currentTimeMillis() - start;
+ VisorQueryCursor<Cache.Entry<Object, Object>> cur = new VisorQueryCursor<>(c.query(qry));
- long duration = fut.duration() + fetchDuration; // Scan duration + fetch duration.
+ List<Object[]> rows = fetchScanQueryRows(cur, arg.pageSize());
- Map.Entry<Object, Object> next = rows.get2();
+ long duration = U.currentTimeMillis() - start; // Scan duration + fetch duration.
- ignite.cluster().<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId,
- new VisorFutureResultSetHolder<>(fut, next, false));
+ ignite.cluster().<String, VisorQueryCursorHolder>nodeLocalMap().put(qryId,
+ new VisorQueryCursorHolder(cur, false));
scheduleResultSetHolderRemoval(qryId);
return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
- SCAN_COL_NAMES, rows.get1(), next != null, duration));
+ SCAN_COL_NAMES, rows, cur.hasNext(), duration));
}
else {
- CacheQueryFuture<List<?>> fut = ((GridCacheQueriesEx<?, ?>)cp.queries())
- .createSqlFieldsQuery(arg.queryTxt(), true)
- .pageSize(arg.pageSize())
- .projection(ignite.cluster().forNodeIds(arg.proj()))
- .execute();
+ SqlFieldsQuery qry = new SqlFieldsQuery(arg.queryTxt());
+ qry.setPageSize(arg.pageSize());
- List<Object> firstRow = (List<Object>)fut.next();
+ long start = U.currentTimeMillis();
+
+ VisorQueryCursor<List<?>> cur = new VisorQueryCursor<>(c.query(qry));
- List<GridQueryFieldMetadata> meta = ((GridCacheQueryMetadataAware)fut).metadata().get();
+ Collection<GridQueryFieldMetadata> meta = cur.fieldsMeta();
if (meta == null)
return new IgniteBiTuple<Exception, VisorQueryResultEx>(
new SQLException("Fail to execute query. No metadata available."), null);
else {
- VisorQueryField[] names = new VisorQueryField[meta.size()];
-
- for (int i = 0; i < meta.size(); i++) {
- GridQueryFieldMetadata col = meta.get(i);
-
- names[i] = new VisorQueryField(col.typeName(), col.fieldName());
- }
-
- long start = U.currentTimeMillis();
+ List<VisorQueryField> names = new ArrayList<>(meta.size());
- IgniteBiTuple<List<Object[]>, List<?>> rows =
- fetchSqlQueryRows(fut, firstRow, arg.pageSize());
+ for (GridQueryFieldMetadata col : meta)
+ names.add(new VisorQueryField(col.typeName(), col.fieldName()));
- long fetchDuration = U.currentTimeMillis() - start;
+ List<Object[]> rows = fetchSqlQueryRows(cur, arg.pageSize());
- long duration = fut.duration() + fetchDuration; // Query duration + fetch duration.
+ long duration = U.currentTimeMillis() - start; // Query duration + fetch duration.
- ignite.cluster().<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId,
- new VisorFutureResultSetHolder<>(fut, rows.get2(), false));
+ ignite.cluster().<String, VisorQueryCursorHolder>nodeLocalMap().put(qryId, new VisorQueryCursorHolder(cur, false));
scheduleResultSetHolderRemoval(qryId);
return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
- names, rows.get1(), rows.get2() != null, duration));
+ names, rows, cur.hasNext(), duration));
}
}
}
@@ -280,14 +249,14 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
private void scheduleResultSetHolderRemoval(final String id) {
ignite.context().timeout().addTimeoutObject(new GridTimeoutObjectAdapter(RMV_DELAY) {
@Override public void onTimeout() {
- ConcurrentMap<String, VisorFutureResultSetHolder> storage = ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursorHolder> storage = ignite.cluster().nodeLocalMap();
- VisorFutureResultSetHolder<?> t = storage.get(id);
+ VisorQueryCursorHolder holder = storage.get(id);
- if (t != null) {
+ if (holder != null) {
// If future was accessed since last scheduling, set access flag to false and reschedule.
- if (t.accessed()) {
- t.accessed(false);
+ if (holder.accessed()) {
+ holder.accessed(false);
scheduleResultSetHolderRemoval(id);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c06a4ae1/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
index ff847d2..f8f795d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
@@ -17,11 +17,9 @@
package org.apache.ignite.internal.visor.query;
-import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.util.*;
-import org.apache.ignite.lang.*;
+import javax.cache.*;
import java.math.*;
import java.net.*;
import java.util.*;
@@ -40,10 +38,10 @@ public class VisorQueryUtils {
public static final String SCAN_QRY_NAME = "VISOR_SCAN_QUERY";
/** Columns for SCAN queries. */
- public static final VisorQueryField[] SCAN_COL_NAMES = new VisorQueryField[] {
+ public static final Collection<VisorQueryField> SCAN_COL_NAMES = Arrays.asList(
new VisorQueryField("", "Key Class"), new VisorQueryField("", "Key"),
new VisorQueryField("", "Value Class"), new VisorQueryField("", "Value")
- };
+ );
/**
* @param o - Object.
@@ -114,32 +112,27 @@ public class VisorQueryUtils {
/**
* Fetch rows from SCAN query future.
*
- * @param fut Query future to fetch rows from.
- * @param savedNext Last processed element from future.
+ * @param cur Query future to fetch rows from.
* @param pageSize Number of rows to fetch.
- * @return Fetched rows and last processed element.
+ * @return Fetched rows.
*/
- public static IgniteBiTuple<List<Object[]>, Map.Entry<Object, Object>> fetchScanQueryRows(
- CacheQueryFuture<Map.Entry<Object, Object>> fut, Map.Entry<Object, Object> savedNext, int pageSize)
- throws IgniteCheckedException {
+ public static List<Object[]> fetchScanQueryRows(VisorQueryCursor<Cache.Entry<Object, Object>> cur, int pageSize) {
List<Object[]> rows = new ArrayList<>();
int cnt = 0;
- Map.Entry<Object, Object> next = savedNext != null ? savedNext : fut.next();
+ while (cur.hasNext() && cnt < pageSize) {
+ Cache.Entry<Object, Object> next = cur.next();
- while (next != null && cnt < pageSize) {
Object k = next.getKey();
Object v = next.getValue();
rows.add(new Object[] {typeOf(k), valueOf(k), typeOf(v), valueOf(v)});
cnt++;
-
- next = fut.next();
}
- return new IgniteBiTuple<>(rows, next);
+ return rows;
}
/**
@@ -165,23 +158,23 @@ public class VisorQueryUtils {
/**
* Collects rows from sql query future, first time creates meta and column names arrays.
*
- * @param fut Query future to fetch rows from.
- * @param savedNext Last processed element from future.
+ * @param cur Query cursor to fetch rows from.
* @param pageSize Number of rows to fetch.
- * @return Fetched rows and last processed element.
+ * @return Fetched rows.
*/
- public static IgniteBiTuple<List<Object[]>, List<?>> fetchSqlQueryRows(CacheQueryFuture<List<?>> fut,
- List<?> savedNext, int pageSize) throws IgniteCheckedException {
+ public static List<Object[]> fetchSqlQueryRows(VisorQueryCursor<List<?>> cur, int pageSize) {
List<Object[]> rows = new ArrayList<>();
int cnt = 0;
- List<?> next = savedNext != null ? savedNext : fut.next();
+ while (cur.hasNext() && cnt < pageSize) {
+ List<?> next = cur.next();
+
+ int sz = next.size();
- while (next != null && cnt < pageSize) {
- Object[] row = new Object[next.size()];
+ Object[] row = new Object[sz];
- for (int i = 0; i < next.size(); i++) {
+ for (int i = 0; i < sz; i++) {
Object o = next.get(i);
if (o == null)
@@ -195,10 +188,8 @@ public class VisorQueryUtils {
rows.add(row);
cnt++;
-
- next = fut.next();
}
- return new IgniteBiTuple<List<Object[]>, List<?>>(rows, next);
+ return rows;
}
}
[15/17] incubator-ignite git commit: # IGNITE-692 Removed not needed
holder wrapper. Added missing query cursor close.
Posted by ak...@apache.org.
# IGNITE-692 Removed not needed holder wrapper. Added missing query cursor close.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f475b07e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f475b07e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f475b07e
Branch: refs/heads/ignite-sprint-3
Commit: f475b07e3e248b304b40af427aa8cbcdaf2f6eb2
Parents: e101752
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 19:19:56 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 19:19:56 2015 +0700
----------------------------------------------------------------------
.../visor/query/VisorQueryCleanupTask.java | 10 ++-
.../internal/visor/query/VisorQueryCursor.java | 26 +++++++-
.../visor/query/VisorQueryCursorHolder.java | 64 --------------------
.../internal/visor/query/VisorQueryJob.java | 52 ++++++++++------
.../visor/query/VisorQueryNextPageTask.java | 38 +++++++-----
.../resources/META-INF/classnames.properties | 1 -
6 files changed, 87 insertions(+), 104 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f475b07e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
index d82f5fb..722ad91 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
@@ -86,10 +86,14 @@ public class VisorQueryCleanupTask extends VisorMultiNodeTask<Map<UUID, Collecti
/** {@inheritDoc} */
@Override protected Void run(Collection<String> qryIds) {
- ConcurrentMap<String, VisorQueryCursorHolder> locMap = ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursor> storage = ignite.cluster().nodeLocalMap();
- for (String qryId : qryIds)
- locMap.remove(qryId);
+ for (String qryId : qryIds) {
+ VisorQueryCursor cur = storage.remove(qryId);
+
+ if (cur != null)
+ cur.close();
+ }
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f475b07e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java
index 981b297..322b3b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursor.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.visor.query;
import org.apache.ignite.cache.query.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.query.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
import java.util.*;
@@ -33,6 +34,9 @@ public class VisorQueryCursor<T> implements Iterator<T>, AutoCloseable {
/** */
private final Iterator<T> itr;
+ /** Flag indicating that this cursor was read from last check. */
+ private volatile boolean accessed;
+
/**
* @param cur Cursor.
*/
@@ -58,7 +62,7 @@ public class VisorQueryCursor<T> implements Iterator<T>, AutoCloseable {
}
/** {@inheritDoc} */
- @Override public void close() throws Exception {
+ @Override public void close() {
cur.close();
}
@@ -69,4 +73,24 @@ public class VisorQueryCursor<T> implements Iterator<T>, AutoCloseable {
public Collection<GridQueryFieldMetadata> fieldsMeta() {
return ((QueryCursorImpl)cur).fieldsMeta();
}
+
+ /**
+ * @return Flag indicating that this future was read from last check..
+ */
+ public boolean accessed() {
+ return accessed;
+ }
+
+ /**
+ * @param accessed New accessed.
+ */
+ public void accessed(boolean accessed) {
+ this.accessed = accessed;
+ }
+
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(VisorQueryCursor.class, this);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f475b07e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java
deleted file mode 100644
index dec0253..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.visor.query;
-
-import java.io.*;
-
-/**
- * ResultSet future holder.
- */
-public class VisorQueryCursorHolder<T> implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Query cursor. */
- private final VisorQueryCursor<T> cur;
-
- /** Flag indicating that this future was read from last check. */
- private volatile boolean accessed;
-
- /**
- * @param cur Future.
- * @param accessed {@code true} if query was accessed before remove timeout expired.
- */
- public VisorQueryCursorHolder(VisorQueryCursor<T> cur, boolean accessed) {
- this.cur = cur;
- this.accessed = accessed;
- }
-
- /**
- * @return Query cursor.
- */
- public VisorQueryCursor<T> cursor() {
- return cur;
- }
-
- /**
- * @return Flag indicating that this future was read from last check..
- */
- public boolean accessed() {
- return accessed;
- }
-
- /**
- * @param accessed New accessed.
- */
- public void accessed(boolean accessed) {
- this.accessed = accessed;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f475b07e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
index 2d8b32e..dcc2242 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
@@ -82,13 +82,18 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
long duration = U.currentTimeMillis() - start; // Scan duration + fetch duration.
- ignite.cluster().<String, VisorQueryCursorHolder>nodeLocalMap().put(qryId,
- new VisorQueryCursorHolder<>(cur, false));
+ boolean hasNext = cur.hasNext();
- scheduleResultSetHolderRemoval(qryId);
+ if (hasNext) {
+ ignite.cluster().<String, VisorQueryCursor>nodeLocalMap().put(qryId, cur);
+
+ scheduleResultSetHolderRemoval(qryId);
+ }
+ else
+ cur.close();
return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
- SCAN_COL_NAMES, rows, cur.hasNext(), duration));
+ SCAN_COL_NAMES, rows, hasNext, duration));
}
else {
SqlFieldsQuery qry = new SqlFieldsQuery(arg.queryTxt());
@@ -114,13 +119,18 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
long duration = U.currentTimeMillis() - start; // Query duration + fetch duration.
- ConcurrentMap<String, VisorQueryCursorHolder<List<?>>> storage = ignite.cluster().nodeLocalMap();
- storage.put(qryId, new VisorQueryCursorHolder<>(cur, false));
+ boolean hasNext = cur.hasNext();
- scheduleResultSetHolderRemoval(qryId);
+ if (hasNext) {
+ ignite.cluster().<String, VisorQueryCursor<List<?>>>nodeLocalMap().put(qryId, cur);
+
+ scheduleResultSetHolderRemoval(qryId);
+ }
+ else
+ cur.close();
return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
- names, rows, cur.hasNext(), duration));
+ names, rows, hasNext, duration));
}
}
}
@@ -130,24 +140,28 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
}
/**
- * @param id Unique query result id.
+ * @param qryId Unique query result id.
*/
- private void scheduleResultSetHolderRemoval(final String id) {
+ private void scheduleResultSetHolderRemoval(final String qryId) {
ignite.context().timeout().addTimeoutObject(new GridTimeoutObjectAdapter(RMV_DELAY) {
@Override public void onTimeout() {
- ConcurrentMap<String, VisorQueryCursorHolder> storage = ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursor> storage = ignite.cluster().nodeLocalMap();
- VisorQueryCursorHolder holder = storage.get(id);
+ VisorQueryCursor cur = storage.get(qryId);
- if (holder != null) {
- // If future was accessed since last scheduling, set access flag to false and reschedule.
- if (holder.accessed()) {
- holder.accessed(false);
+ if (cur != null) {
+ // If cursor was accessed since last scheduling, set access flag to false and reschedule.
+ if (cur.accessed()) {
+ cur.accessed(false);
- scheduleResultSetHolderRemoval(id);
+ scheduleResultSetHolderRemoval(qryId);
+ }
+ else {
+ // Remove stored cursor otherwise.
+ storage.remove(qryId);
+
+ cur.close();
}
- else
- storage.remove(id); // Remove stored future otherwise.
}
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f475b07e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
index 191f44d..a3ff089 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
@@ -71,23 +71,26 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin
private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> arg) {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryCursorHolder<List<?>>> storage = ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursor<List<?>>> storage = ignite.cluster().nodeLocalMap();
- VisorQueryCursorHolder<List<?>> holder = storage.get(arg.get1());
+ String qryId = arg.get1();
- if (holder == null)
- throw new IgniteException("SQL query results are expired.");
+ VisorQueryCursor<List<?>> cur = storage.get(qryId);
- VisorQueryCursor<List<?>> cur = holder.cursor();
+ if (cur == null)
+ throw new IgniteException("SQL query results are expired.");
List<Object[]> nextRows = VisorQueryUtils.fetchSqlQueryRows(cur, arg.get2());
boolean hasMore = cur.hasNext();
if (hasMore)
- holder.accessed(true);
- else
- storage.remove(arg.get1());
+ cur.accessed(true);
+ else {
+ storage.remove(qryId);
+
+ cur.close();
+ }
return new VisorQueryResult(nextRows, hasMore, U.currentTimeMillis() - start);
}
@@ -101,23 +104,26 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin
private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> arg) {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryCursorHolder<Cache.Entry<Object, Object>>> storage = ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursor<Cache.Entry<Object, Object>>> storage = ignite.cluster().nodeLocalMap();
- VisorQueryCursorHolder<Cache.Entry<Object, Object>> holder = storage.get(arg.get1());
+ String qryId = arg.get1();
- if (holder == null)
- throw new IgniteException("Scan query results are expired.");
+ VisorQueryCursor<Cache.Entry<Object, Object>> cur = storage.get(qryId);
- VisorQueryCursor<Cache.Entry<Object, Object>> cur = holder.cursor();
+ if (cur == null)
+ throw new IgniteException("Scan query results are expired.");
List<Object[]> rows = VisorQueryUtils.fetchScanQueryRows(cur, arg.get2());
boolean hasMore = cur.hasNext();
if (hasMore)
- holder.accessed(true);
- else
- storage.remove(arg.get1());
+ cur.accessed(true);
+ else {
+ storage.remove(qryId);
+
+ cur.close();
+ }
return new VisorQueryResult(rows, hasMore, U.currentTimeMillis() - start);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f475b07e/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index 58d3ad3..f0a4052 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1488,7 +1488,6 @@ org.apache.ignite.internal.visor.node.VisorTransactionConfiguration
org.apache.ignite.internal.visor.query.VisorQueryArg
org.apache.ignite.internal.visor.query.VisorQueryCleanupTask
org.apache.ignite.internal.visor.query.VisorQueryCleanupTask$VisorQueryCleanupJob
-org.apache.ignite.internal.visor.query.VisorQueryCursorHolder
org.apache.ignite.internal.visor.query.VisorQueryField
org.apache.ignite.internal.visor.query.VisorQueryJob
org.apache.ignite.internal.visor.query.VisorQueryNextPageTask
[10/17] incubator-ignite git commit: Merge branch 'ignite-sprint-3'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Posted by ak...@apache.org.
Merge branch 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/85462e27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/85462e27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/85462e27
Branch: refs/heads/ignite-sprint-3
Commit: 85462e27f0a2c433721d185ce7cc2ff71313978d
Parents: 97a83a0 2bc1c17
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 14:25:19 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 14:25:19 2015 +0700
----------------------------------------------------------------------
.../ignite/codegen/MessageCodeGenerator.java | 1 -
.../java/org/apache/ignite/IgniteCache.java | 9 +
.../configuration/IgniteConfiguration.java | 19 --
.../discovery/GridDiscoveryManager.java | 3 +-
.../processors/cache/GridCacheContext.java | 58 ++++-
.../cache/GridCacheEvictionManager.java | 6 +-
.../cache/GridCacheExplicitLockSpan.java | 2 +-
.../processors/cache/GridCacheMapEntry.java | 6 +-
.../processors/cache/GridCacheMvcc.java | 2 +-
.../cache/GridCacheMvccCandidate.java | 50 ++++-
.../processors/cache/GridCacheMvccManager.java | 44 +++-
.../processors/cache/GridCacheProcessor.java | 52 ++---
.../distributed/GridDistributedCacheEntry.java | 12 +-
.../distributed/dht/GridDhtCacheEntry.java | 36 ++-
.../distributed/dht/GridDhtLockFuture.java | 15 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 22 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 2 +
.../distributed/dht/GridDhtTxLocalAdapter.java | 30 ++-
.../distributed/dht/GridDhtTxPrepareFuture.java | 28 ++-
.../dht/colocated/GridDhtColocatedCache.java | 32 ++-
.../colocated/GridDhtColocatedLockFuture.java | 46 +++-
.../GridDhtPartitionsExchangeFuture.java | 39 +++-
.../distributed/near/GridNearCacheEntry.java | 10 +-
.../distributed/near/GridNearLockFuture.java | 13 +-
.../near/GridNearTxFinishFuture.java | 8 +-
.../cache/distributed/near/GridNearTxLocal.java | 7 +
.../near/GridNearTxPrepareFuture.java | 122 +++++++----
.../near/GridNearTxPrepareRequest.java | 64 ++++--
.../cache/transactions/IgniteTxAdapter.java | 3 +-
.../cache/transactions/IgniteTxHandler.java | 120 +++++++---
.../transactions/IgniteTxLocalAdapter.java | 76 ++++---
.../cache/transactions/IgniteTxManager.java | 7 +
.../internal/util/future/GridFutureAdapter.java | 20 +-
.../ignite/internal/util/worker/GridWorker.java | 6 +-
.../discovery/tcp/TcpClientDiscoverySpi.java | 6 +-
.../cache/GridCacheBasicApiAbstractTest.java | 4 +-
.../dht/IgniteCacheLockFailoverSelfTest.java | 156 +++++++++++++
.../dht/IgniteCacheMultiTxLockSelfTest.java | 219 +++++++++++++++++++
.../tcp/TcpClientDiscoverySelfTest.java | 6 +-
.../testframework/junits/GridAbstractTest.java | 4 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 3 +
.../IgniteSpiDiscoverySelfTestSuite.java | 2 +
...hePartitionedQueryMultiThreadedSelfTest.java | 2 +-
.../cache/IgniteCacheQueryIndexSelfTest.java | 3 +-
.../IgniteCachePartitionedQuerySelfTest.java | 5 +-
.../IgniteCacheReplicatedQuerySelfTest.java | 7 +-
47 files changed, 1111 insertions(+), 290 deletions(-)
----------------------------------------------------------------------
[12/17] incubator-ignite git commit: # IGNITE-692 Fixed Visor cmd.
Posted by ak...@apache.org.
# IGNITE-692 Fixed Visor cmd.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/72a8802f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/72a8802f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/72a8802f
Branch: refs/heads/ignite-sprint-3
Commit: 72a8802f5b2fb7886387bb5a573ab39e23472028
Parents: c72e8ef
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 15:32:41 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 15:32:41 2015 +0700
----------------------------------------------------------------------
.../apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72a8802f/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
index 5eecf2f..3490669 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
@@ -160,7 +160,7 @@ class VisorCacheScanCommand {
.withName("visor-cscan-task")
.withNoFailover()
.execute(classOf[VisorQueryTask],
- toTaskArgument(nid, new VisorQueryArg(cacheName, "SCAN", pageSize)))
+ toTaskArgument(nid, new VisorQueryArg(null, cacheName, "SCAN", pageSize)))
match {
case x if x.get1() != null =>
error(x.get1())
[14/17] incubator-ignite git commit: Merge branches 'ignite-692' and
'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-692
Posted by ak...@apache.org.
Merge branches 'ignite-692' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e101752f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e101752f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e101752f
Branch: refs/heads/ignite-sprint-3
Commit: e101752f80b3037a22223944962cbd62b209acf1
Parents: 1cd1530 674635f
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 18:24:19 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 18:24:19 2015 +0700
----------------------------------------------------------------------
bin/ignitevisorcmd.bat | 39 +--
.../examples/MessagingExamplesSelfTest.java | 2 +-
.../java8/examples/BasicExamplesSelfTest.java | 3 +
.../java8/examples/CacheExamplesSelfTest.java | 4 +
.../examples/CheckpointExamplesSelfTest.java | 3 +
.../examples/ClusterGroupExampleSelfTest.java | 3 +-
.../examples/ContinuationExamplesSelfTest.java | 3 +
.../ContinuousMapperExamplesSelfTest.java | 4 +-
.../DeploymentExamplesMultiNodeSelfTest.java | 2 +
.../examples/DeploymentExamplesSelfTest.java | 2 +
.../HibernateL2CacheExampleSelfTest.java | 3 +
.../java8/examples/IgfsExamplesSelfTest.java | 3 +
.../examples/LifecycleExamplesSelfTest.java | 3 +
.../MemcacheRestExamplesMultiNodeSelfTest.java | 2 +
.../examples/MemcacheRestExamplesSelfTest.java | 2 +
.../examples/MessagingExamplesSelfTest.java | 4 +-
.../examples/MonteCarloExamplesSelfTest.java | 3 +
.../examples/SpringBeanExamplesSelfTest.java | 3 +
.../java8/examples/TaskExamplesSelfTest.java | 2 +
.../client/ClientReconnectionSelfTest.java | 67 +++---
modules/core/pom.xml | 2 +-
.../java/org/apache/ignite/IgniteCache.java | 9 +
.../configuration/CacheConfiguration.java | 69 +++---
.../internal/ComputeTaskInternalFuture.java | 2 +-
.../ignite/internal/GridJobExecuteRequest.java | 10 +-
.../ignite/internal/GridJobExecuteResponse.java | 4 +-
.../apache/ignite/internal/GridTaskMessage.java | 30 ---
.../ignite/internal/GridTaskSessionRequest.java | 6 +-
.../client/GridClientConfiguration.java | 14 +-
.../GridClientConnectionManagerAdapter.java | 2 +-
.../router/GridTcpRouterConfiguration.java | 6 +-
.../internal/cluster/ClusterGroupAdapter.java | 150 ++++++++++--
.../internal/managers/GridManagerAdapter.java | 4 +-
.../discovery/GridDiscoveryManager.java | 25 +-
.../eventstorage/GridEventStorageManager.java | 4 +-
.../processors/cache/CacheMetricsImpl.java | 7 +-
.../processors/cache/CacheMetricsSnapshot.java | 223 +++++++++++++++++-
.../processors/cache/GridCacheAdapter.java | 12 +-
.../processors/cache/GridCacheContext.java | 6 +-
.../processors/cache/IgniteCacheProxy.java | 26 ++
.../dht/atomic/GridDhtAtomicCache.java | 6 +-
.../dht/colocated/GridDhtColocatedCache.java | 3 +-
.../distributed/near/GridNearAtomicCache.java | 2 +-
.../near/GridNearTransactionalCache.java | 2 +-
.../local/atomic/GridLocalAtomicCache.java | 6 +-
.../cache/query/GridCacheQueryAdapter.java | 2 +-
.../continuous/CacheContinuousQueryManager.java | 2 +-
.../transactions/IgniteTxLocalAdapter.java | 6 +-
.../internal/processors/igfs/IgfsAsyncImpl.java | 4 +-
.../ignite/internal/processors/igfs/IgfsEx.java | 4 +-
.../processors/igfs/IgfsFileWorker.java | 180 --------------
.../processors/igfs/IgfsFileWorkerBatch.java | 225 +++++++-----------
.../processors/igfs/IgfsFileWorkerTask.java | 32 ---
.../internal/processors/igfs/IgfsImpl.java | 150 +++++++-----
.../internal/processors/igfs/IgfsProcessor.java | 2 +-
.../processors/rest/GridRestProcessor.java | 33 +--
.../security/GridSecurityProcessor.java | 13 +-
.../processors/security/SecurityContext.java | 8 +-
.../security/os/GridOsSecurityProcessor.java | 11 +-
.../processors/task/GridTaskProcessor.java | 9 +-
.../visor/cache/VisorCacheClearTask.java | 3 +
.../cache/VisorCacheQueryConfiguration.java | 9 -
.../internal/visor/log/VisorLogSearchTask.java | 12 +-
.../node/VisorNodeEventsCollectorTask.java | 3 +
.../internal/visor/util/VisorTaskUtils.java | 3 +
.../plugin/security/AuthenticationContext.java | 12 +-
.../security/GridSecurityCredentials.java | 184 ---------------
.../GridSecurityCredentialsBasicProvider.java | 44 ----
.../GridSecurityCredentialsProvider.java | 44 ----
.../plugin/security/GridSecurityException.java | 58 -----
.../plugin/security/GridSecurityPermission.java | 69 ------
.../security/GridSecurityPermissionSet.java | 66 ------
.../plugin/security/GridSecuritySubject.java | 62 -----
.../security/GridSecuritySubjectType.java | 48 ----
.../plugin/security/SecurityCredentials.java | 191 +++++++++++++++
.../SecurityCredentialsBasicProvider.java | 44 ++++
.../security/SecurityCredentialsProvider.java | 44 ++++
.../plugin/security/SecurityException.java | 61 +++++
.../plugin/security/SecurityPermission.java | 69 ++++++
.../plugin/security/SecurityPermissionSet.java | 66 ++++++
.../ignite/plugin/security/SecuritySubject.java | 62 +++++
.../plugin/security/SecuritySubjectType.java | 48 ++++
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 4 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 4 +-
.../spi/discovery/DiscoveryMetricsProvider.java | 10 +
.../DiscoverySpiNodeAuthenticator.java | 2 +-
.../discovery/tcp/TcpClientDiscoverySpi.java | 29 ++-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 57 ++++-
.../tcp/internal/TcpDiscoveryNode.java | 76 +++++-
.../messages/TcpDiscoveryHeartbeatMessage.java | 65 +++++
.../startup/cmdline/CommandLineStartup.java | 7 +-
.../ignite/internal/GridProjectionSelfTest.java | 82 +++++++
.../ignite/internal/GridStartStopSelfTest.java | 8 +-
.../CacheMetricsForClusterGroupSelfTest.java | 236 +++++++++++++++++++
...CacheOffHeapMultiThreadedUpdateSelfTest.java | 42 ++--
.../GridCacheOffHeapTieredAbstractSelfTest.java | 4 +-
.../cache/GridCacheReloadSelfTest.java | 3 +-
.../GridCacheReturnValueTransferSelfTest.java | 15 +-
.../IgniteTxMultiThreadedAbstractTest.java | 5 +-
...GridCacheQueueMultiNodeAbstractSelfTest.java | 5 +-
.../GridCacheSetAbstractSelfTest.java | 10 +-
.../GridCacheSetFailoverAbstractSelfTest.java | 6 +-
.../distributed/GridCacheEventAbstractTest.java | 16 +-
.../GridCacheNodeFailureAbstractTest.java | 15 +-
...licatedNearOnlyMultiNodeFullApiSelfTest.java | 2 +-
.../continuous/GridEventConsumeSelfTest.java | 7 +-
.../processors/igfs/IgfsAbstractSelfTest.java | 24 +-
.../tostring/GridToStringBuilderSelfTest.java | 5 +-
.../GridP2PMissedResourceCacheSizeSelfTest.java | 2 +-
.../tcp/TcpClientDiscoverySelfTest.java | 5 +-
.../testframework/GridSpiTestContext.java | 4 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../junits/spi/GridSpiAbstractTest.java | 72 +-----
.../IgniteCacheMetricsSelfTestSuite.java | 4 +
...rrentLinkedHashMapMultiThreadedSelfTest.java | 4 +-
.../HadoopDefaultMapReducePlannerSelfTest.java | 2 +-
.../GridCacheAbstractFieldsQuerySelfTest.java | 10 +-
.../processors/cache/GridCacheSwapSelfTest.java | 5 +-
.../IgniteCacheReplicatedQuerySelfTest.java | 11 +-
.../processors/cache/GridCacheJtaSelfTest.java | 6 +-
.../http/jetty/GridJettyRestHandler.java | 2 +-
.../p2p/GridP2PUserVersionChangeSelfTest.java | 8 +-
.../ignite/tools/classgen/ClassesGenerator.java | 2 +-
.../ignite/visor/commands/VisorConsole.scala | 19 ++
124 files changed, 2151 insertions(+), 1416 deletions(-)
----------------------------------------------------------------------
[07/17] incubator-ignite git commit: Merge branches 'ignite-692' and
'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-692
Posted by ak...@apache.org.
Merge branches 'ignite-692' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4c4eb2f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4c4eb2f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4c4eb2f3
Branch: refs/heads/ignite-sprint-3
Commit: 4c4eb2f311ed6800f6e6bb9e73c97d3500030e23
Parents: c279485 a60f47d
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 00:25:29 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 00:25:29 2015 +0700
----------------------------------------------------------------------
.../examples/datagrid/CacheAffinityExample.java | 9 +-
.../examples/datagrid/CacheApiExample.java | 9 +-
.../examples/datagrid/CacheAsyncApiExample.java | 9 +-
.../datagrid/CacheContinuousQueryExample.java | 8 +-
.../datagrid/CacheDataStreamerExample.java | 9 +-
.../examples/datagrid/CacheEventsExample.java | 9 +-
.../examples/datagrid/CachePutGetExample.java | 10 +-
.../datagrid/CacheTransactionExample.java | 8 +-
.../hibernate/HibernateL2CacheExample.java | 5 +-
.../starschema/CacheStarSchemaExample.java | 10 +-
.../store/auto/CacheAutoStoreExample.java | 8 +-
.../auto/CacheAutoStoreLoadDataExample.java | 5 +-
.../datagrid/store/auto/CacheConfig.java | 4 +-
.../store/dummy/CacheDummyStoreExample.java | 5 +-
.../hibernate/CacheHibernateStoreExample.java | 5 +-
.../store/jdbc/CacheJdbcStoreExample.java | 5 +-
.../datastructures/IgniteQueueExample.java | 28 +-
.../datastructures/IgniteSetExample.java | 30 +-
.../streaming/StreamVisitorExample.java | 5 +-
.../java/org/apache/ignite/IgniteCluster.java | 2 +-
.../configuration/CacheConfiguration.java | 20 +-
.../configuration/CollectionConfiguration.java | 114 ++++-
.../ignite/internal/ClusterMetricsSnapshot.java | 2 +-
.../ignite/internal/GridPluginContext.java | 15 +-
.../apache/ignite/internal/IgniteKernal.java | 16 +-
.../ignite/internal/MarshallerContextImpl.java | 3 +
.../affinity/GridAffinityProcessor.java | 5 +-
.../processors/cache/GridCacheAdapter.java | 59 ++-
.../processors/cache/GridCacheIoManager.java | 87 ++--
.../processors/cache/GridCacheMessage.java | 7 +
.../GridCachePartitionExchangeManager.java | 136 +++++-
.../processors/cache/GridCacheProcessor.java | 63 ++-
.../cache/GridCacheProjectionImpl.java | 2 +-
.../processors/cache/GridCacheProxyImpl.java | 2 +-
.../cache/GridLoadCacheCloseablePredicate.java | 30 ++
.../dht/GridDhtAffinityAssignmentRequest.java | 5 +
.../dht/GridDhtAffinityAssignmentResponse.java | 5 +
.../distributed/dht/GridDhtCacheAdapter.java | 22 +-
.../GridDhtPartitionsAbstractMessage.java | 15 +-
.../cache/query/GridCacheQueriesImpl.java | 2 +-
.../continuous/CacheContinuousQueryManager.java | 28 --
.../cache/version/GridCacheVersionEx.java | 2 +-
.../cacheobject/IgniteCacheObjectProcessor.java | 5 +-
.../IgniteCacheObjectProcessorImpl.java | 36 +-
.../datastreamer/DataStreamerImpl.java | 8 +-
.../CacheDataStructuresCacheKey.java | 62 +++
.../CacheDataStructuresConfigurationKey.java | 2 +-
.../datastructures/DataStructuresProcessor.java | 222 ++++++++-
.../datastructures/GridCacheQueueAdapter.java | 2 +-
.../plugin/IgnitePluginProcessor.java | 58 +--
.../util/lang/GridMetadataAwareAdapter.java | 2 +-
.../ignite/plugin/CachePluginConfiguration.java | 2 +-
.../org/apache/ignite/plugin/IgnitePlugin.java | 3 -
.../ignite/plugin/PluginConfiguration.java | 10 +-
.../org/apache/ignite/plugin/PluginContext.java | 7 +-
.../apache/ignite/plugin/PluginProvider.java | 4 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 2 +-
...actQueueFailoverDataConsistencySelfTest.java | 4 +-
.../GridCacheQueueApiSelfAbstractTest.java | 80 ++++
.../GridCacheQueueCleanupSelfTest.java | 11 +-
...dCacheQueueMultiNodeConsistencySelfTest.java | 11 +-
.../GridCacheSetAbstractSelfTest.java | 5 +-
.../IgniteCollectionAbstractTest.java | 160 ++-----
.../IgniteDataStructureUniqueNameTest.java | 47 +-
.../GridCacheLocalAtomicOffheapSetSelfTest.java | 32 ++
.../GridCacheLocalAtomicQueueApiSelfTest.java | 6 +
.../local/GridCacheLocalAtomicSetSelfTest.java | 6 +
.../GridCacheLocalOffheapQueueApiSelfTest.java | 31 ++
.../local/GridCacheLocalQueueApiSelfTest.java | 6 +
.../local/GridCacheLocalSetSelfTest.java | 6 +
...artitionedAtomicOffheapQueueApiSelfTest.java | 32 ++
...omicOffheapQueueCreateMultiNodeSelfTest.java | 32 ++
...onedAtomicOffheapQueueMultiNodeSelfTest.java | 32 ++
...dCachePartitionedAtomicQueueApiSelfTest.java | 6 +
...ionedAtomicQueueCreateMultiNodeSelfTest.java | 6 +
...micQueueFailoverDataConsistencySelfTest.java | 6 +
...PartitionedAtomicQueueMultiNodeSelfTest.java | 6 +
...itionedAtomicQueueRotativeMultiNodeTest.java | 6 +
...chePartitionedAtomicSetFailoverSelfTest.java | 6 +
...rtitionedDataStructuresFailoverSelfTest.java | 6 +
...artitionedOffHeapValuesQueueApiSelfTest.java | 31 ++
...achePartitionedOffHeapValuesSetSelfTest.java | 32 ++
...edOffheapDataStructuresFailoverSelfTest.java | 34 ++
...hePartitionedOffheapSetFailoverSelfTest.java | 32 ++
.../GridCachePartitionedQueueApiSelfTest.java | 6 +
...PartitionedQueueCreateMultiNodeSelfTest.java | 6 +
...dCachePartitionedQueueEntryMoveSelfTest.java | 10 +-
...nedQueueFailoverDataConsistencySelfTest.java | 6 +
...CachePartitionedQueueJoinedNodeSelfTest.java | 6 +
...dCachePartitionedQueueMultiNodeSelfTest.java | 6 +
...hePartitionedQueueRotativeMultiNodeTest.java | 6 +
...GridCachePartitionedSetFailoverSelfTest.java | 6 +
.../GridCachePartitionedSetSelfTest.java | 6 +
.../IgnitePartitionedSetNoBackupsSelfTest.java | 5 +-
...eplicatedDataStructuresFailoverSelfTest.java | 6 +
.../GridCacheReplicatedQueueApiSelfTest.java | 11 +
...idCacheReplicatedQueueMultiNodeSelfTest.java | 6 +
...cheReplicatedQueueRotativeMultiNodeTest.java | 6 +
.../GridCacheReplicatedSetSelfTest.java | 6 +
.../IgniteCacheAtomicNodeJoinTest.java | 44 ++
.../IgniteCacheNodeJoinAbstractTest.java | 109 +++++
.../distributed/IgniteCacheTxNodeJoinTest.java | 38 ++
.../IgniteCacheDataStructuresSelfTestSuite.java | 10 +
.../IgniteCacheFailoverTestSuite.java | 4 +
.../query/h2/sql/GridSqlQueryParser.java | 24 +-
.../h2/sql/AbstractH2CompareQueryTest.java | 13 +-
.../query/h2/sql/BaseH2CompareQueryTest.java | 37 +-
.../query/h2/sql/H2CompareBigQueryTest.java | 38 +-
.../ignite/tools/javadoc/IgniteLinkTaglet.java | 20 +-
modules/urideploy/README.txt | 2 +-
modules/urideploy/licenses/edtftp-license.pdf | Bin 58355 -> 0 bytes
modules/urideploy/licenses/jtidy-license.txt | 50 --
.../urideploy/licenses/jtidy-mit-license.txt | 50 ++
modules/urideploy/pom.xml | 6 -
.../spi/deployment/uri/UriDeploymentSpi.java | 182 +++----
.../uri/scanners/GridUriDeploymentScanner.java | 286 -----------
.../GridUriDeploymentScannerListener.java | 2 +-
.../uri/scanners/UriDeploymentScanner.java | 47 ++
.../scanners/UriDeploymentScannerContext.java | 92 ++++
.../scanners/UriDeploymentScannerManager.java | 221 +++++++++
.../file/GridUriDeploymentFileScanner.java | 311 ------------
.../scanners/file/UriDeploymentFileScanner.java | 327 +++++++++++++
.../ftp/GridUriDeploymentFtpClient.java | 199 --------
.../ftp/GridUriDeploymentFtpConfiguration.java | 115 -----
.../ftp/GridUriDeploymentFtpException.java | 43 --
.../scanners/ftp/GridUriDeploymentFtpFile.java | 119 -----
.../ftp/GridUriDeploymentFtpScanner.java | 234 ---------
.../uri/scanners/ftp/package-info.java | 22 -
.../http/GridUriDeploymentHttpScanner.java | 423 ----------------
.../scanners/http/UriDeploymentHttpScanner.java | 478 +++++++++++++++++++
...loymentMultiScannersErrorThrottlingTest.java | 3 -
.../GridUriDeploymentMultiScannersSelfTest.java | 3 +-
.../GridFileDeploymentUndeploySelfTest.java | 4 +-
.../uri/scanners/ftp/GridFtpDeploymentTest.java | 46 --
.../uri/scanners/ftp/package-info.java | 22 -
.../scala/org/apache/ignite/visor/visor.scala | 3 +
137 files changed, 2994 insertions(+), 2653 deletions(-)
----------------------------------------------------------------------
[17/17] incubator-ignite git commit: Merge branches 'ignite-692' and
'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-692
Posted by ak...@apache.org.
Merge branches 'ignite-692' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cd09524e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cd09524e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cd09524e
Branch: refs/heads/ignite-sprint-3
Commit: cd09524ea4b43cf04d027da87ff567b0d95cc6ec
Parents: abc90ec dedcda1
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 22:41:21 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 22:41:21 2015 +0700
----------------------------------------------------------------------
examples/pom.xml | 2 +-
modules/aop/pom.xml | 2 +-
modules/aws/pom.xml | 2 +-
modules/clients/pom.xml | 2 +-
modules/codegen/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
.../configuration/CacheConfiguration.java | 7 +-
.../processors/query/GridQueryProcessor.java | 89 +++++++++++-------
.../ignite/startup/BasicWarmupClosure.java | 9 +-
.../cache/IgniteWarmupClosureSelfTest.java | 82 +++++++++++++++++
.../IgniteFairAffinityDynamicCacheSelfTest.java | 96 ++++++++++++++++++++
.../ignite/testsuites/IgniteCacheTestSuite.java | 5 +
modules/extdata/p2p/pom.xml | 2 +-
modules/extdata/uri/pom.xml | 2 +-
modules/geospatial/pom.xml | 2 +-
modules/hadoop/pom.xml | 2 +-
modules/hibernate/pom.xml | 2 +-
modules/indexing/pom.xml | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 17 +++-
.../query/h2/sql/BaseH2CompareQueryTest.java | 20 ++++
modules/jcl/pom.xml | 2 +-
modules/jta/pom.xml | 2 +-
modules/log4j/pom.xml | 2 +-
modules/rest-http/pom.xml | 2 +-
modules/scalar/pom.xml | 2 +-
modules/schedule/pom.xml | 2 +-
modules/schema-import/pom.xml | 2 +-
modules/slf4j/pom.xml | 2 +-
modules/spring/pom.xml | 2 +-
modules/ssh/pom.xml | 2 +-
modules/tools/pom.xml | 2 +-
modules/urideploy/pom.xml | 2 +-
modules/visor-console/pom.xml | 2 +-
modules/visor-plugins/pom.xml | 2 +-
modules/web/pom.xml | 2 +-
modules/yardstick/pom.xml | 2 +-
pom.xml | 53 ++++++-----
37 files changed, 338 insertions(+), 96 deletions(-)
----------------------------------------------------------------------
[13/17] incubator-ignite git commit: # IGNITE-692 Fixed opt
classnames.
Posted by ak...@apache.org.
# IGNITE-692 Fixed opt classnames.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1cd15306
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1cd15306
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1cd15306
Branch: refs/heads/ignite-sprint-3
Commit: 1cd15306107f3d367294ab7bee54d5ccfde8defa
Parents: 72a8802
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 15:45:46 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 15:45:46 2015 +0700
----------------------------------------------------------------------
.../main/resources/META-INF/classnames.properties | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1cd15306/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index 305cdd8..58d3ad3 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -106,6 +106,8 @@ org.apache.ignite.compute.gridify.aop.GridifyDefaultRangeTask
org.apache.ignite.compute.gridify.aop.GridifyDefaultTask
org.apache.ignite.configuration.CacheConfiguration
org.apache.ignite.configuration.CacheConfiguration$1
+org.apache.ignite.configuration.CacheConfiguration$2
+org.apache.ignite.configuration.CollectionConfiguration
org.apache.ignite.configuration.DeploymentMode
org.apache.ignite.configuration.IgniteReflectionFactory
org.apache.ignite.configuration.NearCacheConfiguration
@@ -384,7 +386,7 @@ org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$Ex
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$MessageHandler
org.apache.ignite.internal.processors.cache.GridCacheProcessor$2
org.apache.ignite.internal.processors.cache.GridCacheProcessor$3
-org.apache.ignite.internal.processors.cache.GridCacheProcessor$4
+org.apache.ignite.internal.processors.cache.GridCacheProcessor$5
org.apache.ignite.internal.processors.cache.GridCacheProcessor$LocalAffinityFunction
org.apache.ignite.internal.processors.cache.GridCacheProjectionImpl
org.apache.ignite.internal.processors.cache.GridCacheProxyImpl
@@ -429,6 +431,7 @@ org.apache.ignite.internal.processors.cache.GridCacheUtils$8
org.apache.ignite.internal.processors.cache.GridCacheUtils$9
org.apache.ignite.internal.processors.cache.GridCacheValueCollection
org.apache.ignite.internal.processors.cache.GridCacheValueCollection$1
+org.apache.ignite.internal.processors.cache.GridLoadCacheCloseablePredicate
org.apache.ignite.internal.processors.cache.IgniteCacheProxy
org.apache.ignite.internal.processors.cache.IgniteCacheProxy$1
org.apache.ignite.internal.processors.cache.IgniteCacheProxy$2
@@ -814,6 +817,7 @@ org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl$IsolatedUpda
org.apache.ignite.internal.processors.datastreamer.DataStreamerRequest
org.apache.ignite.internal.processors.datastreamer.DataStreamerResponse
org.apache.ignite.internal.processors.datastreamer.DataStreamerUpdateJob$1
+org.apache.ignite.internal.processors.datastructures.CacheDataStructuresCacheKey
org.apache.ignite.internal.processors.datastructures.CacheDataStructuresConfigurationKey
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$1
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$10
@@ -833,6 +837,8 @@ org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$8
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$9
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$AddAtomicProcessor
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$AddCollectionProcessor
+org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$AddDataCacheProcessor
+org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$CacheCollectionInfo
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$CollectionInfo
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$DataStructureInfo
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor$DataStructureType
@@ -1387,6 +1393,8 @@ org.apache.ignite.internal.visor.cache.VisorCacheRebalanceTask
org.apache.ignite.internal.visor.cache.VisorCacheRebalanceTask$VisorCachesRebalanceJob
org.apache.ignite.internal.visor.cache.VisorCacheResetMetricsTask
org.apache.ignite.internal.visor.cache.VisorCacheResetMetricsTask$VisorCacheResetMetricsJob
+org.apache.ignite.internal.visor.cache.VisorCacheStopTask
+org.apache.ignite.internal.visor.cache.VisorCacheStopTask$VisorCacheStopJob
org.apache.ignite.internal.visor.cache.VisorCacheStoreConfiguration
org.apache.ignite.internal.visor.cache.VisorCacheSwapBackupsTask
org.apache.ignite.internal.visor.cache.VisorCacheSwapBackupsTask$VisorCachesSwapBackupsJob
@@ -1477,17 +1485,17 @@ org.apache.ignite.internal.visor.node.VisorRestConfiguration
org.apache.ignite.internal.visor.node.VisorSegmentationConfiguration
org.apache.ignite.internal.visor.node.VisorSpisConfiguration
org.apache.ignite.internal.visor.node.VisorTransactionConfiguration
+org.apache.ignite.internal.visor.query.VisorQueryArg
org.apache.ignite.internal.visor.query.VisorQueryCleanupTask
org.apache.ignite.internal.visor.query.VisorQueryCleanupTask$VisorQueryCleanupJob
+org.apache.ignite.internal.visor.query.VisorQueryCursorHolder
org.apache.ignite.internal.visor.query.VisorQueryField
+org.apache.ignite.internal.visor.query.VisorQueryJob
org.apache.ignite.internal.visor.query.VisorQueryNextPageTask
org.apache.ignite.internal.visor.query.VisorQueryNextPageTask$VisorQueryNextPageJob
org.apache.ignite.internal.visor.query.VisorQueryResult
org.apache.ignite.internal.visor.query.VisorQueryResultEx
org.apache.ignite.internal.visor.query.VisorQueryTask
-org.apache.ignite.internal.visor.query.VisorQueryCursorHolder
-org.apache.ignite.internal.visor.query.VisorQueryArg
-org.apache.ignite.internal.visor.query.VisorQueryJob
org.apache.ignite.internal.visor.util.VisorEventMapper
org.apache.ignite.internal.visor.util.VisorTaskUtils$4
org.apache.ignite.lang.IgniteBiClosure
[09/17] incubator-ignite git commit: # IGNITE-692 Implemented support
for GG and Ignite.
Posted by ak...@apache.org.
# IGNITE-692 Implemented support for GG and 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/97a83a03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/97a83a03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/97a83a03
Branch: refs/heads/ignite-sprint-3
Commit: 97a83a034cd17fbef9e5f2a77410ee326e91a1a0
Parents: aa8f668
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 14:24:27 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 14:24:27 2015 +0700
----------------------------------------------------------------------
.../query/GridQueryFieldMetadata.java | 2 +-
.../visor/cache/VisorCacheConfiguration.java | 2 +-
.../internal/visor/cache/VisorCacheMetrics.java | 2 +-
.../internal/visor/query/VisorQueryArg.java | 69 ++++++
.../visor/query/VisorQueryCleanupTask.java | 2 +-
.../visor/query/VisorQueryCursorHolder.java | 64 ++++++
.../internal/visor/query/VisorQueryField.java | 66 ++++--
.../internal/visor/query/VisorQueryJob.java | 160 +++++++++++++
.../visor/query/VisorQueryNextPageTask.java | 46 ++--
.../internal/visor/query/VisorQueryResult.java | 6 +-
.../visor/query/VisorQueryResultEx.java | 16 +-
.../internal/visor/query/VisorQueryTask.java | 227 +------------------
.../internal/visor/query/VisorQueryUtils.java | 8 +-
.../resources/META-INF/classnames.properties | 6 +-
.../commands/cache/VisorCacheScanCommand.scala | 11 +-
15 files changed, 393 insertions(+), 294 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryFieldMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryFieldMetadata.java
index 9ebf768..f99466f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryFieldMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryFieldMetadata.java
@@ -34,7 +34,7 @@ public interface GridQueryFieldMetadata extends Externalizable {
/**
* Gets name of type to which this field belongs.
*
- * @return Gets type name.
+ * @return Type name.
*/
public String typeName();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index 86a7f5f..d070872 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -146,7 +146,7 @@ public class VisorCacheConfiguration implements Serializable {
writerFactory = compactClass(ccfg.getCacheWriterFactory());
expiryPlcFactory = compactClass(ccfg.getExpiryPolicyFactory());
sys = ignite.context().cache().systemCache(ccfg.getName());
-
+
affinityCfg = VisorCacheAffinityConfiguration.from(ccfg);
rebalanceCfg = VisorCacheRebalanceConfiguration.from(ccfg);
evictCfg = VisorCacheEvictionConfiguration.from(ccfg);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
index fc30392..b0a1eb2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
@@ -245,7 +245,7 @@ public class VisorCacheMetrics implements Serializable {
}
/**
- * @return Cache mode.
+ * @return Cache mode.
*/
public CacheMode mode() {
return mode;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
new file mode 100644
index 0000000..080bb35
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.query;
+
+import java.io.*;
+
+/**
+ * Arguments for {@link VisorQueryTask}.
+ */
+public class VisorQueryArg implements Serializable {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** Cache name for query. */
+ private final String cacheName;
+
+ /** Query text. */
+ private final String qryTxt;
+
+ /** Result batch size. */
+ private final Integer pageSize;
+
+ /**
+ * @param cacheName Cache name for query.
+ * @param qryTxt Query text.
+ * @param pageSize Result batch size.
+ */
+ public VisorQueryArg(String cacheName, String qryTxt, Integer pageSize) {
+ this.cacheName = cacheName;
+ this.qryTxt = qryTxt;
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * @return Cache name.
+ */
+ public String cacheName() {
+ return cacheName;
+ }
+
+ /**
+ * @return Query txt.
+ */
+ public String queryTxt() {
+ return qryTxt;
+ }
+
+ /**
+ * @return Page size.
+ */
+ public Integer pageSize() {
+ return pageSize;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
index 1386638..d82f5fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
@@ -86,7 +86,7 @@ public class VisorQueryCleanupTask extends VisorMultiNodeTask<Map<UUID, Collecti
/** {@inheritDoc} */
@Override protected Void run(Collection<String> qryIds) {
- ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> locMap = ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursorHolder> locMap = ignite.cluster().nodeLocalMap();
for (String qryId : qryIds)
locMap.remove(qryId);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java
new file mode 100644
index 0000000..dec0253
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.query;
+
+import java.io.*;
+
+/**
+ * ResultSet future holder.
+ */
+public class VisorQueryCursorHolder<T> implements Serializable {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** Query cursor. */
+ private final VisorQueryCursor<T> cur;
+
+ /** Flag indicating that this future was read from last check. */
+ private volatile boolean accessed;
+
+ /**
+ * @param cur Future.
+ * @param accessed {@code true} if query was accessed before remove timeout expired.
+ */
+ public VisorQueryCursorHolder(VisorQueryCursor<T> cur, boolean accessed) {
+ this.cur = cur;
+ this.accessed = accessed;
+ }
+
+ /**
+ * @return Query cursor.
+ */
+ public VisorQueryCursor<T> cursor() {
+ return cur;
+ }
+
+ /**
+ * @return Flag indicating that this future was read from last check..
+ */
+ public boolean accessed() {
+ return accessed;
+ }
+
+ /**
+ * @param accessed New accessed.
+ */
+ public void accessed(boolean accessed) {
+ this.accessed = accessed;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryField.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryField.java
index 78bcac6..cd97c7c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryField.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryField.java
@@ -17,6 +17,7 @@
package org.apache.ignite.internal.visor.query;
+import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import java.io.*;
@@ -28,35 +29,74 @@ public class VisorQueryField implements Serializable {
/** */
private static final long serialVersionUID = 0L;
- /** Column type. */
- private final String type;
+ /** Schema name. */
+ private String schemaName;
+
+ /** Type name. */
+ private String typeName;
/** Field name. */
- private final String field;
+ private String fieldName;
+
+ /** Field type name. */
+ private String fieldTypeName;
/**
* Create data transfer object with given parameters.
*
- * @param type Column type.
- * @param field Field name.
+ * @param schemaName Schema name.
+ * @param typeName Type name.
+ * @param fieldName Name.
+ * @param fieldTypeName Type.
+ */
+ public VisorQueryField(String schemaName, String typeName, String fieldName, String fieldTypeName) {
+ this.schemaName = schemaName;
+ this.typeName = typeName;
+ this.fieldName = fieldName;
+ this.fieldTypeName = fieldTypeName;
+ }
+
+ /**
+ * @return Schema name.
*/
- public VisorQueryField(String type, String field) {
- this.type = type;
- this.field = field;
+ public String schemaName() {
+ return schemaName;
}
/**
- * @return Column type.
+ * @return Type name.
*/
- public String type() {
- return type;
+ public String typeName() {
+ return typeName;
}
/**
* @return Field name.
*/
- public String field() {
- return field;
+ public String fieldName() {
+ return fieldName;
+ }
+
+ /**
+ * @return Field type name.
+ */
+ public String fieldTypeName() {
+ return fieldTypeName;
+ }
+
+ /**
+ * @param schema If {@code true} then add schema name to full name.
+ * @return Fully qualified field name with type name and schema name.
+ */
+ public String fullName(boolean schema) {
+ if (!F.isEmpty(typeName)) {
+ if (schema && !F.isEmpty(schemaName))
+ return schemaName + "." + typeName + "." + fieldName;
+
+ return typeName + "." + fieldName;
+ }
+
+ return fieldName;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
new file mode 100644
index 0000000..2d8b32e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.query;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.query.*;
+import org.apache.ignite.internal.processors.timeout.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.internal.visor.*;
+import org.apache.ignite.lang.*;
+
+import javax.cache.*;
+import java.sql.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+import static org.apache.ignite.internal.visor.query.VisorQueryUtils.*;
+
+/**
+ * Job for execute SCAN or SQL query and get first page of results.
+ */
+public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? extends Exception, VisorQueryResultEx>> {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Create job with specified argument.
+ *
+ * @param arg Job argument.
+ * @param debug Debug flag.
+ */
+ protected VisorQueryJob(VisorQueryArg arg, boolean debug) {
+ super(arg, debug);
+ }
+
+ /**
+ * @param cacheName Cache name.
+ * @return Cache to execute query.
+ */
+ protected IgniteCache<Object, Object> cache(String cacheName) {
+ GridCacheProcessor cacheProcessor = ignite.context().cache();
+
+ return cacheProcessor.jcache(cacheName);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteBiTuple<? extends Exception, VisorQueryResultEx> run(VisorQueryArg arg) {
+ try {
+ boolean scan = arg.queryTxt().toUpperCase().startsWith("SCAN");
+
+ String qryId = (scan ? SCAN_QRY_NAME : SQL_QRY_NAME) + "-" +
+ UUID.randomUUID();
+
+ IgniteCache<Object, Object> c = cache(arg.cacheName());
+
+ if (scan) {
+ ScanQuery<Object, Object> qry = new ScanQuery<>(null);
+ qry.setPageSize(arg.pageSize());
+
+ long start = U.currentTimeMillis();
+
+ VisorQueryCursor<Cache.Entry<Object, Object>> cur = new VisorQueryCursor<>(c.query(qry));
+
+ List<Object[]> rows = fetchScanQueryRows(cur, arg.pageSize());
+
+ long duration = U.currentTimeMillis() - start; // Scan duration + fetch duration.
+
+ ignite.cluster().<String, VisorQueryCursorHolder>nodeLocalMap().put(qryId,
+ new VisorQueryCursorHolder<>(cur, false));
+
+ scheduleResultSetHolderRemoval(qryId);
+
+ return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
+ SCAN_COL_NAMES, rows, cur.hasNext(), duration));
+ }
+ else {
+ SqlFieldsQuery qry = new SqlFieldsQuery(arg.queryTxt());
+ qry.setPageSize(arg.pageSize());
+
+ long start = U.currentTimeMillis();
+
+ VisorQueryCursor<List<?>> cur = new VisorQueryCursor<>(c.query(qry));
+
+ Collection<GridQueryFieldMetadata> meta = cur.fieldsMeta();
+
+ if (meta == null)
+ return new IgniteBiTuple<Exception, VisorQueryResultEx>(
+ new SQLException("Fail to execute query. No metadata available."), null);
+ else {
+ List<VisorQueryField> names = new ArrayList<>(meta.size());
+
+ for (GridQueryFieldMetadata col : meta)
+ names.add(new VisorQueryField(col.schemaName(), col.typeName(),
+ col.fieldName(), col.fieldTypeName()));
+
+ List<Object[]> rows = fetchSqlQueryRows(cur, arg.pageSize());
+
+ long duration = U.currentTimeMillis() - start; // Query duration + fetch duration.
+
+ ConcurrentMap<String, VisorQueryCursorHolder<List<?>>> storage = ignite.cluster().nodeLocalMap();
+ storage.put(qryId, new VisorQueryCursorHolder<>(cur, false));
+
+ scheduleResultSetHolderRemoval(qryId);
+
+ return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
+ names, rows, cur.hasNext(), duration));
+ }
+ }
+ }
+ catch (Exception e) {
+ return new IgniteBiTuple<>(e, null);
+ }
+ }
+
+ /**
+ * @param id Unique query result id.
+ */
+ private void scheduleResultSetHolderRemoval(final String id) {
+ ignite.context().timeout().addTimeoutObject(new GridTimeoutObjectAdapter(RMV_DELAY) {
+ @Override public void onTimeout() {
+ ConcurrentMap<String, VisorQueryCursorHolder> storage = ignite.cluster().nodeLocalMap();
+
+ VisorQueryCursorHolder holder = storage.get(id);
+
+ if (holder != null) {
+ // If future was accessed since last scheduling, set access flag to false and reschedule.
+ if (holder.accessed()) {
+ holder.accessed(false);
+
+ scheduleResultSetHolderRemoval(id);
+ }
+ else
+ storage.remove(id); // Remove stored future otherwise.
+ }
+ }
+ });
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(VisorQueryJob.class, this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
index 320bdde..191f44d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
@@ -23,6 +23,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.internal.visor.*;
import org.apache.ignite.lang.*;
+import javax.cache.*;
import java.util.*;
import java.util.concurrent.*;
@@ -58,40 +59,33 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin
/** {@inheritDoc} */
@Override protected VisorQueryResult run(IgniteBiTuple<String, Integer> arg) {
- try {
- return arg.get1().startsWith(VisorQueryUtils.SCAN_QRY_NAME) ? nextScanPage(arg) : nextSqlPage(arg);
- }
- catch (IgniteCheckedException e) {
- throw U.convertException(e);
- }
+ return arg.get1().startsWith(VisorQueryUtils.SCAN_QRY_NAME) ? nextScanPage(arg) : nextSqlPage(arg);
}
/**
* Collect data from SQL query.
*
- * @param arg
- * @return
- * @throws IgniteCheckedException
+ * @param arg Query name and page size.
+ * @return Query result with next page.
*/
- private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
+ private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> arg) {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> storage =
- ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursorHolder<List<?>>> storage = ignite.cluster().nodeLocalMap();
- VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
+ VisorQueryCursorHolder<List<?>> holder = storage.get(arg.get1());
- if (t == null)
+ if (holder == null)
throw new IgniteException("SQL query results are expired.");
- VisorQueryCursor cur = t.cursor();
+ VisorQueryCursor<List<?>> cur = holder.cursor();
List<Object[]> nextRows = VisorQueryUtils.fetchSqlQueryRows(cur, arg.get2());
boolean hasMore = cur.hasNext();
if (hasMore)
- storage.put(arg.get1(), new VisorQueryTask.VisorQueryCursorHolder(t.cursor(), true));
+ holder.accessed(true);
else
storage.remove(arg.get1());
@@ -101,29 +95,27 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin
/**
* Collect data from SCAN query
*
- * @param arg
- * @return
- * @throws IgniteCheckedException
+ * @param arg Query name and page size.
+ * @return Next page with data.
*/
- private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
+ private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> arg) {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> storage =
- ignite.cluster().nodeLocalMap();
+ ConcurrentMap<String, VisorQueryCursorHolder<Cache.Entry<Object, Object>>> storage = ignite.cluster().nodeLocalMap();
- VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
+ VisorQueryCursorHolder<Cache.Entry<Object, Object>> holder = storage.get(arg.get1());
- if (t == null)
+ if (holder == null)
throw new IgniteException("Scan query results are expired.");
- VisorQueryCursor cur = t.cursor();
+ VisorQueryCursor<Cache.Entry<Object, Object>> cur = holder.cursor();
List<Object[]> rows = VisorQueryUtils.fetchScanQueryRows(cur, arg.get2());
- Boolean hasMore = cur.hasNext();
+ boolean hasMore = cur.hasNext();
if (hasMore)
- storage.put(arg.get1(), new VisorQueryTask.VisorQueryCursorHolder(cur, true));
+ holder.accessed(true);
else
storage.remove(arg.get1());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResult.java
index 1a8c9e9..48c26b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResult.java
@@ -33,7 +33,7 @@ public class VisorQueryResult implements Serializable {
private final List<Object[]> rows;
/** Whether query has more rows to fetch. */
- private final Boolean hasMore;
+ private final boolean hasMore;
/** Query duration */
private final long duration;
@@ -45,7 +45,7 @@ public class VisorQueryResult implements Serializable {
* @param hasMore Whether query has more rows to fetch.
* @param duration Query duration.
*/
- public VisorQueryResult(List<Object[]> rows, Boolean hasMore, long duration) {
+ public VisorQueryResult(List<Object[]> rows, boolean hasMore, long duration) {
this.rows = rows;
this.hasMore = hasMore;
this.duration = duration;
@@ -61,7 +61,7 @@ public class VisorQueryResult implements Serializable {
/**
* @return Whether query has more rows to fetch.
*/
- public Boolean hasMore() {
+ public boolean hasMore() {
return hasMore;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
index 35ed790..35f08b3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
@@ -35,12 +35,12 @@ public class VisorQueryResultEx extends VisorQueryResult {
private final String qryId;
/** Query columns descriptors. */
- private final Collection<VisorQueryField> colNames;
+ private final Collection<VisorQueryField> cols;
/**
* @param resNodeId Node where query executed.
* @param qryId Query ID for future extraction in nextPage() access.
- * @param colNames Columns types and names.
+ * @param cols Columns descriptors.
* @param rows Rows fetched from query.
* @param hasMore Whether query has more rows to fetch.
* @param duration Query duration.
@@ -48,16 +48,16 @@ public class VisorQueryResultEx extends VisorQueryResult {
public VisorQueryResultEx(
UUID resNodeId,
String qryId,
- Collection<VisorQueryField> colNames,
+ Collection<VisorQueryField> cols,
List<Object[]> rows,
- Boolean hasMore,
+ boolean hasMore,
long duration
) {
super(rows, hasMore, duration);
this.resNodeId = resNodeId;
this.qryId = qryId;
- this.colNames = colNames;
+ this.cols = cols;
}
/**
@@ -75,10 +75,10 @@ public class VisorQueryResultEx extends VisorQueryResult {
}
/**
- * @return Columns names.
+ * @return Columns.
*/
- public Collection<VisorQueryField> columnNames() {
- return colNames;
+ public Collection<VisorQueryField> columns() {
+ return cols;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index cc05ba5..e01737f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -18,38 +18,27 @@
package org.apache.ignite.internal.visor.query;
import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
-import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.internal.processors.query.*;
import org.apache.ignite.internal.processors.task.*;
-import org.apache.ignite.internal.processors.timeout.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.internal.visor.*;
import org.apache.ignite.lang.*;
-import javax.cache.*;
-import java.io.*;
-import java.sql.*;
import java.util.*;
-import java.util.concurrent.*;
-import static org.apache.ignite.internal.visor.query.VisorQueryUtils.*;
import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
/**
* Task for execute SCAN or SQL query and get first page of results.
*/
@GridInternal
-public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryArg,
- IgniteBiTuple<? extends Exception, VisorQueryResultEx>> {
+public class VisorQueryTask extends VisorOneNodeTask<VisorQueryArg, IgniteBiTuple<? extends Exception, VisorQueryResultEx>> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
@Override protected Map<? extends ComputeJob, ClusterNode> map0(List<ClusterNode> subgrid,
- VisorTaskArgument<VisorQueryTask.VisorQueryArg> arg) {
+ VisorTaskArgument<VisorQueryArg> arg) {
String cacheName = taskArg.cacheName();
ClusterGroup prj = ignite.cluster().forDataNodes(cacheName);
@@ -71,216 +60,4 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
@Override protected VisorQueryJob job(VisorQueryArg arg) {
return new VisorQueryJob(arg, debug);
}
-
- /**
- * Arguments for {@link VisorQueryTask}.
- */
- @SuppressWarnings("PublicInnerClass")
- public static class VisorQueryArg implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Cache name for query. */
- private final String cacheName;
-
- /** Query text. */
- private final String qryTxt;
-
- /** Result batch size. */
- private final Integer pageSize;
-
- /**
- * @param cacheName Cache name for query.
- * @param qryTxt Query text.
- * @param pageSize Result batch size.
- */
- public VisorQueryArg(String cacheName, String qryTxt, Integer pageSize) {
- this.cacheName = cacheName;
- this.qryTxt = qryTxt;
- this.pageSize = pageSize;
- }
-
- /**
- * @return Cache name.
- */
- public String cacheName() {
- return cacheName;
- }
-
- /**
- * @return Query txt.
- */
- public String queryTxt() {
- return qryTxt;
- }
-
- /**
- * @return Page size.
- */
- public Integer pageSize() {
- return pageSize;
- }
- }
-
- /**
- * ResultSet future holder.
- */
- @SuppressWarnings("PublicInnerClass")
- public static class VisorQueryCursorHolder implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Query cursor. */
- private final VisorQueryCursor cur;
-
- /** Flag indicating that this future was read from last check. */
- private boolean accessed;
-
- /**
- * @param cur Future.
- * @param accessed {@code true} if query was accessed before remove timeout expired.
- */
- public VisorQueryCursorHolder(VisorQueryCursor cur, boolean accessed) {
- this.cur = cur;
- this.accessed = accessed;
- }
-
- /**
- * @return Query cursor.
- */
- public VisorQueryCursor cursor() {
- return cur;
- }
-
- /**
- * @return Flag indicating that this future was read from last check..
- */
- public Boolean accessed() {
- return accessed;
- }
-
- /**
- * @param accessed New accessed.
- */
- public void accessed(Boolean accessed) {
- this.accessed = accessed;
- }
- }
-
- /**
- * Job for execute SCAN or SQL query and get first page of results.
- */
- private static class VisorQueryJob extends
- VisorJob<VisorQueryArg, IgniteBiTuple<? extends Exception, VisorQueryResultEx>> {
- /** */
- private static final long serialVersionUID = 0L;
-
- /**
- * Create job with specified argument.
- *
- * @param arg Job argument.
- * @param debug Debug flag.
- */
- protected VisorQueryJob(VisorQueryArg arg, boolean debug) {
- super(arg, debug);
- }
-
- /** {@inheritDoc} */
- @Override protected IgniteBiTuple<? extends Exception, VisorQueryResultEx> run(VisorQueryArg arg) {
- try {
- Boolean scan = arg.queryTxt().toUpperCase().startsWith("SCAN");
-
- String qryId = (scan ? SCAN_QRY_NAME : SQL_QRY_NAME) + "-" +
- UUID.randomUUID();
-
- GridCacheProcessor cacheProcessor = ignite.context().cache();
-
- IgniteCache<Object, Object> c = cacheProcessor.jcache(arg.cacheName());
-
- if (scan) {
- ScanQuery<Object, Object> qry = new ScanQuery<>(null);
- qry.setPageSize(arg.pageSize());
-
- long start = U.currentTimeMillis();
-
- VisorQueryCursor<Cache.Entry<Object, Object>> cur = new VisorQueryCursor<>(c.query(qry));
-
- List<Object[]> rows = fetchScanQueryRows(cur, arg.pageSize());
-
- long duration = U.currentTimeMillis() - start; // Scan duration + fetch duration.
-
- ignite.cluster().<String, VisorQueryCursorHolder>nodeLocalMap().put(qryId,
- new VisorQueryCursorHolder(cur, false));
-
- scheduleResultSetHolderRemoval(qryId);
-
- return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
- SCAN_COL_NAMES, rows, cur.hasNext(), duration));
- }
- else {
- SqlFieldsQuery qry = new SqlFieldsQuery(arg.queryTxt());
- qry.setPageSize(arg.pageSize());
-
- long start = U.currentTimeMillis();
-
- VisorQueryCursor<List<?>> cur = new VisorQueryCursor<>(c.query(qry));
-
- Collection<GridQueryFieldMetadata> meta = cur.fieldsMeta();
-
- if (meta == null)
- return new IgniteBiTuple<Exception, VisorQueryResultEx>(
- new SQLException("Fail to execute query. No metadata available."), null);
- else {
- List<VisorQueryField> names = new ArrayList<>(meta.size());
-
- for (GridQueryFieldMetadata col : meta)
- names.add(new VisorQueryField(col.typeName(), col.fieldName()));
-
- List<Object[]> rows = fetchSqlQueryRows(cur, arg.pageSize());
-
- long duration = U.currentTimeMillis() - start; // Query duration + fetch duration.
-
- ignite.cluster().<String, VisorQueryCursorHolder>nodeLocalMap().put(qryId, new VisorQueryCursorHolder(cur, false));
-
- scheduleResultSetHolderRemoval(qryId);
-
- return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
- names, rows, cur.hasNext(), duration));
- }
- }
- }
- catch (Exception e) {
- return new IgniteBiTuple<>(e, null);
- }
- }
-
- /**
- * @param id Unique query result id.
- */
- private void scheduleResultSetHolderRemoval(final String id) {
- ignite.context().timeout().addTimeoutObject(new GridTimeoutObjectAdapter(RMV_DELAY) {
- @Override public void onTimeout() {
- ConcurrentMap<String, VisorQueryCursorHolder> storage = ignite.cluster().nodeLocalMap();
-
- VisorQueryCursorHolder holder = storage.get(id);
-
- if (holder != null) {
- // If future was accessed since last scheduling, set access flag to false and reschedule.
- if (holder.accessed()) {
- holder.accessed(false);
-
- scheduleResultSetHolderRemoval(id);
- }
- else
- storage.remove(id); // Remove stored future otherwise.
- }
- }
- });
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(VisorQueryJob.class, this);
- }
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
index f8f795d..be1d15d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
@@ -39,8 +39,8 @@ public class VisorQueryUtils {
/** Columns for SCAN queries. */
public static final Collection<VisorQueryField> SCAN_COL_NAMES = Arrays.asList(
- new VisorQueryField("", "Key Class"), new VisorQueryField("", "Key"),
- new VisorQueryField("", "Value Class"), new VisorQueryField("", "Value")
+ new VisorQueryField(null, null, "Key Class", ""), new VisorQueryField(null, null, "Key", ""),
+ new VisorQueryField(null, null, "Value Class", ""), new VisorQueryField(null, null, "Value", "")
);
/**
@@ -84,7 +84,7 @@ public class VisorQueryUtils {
StringBuilder sb = new StringBuilder();
- Boolean first = true;
+ boolean first = true;
for (Object v : arr) {
if (first)
@@ -141,7 +141,7 @@ public class VisorQueryUtils {
* @param obj Object instance to check.
* @return {@code true} if it is one of known types.
*/
- private static Boolean isKnownType(Object obj) {
+ private static boolean isKnownType(Object obj) {
return obj instanceof String ||
obj instanceof Boolean ||
obj instanceof Byte ||
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index a855e12..305cdd8 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1485,9 +1485,9 @@ org.apache.ignite.internal.visor.query.VisorQueryNextPageTask$VisorQueryNextPage
org.apache.ignite.internal.visor.query.VisorQueryResult
org.apache.ignite.internal.visor.query.VisorQueryResultEx
org.apache.ignite.internal.visor.query.VisorQueryTask
-org.apache.ignite.internal.visor.query.VisorQueryTask$VisorFutureResultSetHolder
-org.apache.ignite.internal.visor.query.VisorQueryTask$VisorQueryArg
-org.apache.ignite.internal.visor.query.VisorQueryTask$VisorQueryJob
+org.apache.ignite.internal.visor.query.VisorQueryCursorHolder
+org.apache.ignite.internal.visor.query.VisorQueryArg
+org.apache.ignite.internal.visor.query.VisorQueryJob
org.apache.ignite.internal.visor.util.VisorEventMapper
org.apache.ignite.internal.visor.util.VisorTaskUtils$4
org.apache.ignite.lang.IgniteBiClosure
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97a83a03/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
index 7574be1..5eecf2f 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
@@ -17,16 +17,13 @@
package org.apache.ignite.visor.commands.cache
-import org.apache.ignite.internal.visor.query.VisorQueryTask.VisorQueryArg
-import org.apache.ignite.internal.visor.query.{VisorQueryNextPageTask, VisorQueryResult, VisorQueryTask}
-
import org.apache.ignite.cluster.ClusterNode
-import org.apache.ignite.internal.visor.util.VisorTaskUtils._
import org.apache.ignite.lang.IgniteBiTuple
-
import org.apache.ignite.visor.commands._
-import org.apache.ignite.visor.visor
-import visor._
+import org.apache.ignite.visor.visor._
+
+import org.apache.ignite.internal.visor.query._
+import org.apache.ignite.internal.visor.util.VisorTaskUtils._
import scala.collection.JavaConversions._
[16/17] incubator-ignite git commit: Merge branch 'ignite-sprint-3'
of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Posted by ak...@apache.org.
Merge branch 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/abc90ec9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/abc90ec9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/abc90ec9
Branch: refs/heads/ignite-sprint-3
Commit: abc90ec973dae4b57a04d27a3b377a33634c82f7
Parents: f475b07 60640de
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 19:20:49 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 19:20:49 2015 +0700
----------------------------------------------------------------------
assembly/release-hadoop.xml | 4 --
.../java/org/apache/ignite/IgniteState.java | 2 +-
.../configuration/IgniteConfiguration.java | 16 ++---
.../org/apache/ignite/internal/IgnitionEx.java | 4 +-
.../discovery/GridDiscoveryManager.java | 4 +-
.../node/VisorSegmentationConfiguration.java | 4 +-
.../segmentation/GridSegmentationPolicy.java | 47 --------------
.../segmentation/GridSegmentationResolver.java | 64 -------------------
.../plugin/segmentation/SegmentationPolicy.java | 49 +++++++++++++++
.../segmentation/SegmentationResolver.java | 65 ++++++++++++++++++++
.../internal/GridLifecycleAwareSelfTest.java | 2 +-
11 files changed, 130 insertions(+), 131 deletions(-)
----------------------------------------------------------------------
[04/17] incubator-ignite git commit: # IGNITE-692 WIP rework of query
tasks.
Posted by ak...@apache.org.
# IGNITE-692 WIP rework of query tasks.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9fb5651e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9fb5651e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9fb5651e
Branch: refs/heads/ignite-sprint-3
Commit: 9fb5651ee3ae16805b6295d20424c1a5aaab71ae
Parents: 2576622
Author: AKuznetsov <ak...@gridgain.com>
Authored: Wed Apr 8 17:53:21 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Wed Apr 8 17:53:21 2015 +0700
----------------------------------------------------------------------
.../internal/visor/query/VisorQueryTask.java | 37 +++++++++++++-------
.../commands/cache/VisorCacheScanCommand.scala | 2 +-
2 files changed, 25 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb5651e/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index ae63e3c..5f66a6d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -19,6 +19,8 @@ package org.apache.ignite.internal.visor.query;
import org.apache.ignite.*;
import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.compute.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.query.*;
import org.apache.ignite.internal.processors.task.*;
@@ -34,6 +36,7 @@ import java.util.*;
import java.util.concurrent.*;
import static org.apache.ignite.internal.visor.query.VisorQueryUtils.*;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
/**
* Task for execute SCAN or SQL query and get first page of results.
@@ -45,6 +48,26 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
+ @Override protected Map<? extends ComputeJob, ClusterNode> map0(List<ClusterNode> subgrid,
+ VisorTaskArgument<VisorQueryTask.VisorQueryArg> arg) {
+ String cacheName = taskArg.cacheName();
+
+ ClusterGroup prj = ignite.cluster().forDataNodes(cacheName);
+
+ if (prj.nodes().isEmpty())
+ throw new IgniteException("No data nodes for cache: " + escapeName(cacheName));
+
+ // First try to take local node to avoid network hop.
+ ClusterNode node = prj.node(ignite.localNode().id());
+
+ // Take any node from projection.
+ if (node == null)
+ node = prj.forRandom().node();
+
+ return Collections.singletonMap(job(taskArg), node);
+ }
+
+ /** {@inheritDoc} */
@Override protected VisorQueryJob job(VisorQueryArg arg) {
return new VisorQueryJob(arg, debug);
}
@@ -57,9 +80,6 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
/** */
private static final long serialVersionUID = 0L;
- /** Node ids for query. */
- private final Collection<UUID> proj;
-
/** Cache name for query. */
private final String cacheName;
@@ -70,26 +90,17 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
private final Integer pageSize;
/**
- * @param proj Node ids for query.
* @param cacheName Cache name for query.
* @param qryTxt Query text.
* @param pageSize Result batch size.
*/
- public VisorQueryArg(Collection<UUID> proj, String cacheName, String qryTxt, Integer pageSize) {
- this.proj = proj;
+ public VisorQueryArg(String cacheName, String qryTxt, Integer pageSize) {
this.cacheName = cacheName;
this.qryTxt = qryTxt;
this.pageSize = pageSize;
}
/**
- * @return Proj.
- */
- public Collection<UUID> proj() {
- return proj;
- }
-
- /**
* @return Cache name.
*/
public String cacheName() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb5651e/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
index 4fb1896..7574be1 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
@@ -163,7 +163,7 @@ class VisorCacheScanCommand {
.withName("visor-cscan-task")
.withNoFailover()
.execute(classOf[VisorQueryTask],
- toTaskArgument(nid, new VisorQueryArg(proj, cacheName, "SCAN", pageSize)))
+ toTaskArgument(nid, new VisorQueryArg(cacheName, "SCAN", pageSize)))
match {
case x if x.get1() != null =>
error(x.get1())
[11/17] incubator-ignite git commit: # IGNITE-692 Implemented special
support for local caches.
Posted by ak...@apache.org.
# IGNITE-692 Implemented special support for local caches.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c72e8efc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c72e8efc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c72e8efc
Branch: refs/heads/ignite-sprint-3
Commit: c72e8efc5eef5042d2cb4fc89184db897800fdf6
Parents: 85462e2
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 14:56:24 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 14:56:24 2015 +0700
----------------------------------------------------------------------
.../internal/visor/query/VisorQueryArg.java | 15 ++++++++++-
.../internal/visor/query/VisorQueryTask.java | 28 ++++++++++++++------
2 files changed, 34 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c72e8efc/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
index 080bb35..38fac1f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.visor.query;
import java.io.*;
+import java.util.*;
/**
* Arguments for {@link VisorQueryTask}.
@@ -26,6 +27,9 @@ public class VisorQueryArg implements Serializable {
/** */
private static final long serialVersionUID = 0L;
+ /** Node ID in case of local cache. */
+ private final UUID locCacheNodeId;
+
/** Cache name for query. */
private final String cacheName;
@@ -36,17 +40,26 @@ public class VisorQueryArg implements Serializable {
private final Integer pageSize;
/**
+ * @param locCacheNodeId Node ID in case of local cache or {@code null} otherwise.
* @param cacheName Cache name for query.
* @param qryTxt Query text.
* @param pageSize Result batch size.
*/
- public VisorQueryArg(String cacheName, String qryTxt, Integer pageSize) {
+ public VisorQueryArg(UUID locCacheNodeId, String cacheName, String qryTxt, Integer pageSize) {
+ this.locCacheNodeId = locCacheNodeId;
this.cacheName = cacheName;
this.qryTxt = qryTxt;
this.pageSize = pageSize;
}
/**
+ * @return Node ID in case of local cache or {@code null} otherwise.
+ */
+ public UUID localCacheNodeId() {
+ return locCacheNodeId;
+ }
+
+ /**
* @return Cache name.
*/
public String cacheName() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c72e8efc/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index e01737f..b320842 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -41,17 +41,29 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryArg, IgniteBiTupl
VisorTaskArgument<VisorQueryArg> arg) {
String cacheName = taskArg.cacheName();
- ClusterGroup prj = ignite.cluster().forDataNodes(cacheName);
+ ClusterNode node;
- if (prj.nodes().isEmpty())
- throw new IgniteException("No data nodes for cache: " + escapeName(cacheName));
+ if (taskArg.localCacheNodeId() == null) {
+ ClusterGroup prj = ignite.cluster().forDataNodes(cacheName);
- // First try to take local node to avoid network hop.
- ClusterNode node = prj.node(ignite.localNode().id());
+ if (prj.nodes().isEmpty())
+ throw new IgniteException("No data nodes for cache: " + escapeName(cacheName));
- // Take any node from projection.
- if (node == null)
- node = prj.forRandom().node();
+ // First try to take local node to avoid network hop.
+ node = prj.node(ignite.localNode().id());
+
+ // Take any node from projection.
+ if (node == null)
+ node = prj.forRandom().node();
+ }
+ else {
+ node = ignite.cluster().node(taskArg.localCacheNodeId());
+
+ if (node == null)
+ throw new IgniteException("No data node for local cache: " + escapeName(cacheName));
+ }
+
+ assert node != null;
return Collections.singletonMap(job(taskArg), node);
}
[02/17] incubator-ignite git commit: Merge branches 'ignite-692' and
'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-692
Posted by ak...@apache.org.
Merge branches 'ignite-692' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6bf2f4ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6bf2f4ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6bf2f4ed
Branch: refs/heads/ignite-sprint-3
Commit: 6bf2f4ed7a139b1d68003ca6920b4fe7e4d2a6a1
Parents: c06a4ae 080376a
Author: AKuznetsov <ak...@gridgain.com>
Authored: Wed Apr 8 14:57:05 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Wed Apr 8 14:57:05 2015 +0700
----------------------------------------------------------------------
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/include/service.sh | 8 +-
config/hadoop/default-config.xml | 15 +-
.../streaming/StreamTransformerExample.java | 3 +-
.../configuration/CacheConfiguration.java | 3 -
.../processors/cache/CacheLazyEntry.java | 10 +-
.../processors/cache/GridCacheIoManager.java | 2 +-
.../processors/cache/KeyCacheObjectImpl.java | 13 +-
.../dht/GridClientPartitionTopology.java | 6 +-
.../distributed/dht/GridDhtLockFuture.java | 10 +-
.../dht/GridDhtPartitionTopologyImpl.java | 6 +-
.../distributed/dht/GridDhtTxLocalAdapter.java | 49 ++---
.../distributed/dht/GridDhtTxPrepareFuture.java | 2 +-
.../cacheobject/IgniteCacheObjectProcessor.java | 3 +-
.../IgniteCacheObjectProcessorImpl.java | 28 +--
.../ipc/shmem/IpcSharedMemoryNativeLoader.java | 48 +++--
.../internal/visor/log/VisorLogSearchTask.java | 3 +-
.../visor/query/VisorQueryNextPageTask.java | 5 +-
.../org/apache/ignite/lang/IgniteImmutable.java | 49 -----
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 24 ++-
.../communication/tcp/TcpCommunicationSpi.java | 14 +-
.../discovery/tcp/TcpClientDiscoverySpi.java | 47 +++--
.../spi/discovery/tcp/TcpDiscoverySpi.java | 78 ++++----
.../discovery/tcp/TcpDiscoverySpiAdapter.java | 8 +-
.../spi/swapspace/file/FileSwapSpaceSpi.java | 4 +-
.../resources/META-INF/classnames.properties | 19 +-
.../ignite/IgniteCacheAffinitySelfTest.java | 5 +
.../GridCacheOnCopyFlagAbstractSelfTest.java | 112 +----------
.../GridCacheReturnValueTransferSelfTest.java | 1 -
.../IgniteCacheStoreValueAbstractTest.java | 186 ++++++++++++++++++-
.../cache/IgniteDynamicCacheStartSelfTest.java | 23 +++
...ePartitionedBasicStoreMultiNodeSelfTest.java | 110 +----------
...ridCacheFifoBatchEvictionPolicySelfTest.java | 3 +-
.../GridAbstractCommunicationSelfTest.java | 3 +-
.../GridTcpCommunicationSpiAbstractTest.java | 5 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 3 +-
...cpCommunicationSpiMultithreadedSelfTest.java | 3 +-
...dTcpCommunicationSpiRecoveryAckSelfTest.java | 3 +-
...GridTcpCommunicationSpiRecoverySelfTest.java | 2 +-
.../IgniteCacheEvictionSelfTestSuite.java | 1 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 3 +-
.../commands/cache/VisorCacheClearCommand.scala | 3 +-
.../scala/org/apache/ignite/visor/visor.scala | 12 +-
parent/pom.xml | 2 +-
pom.xml | 14 +-
46 files changed, 477 insertions(+), 478 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6bf2f4ed/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
index 8d21fcf,3f13d5f..320bdde
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
@@@ -77,22 -70,20 +76,22 @@@ public class VisorQueryNextPageTask ext
private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryTask.VisorFutureResultSetHolder<List<?>>> storage =
+ ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> storage =
ignite.cluster().nodeLocalMap();
- VisorQueryTask.VisorFutureResultSetHolder<List<?>> t = storage.get(arg.get1());
+ VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
if (t == null)
- throw new GridInternalException("SQL query results are expired.");
+ throw new IgniteException("SQL query results are expired.");
- IgniteBiTuple<List<Object[]>, List<?>> nextRows = VisorQueryUtils.fetchSqlQueryRows(t.future(), t.next(), arg.get2());
+ VisorQueryCursor cur = t.cursor();
+
+ List<Object[]> nextRows = VisorQueryUtils.fetchSqlQueryRows(cur, arg.get2());
- boolean hasMore = nextRows.get2() != null;
+ boolean hasMore = cur.hasNext();
if (hasMore)
- storage.put(arg.get1(), new VisorQueryTask.VisorFutureResultSetHolder<>(t.future(), nextRows.get2(), true));
+ storage.put(arg.get1(), new VisorQueryTask.VisorQueryCursorHolder(t.cursor(), true));
else
storage.remove(arg.get1());
@@@ -109,22 -94,21 +108,22 @@@
private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
long start = U.currentTimeMillis();
- ConcurrentMap<String, VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>>> storage =
+ ConcurrentMap<String, VisorQueryTask.VisorQueryCursorHolder> storage =
ignite.cluster().nodeLocalMap();
- VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>> t = storage.get(arg.get1());
+ VisorQueryTask.VisorQueryCursorHolder t = storage.get(arg.get1());
if (t == null)
- throw new GridInternalException("Scan query results are expired.");
+ throw new IgniteException("Scan query results are expired.");
- IgniteBiTuple<List<Object[]>, Map.Entry<Object, Object>> rows =
- VisorQueryUtils.fetchScanQueryRows(t.future(), t.next(), arg.get2());
+ VisorQueryCursor cur = t.cursor();
+
+ List<Object[]> rows = VisorQueryUtils.fetchScanQueryRows(cur, arg.get2());
- Boolean hasMore = rows.get2() != null;
+ Boolean hasMore = cur.hasNext();
if (hasMore)
- storage.put(arg.get1(), new VisorQueryTask.VisorFutureResultSetHolder<>(t.future(), rows.get2(), true));
+ storage.put(arg.get1(), new VisorQueryTask.VisorQueryCursorHolder(cur, true));
else
storage.remove(arg.get1());
[03/17] incubator-ignite git commit: # IGNITE-692 Minor javadoc.
Posted by ak...@apache.org.
# IGNITE-692 Minor javadoc.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/25766223
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/25766223
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/25766223
Branch: refs/heads/ignite-sprint-3
Commit: 257662237937de0ae13f862a0f2d975e1f9ae803
Parents: 6bf2f4e
Author: AKuznetsov <ak...@gridgain.com>
Authored: Wed Apr 8 16:38:57 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Wed Apr 8 16:38:57 2015 +0700
----------------------------------------------------------------------
.../ignite/internal/visor/node/VisorNodeDataCollectorTask.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/25766223/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
index b6c9bbd..fde871b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
@@ -70,6 +70,7 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
/**
* @param taskRes Task result.
* @param results Results.
+ * @return Data collector task result.
*/
protected VisorNodeDataCollectorTaskResult reduce(VisorNodeDataCollectorTaskResult taskRes,
List<ComputeJobResult> results) {
[05/17] incubator-ignite git commit: Merge branches 'ignite-692' and
'ignite-sprint-3'
Posted by ak...@apache.org.
Merge branches 'ignite-692' and 'ignite-sprint-3'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2ba7b502
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2ba7b502
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2ba7b502
Branch: refs/heads/ignite-sprint-3
Commit: 2ba7b5024bdb042b6b4fb0862215fee2d5fdfed7
Parents: 9fb5651 3e6da9c
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Apr 9 14:38:09 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Apr 9 14:38:09 2015 +0700
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/Ignite.java | 26 +
.../java/org/apache/ignite/IgniteCluster.java | 9 +-
.../ignite/cluster/ClusterStartNodeResult.java | 46 +
.../ignite/internal/ClusterMetricsSnapshot.java | 384 +++------
.../apache/ignite/internal/IgniteKernal.java | 72 +-
.../org/apache/ignite/internal/IgnitionEx.java | 171 ++--
.../cluster/ClusterStartNodeResultImpl.java | 87 ++
.../cluster/IgniteClusterAsyncImpl.java | 5 +-
.../internal/cluster/IgniteClusterImpl.java | 37 +-
.../internal/managers/GridManagerAdapter.java | 34 +-
.../cache/DynamicCacheChangeRequest.java | 19 +-
.../cache/DynamicCacheDescriptor.java | 17 +-
.../processors/cache/GridCacheProcessor.java | 376 ++++++--
.../GridDhtPartitionsExchangeFuture.java | 1 +
.../cache/transactions/IgniteTxManager.java | 6 +-
.../ignite/internal/util/lang/GridFunc.java | 33 +
.../util/nodestart/IgniteNodeCallable.java | 30 -
.../util/nodestart/IgniteSshHelper.java | 2 +-
.../util/nodestart/StartNodeCallable.java | 30 +
.../ignite/internal/visor/cache/VisorCache.java | 2 +-
.../cache/VisorCacheAggregatedMetrics.java | 38 +-
.../visor/cache/VisorCacheConfiguration.java | 17 +-
.../internal/visor/cache/VisorCacheMetrics.java | 53 +-
.../cache/VisorCacheMetricsCollectorTask.java | 59 +-
.../visor/cache/VisorCacheStopTask.java | 69 ++
.../messages/TcpDiscoveryAbstractMessage.java | 24 +-
.../messages/TcpDiscoveryAuthFailedMessage.java | 25 +-
.../TcpDiscoveryCheckFailedMessage.java | 24 +-
.../TcpDiscoveryClientReconnectMessage.java | 30 +-
.../TcpDiscoveryCustomEventMessage.java | 23 +-
.../messages/TcpDiscoveryDiscardMessage.java | 24 +-
.../TcpDiscoveryDuplicateIdMessage.java | 24 +-
.../messages/TcpDiscoveryHandshakeRequest.java | 8 -
.../messages/TcpDiscoveryHandshakeResponse.java | 22 -
.../messages/TcpDiscoveryHeartbeatMessage.java | 44 +-
.../TcpDiscoveryJoinRequestMessage.java | 28 +-
.../TcpDiscoveryLoopbackProblemMessage.java | 28 +-
.../TcpDiscoveryNodeAddFinishedMessage.java | 24 +-
.../messages/TcpDiscoveryNodeAddedMessage.java | 60 +-
.../messages/TcpDiscoveryNodeFailedMessage.java | 28 +-
.../messages/TcpDiscoveryNodeLeftMessage.java | 8 -
.../tcp/messages/TcpDiscoveryPingRequest.java | 25 +-
.../tcp/messages/TcpDiscoveryPingResponse.java | 14 -
.../TcpDiscoveryStatusCheckMessage.java | 30 +-
...teCacheConfigurationDefaultTemplateTest.java | 111 +++
.../IgniteCacheConfigurationTemplateTest.java | 448 ++++++++++
.../ignite/testframework/junits/IgniteMock.java | 15 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 2 +
.../processors/query/h2/sql/GridSqlElement.java | 8 -
.../processors/query/h2/sql/GridSqlQuery.java | 183 ++++
.../query/h2/sql/GridSqlQueryParser.java | 97 ++-
.../query/h2/sql/GridSqlQuerySplitter.java | 111 ++-
.../processors/query/h2/sql/GridSqlSelect.java | 209 ++---
.../query/h2/sql/GridSqlSubquery.java | 8 +-
.../processors/query/h2/sql/GridSqlUnion.java | 134 +++
.../h2/twostep/GridReduceQueryExecutor.java | 2 +-
.../h2/sql/AbstractH2CompareQueryTest.java | 341 ++++++++
.../query/h2/sql/BaseH2CompareQueryTest.java | 823 ++++++++++++++++++
.../query/h2/sql/GridQueryParsingTest.java | 26 +-
.../query/h2/sql/H2CompareBigQueryTest.java | 707 +++++++++++++++
.../query/h2/sql/IgniteVsH2QueryTest.java | 860 -------------------
.../IgniteCacheQuerySelfTestSuite.java | 5 +-
.../processors/query/h2/sql/bigQuery.sql | 55 ++
.../org/apache/ignite/IgniteSpringBean.java | 21 +
.../util/nodestart/IgniteNodeCallableImpl.java | 308 -------
.../util/nodestart/IgniteSshHelperImpl.java | 4 +-
.../util/nodestart/StartNodeCallableImpl.java | 309 +++++++
...gniteProjectionStartStopRestartSelfTest.java | 261 +++---
.../IgniteStartStopRestartTestSuite.java | 1 +
.../commands/cache/VisorCacheCommand.scala | 423 +++++----
.../commands/cache/VisorCacheStopCommand.scala | 145 ++++
.../commands/start/VisorStartCommand.scala | 4 +-
72 files changed, 5039 insertions(+), 2698 deletions(-)
----------------------------------------------------------------------
[08/17] incubator-ignite git commit: Merge branches 'ignite-692' and
'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-692
Posted by ak...@apache.org.
Merge branches 'ignite-692' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-692
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/aa8f6686
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/aa8f6686
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/aa8f6686
Branch: refs/heads/ignite-sprint-3
Commit: aa8f668626c4e0fd79fd00c0b46da24b73006047
Parents: 4c4eb2f 845787c
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Apr 10 09:05:44 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Apr 10 09:05:44 2015 +0700
----------------------------------------------------------------------
DEVNOTES.txt | 4 +-
.../java/org/apache/ignite/IgniteCache.java | 6 ++-
.../processors/cache/GridCacheAdapter.java | 25 +++++++-----
.../distributed/dht/GridDhtLockFuture.java | 3 +-
.../GridCacheAffinityBackupsSelfTest.java | 15 ++++----
.../cache/GridCacheAbstractFullApiSelfTest.java | 13 ++++---
.../GridCacheAbstractIteratorsSelfTest.java | 3 +-
.../cache/GridCacheAbstractSelfTest.java | 10 ++---
.../cache/GridCacheClearAllSelfTest.java | 2 +-
.../cache/GridCacheDeploymentSelfTest.java | 9 +++--
.../GridCachePreloadingEvictionsSelfTest.java | 23 +++++------
.../cache/GridCacheSwapPreloadSelfTest.java | 5 ++-
.../cache/IgniteCachePeekModesAbstractTest.java | 40 ++++++++++----------
.../GridCacheMultiNodeAbstractTest.java | 13 ++++---
.../dht/GridCacheDhtEntrySelfTest.java | 12 +++---
.../dht/GridCacheDhtPreloadUnloadSelfTest.java | 2 +-
.../near/GridCacheNearMultiNodeSelfTest.java | 26 ++++++-------
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 2 +-
...achePartitionedMultiNodeFullApiSelfTest.java | 6 +--
.../near/IgniteCacheNearReadCommittedTest.java | 4 +-
...CacheReplicatedPreloadLifecycleSelfTest.java | 5 ++-
.../GridCacheReplicatedPreloadSelfTest.java | 23 ++++++-----
.../junits/common/GridCommonAbstractTest.java | 13 ++++++-
...CacheOffheapTieredMultithreadedSelfTest.java | 4 +-
.../cache/ttl/CacheTtlAbstractSelfTest.java | 14 +++----
.../IgniteCacheQuerySelfTestSuite.java | 1 +
26 files changed, 157 insertions(+), 126 deletions(-)
----------------------------------------------------------------------
[06/17] incubator-ignite git commit: # IGNITE-692 WIP
Posted by ak...@apache.org.
# IGNITE-692 WIP
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c2794850
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c2794850
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c2794850
Branch: refs/heads/ignite-sprint-3
Commit: c279485070090996a9558cb2f395f00be3904631
Parents: 2ba7b50
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Apr 9 16:19:17 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Apr 9 16:19:17 2015 +0700
----------------------------------------------------------------------
.../org/apache/ignite/internal/visor/query/VisorQueryTask.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c2794850/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index 5f66a6d..cc05ba5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -195,7 +195,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
GridCacheProcessor cacheProcessor = ignite.context().cache();
- IgniteCache<Object, Object> c = cacheProcessor.privateJCache(arg.cacheName(), false);
+ IgniteCache<Object, Object> c = cacheProcessor.jcache(arg.cacheName());
if (scan) {
ScanQuery<Object, Object> qry = new ScanQuery<>(null);