ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [41/44] incubator-ignite git commit: # sprint-1: Merge changes from sprint-32.
Date Sat, 14 Feb 2015 11:10:21 GMT
# sprint-1: Merge changes from sprint-32.


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

Branch: refs/heads/ignite-sql-old
Commit: f1e453c3b93500a2d70085aa71166a1ae0425779
Parents: 5993a24
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Sat Feb 14 17:46:25 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Sat Feb 14 17:46:25 2015 +0700

----------------------------------------------------------------------
 .../node/VisorNodeEventsCollectorTask.java      |  3 +-
 .../internal/visor/query/VisorQueryTask.java    | 45 ++++++++++----------
 .../internal/visor/util/VisorTaskUtils.java     |  4 +-
 3 files changed, 24 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f1e453c3/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
index 768bd42..0d25312 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
@@ -49,8 +49,7 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
     }
 
     /** {@inheritDoc} */
-    @Override protected Iterable<? extends VisorGridEvent> reduce0(
-        List<ComputeJobResult> results) {
+    @Override protected Iterable<? extends VisorGridEvent> reduce0(List<ComputeJobResult>
results) {
         Collection<VisorGridEvent> allEvents = new ArrayList<>();
 
         for (ComputeJobResult r : results) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f1e453c3/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 4480861..2213b43 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
@@ -34,6 +34,7 @@ import java.io.*;
 import java.sql.*;
 import java.util.*;
 
+import static org.apache.ignite.internal.visor.query.VisorQueryUtils.*;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
 
 /**
@@ -192,7 +193,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
             try {
                 Boolean scan = arg.queryTxt().toUpperCase().startsWith("SCAN");
 
-                String qryId = (scan ? VisorQueryUtils.SCAN_QRY_NAME : VisorQueryUtils.SQL_QRY_NAME)
+ "-" +
+                String qryId = (scan ? SCAN_QRY_NAME : SQL_QRY_NAME) + "-" +
                     UUID.randomUUID();
 
                 GridCache<Object, Object> c = ignite.cachex(arg.cacheName());
@@ -212,7 +213,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
                     long start = U.currentTimeMillis();
 
                     IgniteBiTuple<List<Object[]>, Map.Entry<Object, Object>>
rows =
-                        VisorQueryUtils.fetchScanQueryRows(fut, null, arg.pageSize());
+                        fetchScanQueryRows(fut, null, arg.pageSize());
 
                     long fetchDuration = U.currentTimeMillis() - start;
 
@@ -226,7 +227,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
                     scheduleResultSetHolderRemoval(qryId);
 
                     return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(),
qryId,
-                        VisorQueryUtils.SCAN_COL_NAMES, rows.get1(), next != null, duration));
+                        SCAN_COL_NAMES, rows.get1(), next != null, duration));
                 }
                 else {
                     CacheQueryFuture<List<?>> fut = ((GridCacheQueriesEx<?,
?>)cp.queries())
@@ -254,7 +255,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
                         long start = U.currentTimeMillis();
 
                         IgniteBiTuple<List<Object[]>, List<?>> rows =
-                            VisorQueryUtils.fetchSqlQueryRows(fut, firstRow, arg.pageSize());
+                            fetchSqlQueryRows(fut, firstRow, arg.pageSize());
 
                         long fetchDuration = U.currentTimeMillis() - start;
 
@@ -276,29 +277,27 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
         }
 
         /**
-         *
-         * @param id Uniq query result id.
+         * @param id Unique query result id.
          */
         private void scheduleResultSetHolderRemoval(final String id) {
-            ((IgniteKernal)ignite).context().timeout()
-                .addTimeoutObject(new GridTimeoutObjectAdapter(VisorQueryUtils.RMV_DELAY)
{
-                    @Override public void onTimeout() {
-                        ClusterNodeLocalMap<String, VisorFutureResultSetHolder> storage
= ignite.nodeLocalMap();
-
-                        VisorFutureResultSetHolder<?> t = storage.get(id);
-
-                        if (t != null) {
-                            // If future was accessed since last scheduling,  set access
flag to false and reschedule.
-                            if (t.accessed()) {
-                                t.accessed(false);
-
-                                scheduleResultSetHolderRemoval(id);
-                            }
-                            else
-                                storage.remove(id); // Remove stored future otherwise.
+            ((IgniteKernal)ignite).context().timeout().addTimeoutObject(new GridTimeoutObjectAdapter(RMV_DELAY)
{
+                @Override public void onTimeout() {
+                    ClusterNodeLocalMap<String, VisorFutureResultSetHolder> storage
= ignite.nodeLocalMap();
+
+                    VisorFutureResultSetHolder<?> t = storage.get(id);
+
+                    if (t != null) {
+                        // If future was accessed since last scheduling,  set access flag
to false and reschedule.
+                        if (t.accessed()) {
+                            t.accessed(false);
+
+                            scheduleResultSetHolderRemoval(id);
                         }
+                        else
+                            storage.remove(id); // Remove stored future otherwise.
                     }
-                });
+                }
+            });
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f1e453c3/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index 045dbaf..4f54e50 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -91,9 +91,7 @@ public class VisorTaskUtils {
     /** Only non task event types that Visor should collect. */
     private static final int[] VISOR_ALL_EVTS = concat(VISOR_TASK_EVTS, VISOR_NON_TASK_EVTS);
 
-    /**
-     * Maximum folder depth. I.e. if depth is 4 we look in starting folder and 3 levels of
sub-folders.
-     */
+    /** Maximum folder depth. I.e. if depth is 4 we look in starting folder and 3 levels
of sub-folders. */
     public static final int MAX_FOLDER_DEPTH = 4;
 
     private static final Comparator<VisorLogFile> LAST_MODIFIED = new Comparator<VisorLogFile>()
{


Mime
View raw message