incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [28/30] git commit: Started the query graphs, but need a fix to blur QueryStatus object
Date Thu, 07 Nov 2013 02:41:51 GMT
Started the query graphs, but need a fix to blur QueryStatus object


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

Branch: refs/heads/blur-console-v2
Commit: 7ee35f9dcc948bc2eddc589b31e20fbdc49ea2c3
Parents: 2734f46
Author: Chris Rohr <crohr@nearinfinity.com>
Authored: Wed Nov 6 21:02:13 2013 -0500
Committer: Chris Rohr <crohr@nearinfinity.com>
Committed: Wed Nov 6 21:02:13 2013 -0500

----------------------------------------------------------------------
 .../org/apache/blur/console/util/QueryUtil.java |  8 ++++
 .../apache/blur/console/webapp/js/dashboard.js  | 46 ++++++++++----------
 2 files changed, 31 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7ee35f9d/contrib/blur-console/src/main/java/org/apache/blur/console/util/QueryUtil.java
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/java/org/apache/blur/console/util/QueryUtil.java
b/contrib/blur-console/src/main/java/org/apache/blur/console/util/QueryUtil.java
index 15f295f..7c4a46e 100644
--- a/contrib/blur-console/src/main/java/org/apache/blur/console/util/QueryUtil.java
+++ b/contrib/blur-console/src/main/java/org/apache/blur/console/util/QueryUtil.java
@@ -26,6 +26,7 @@ import org.apache.blur.thirdparty.thrift_0_9_0.TException;
 import org.apache.blur.thrift.BlurClient;
 import org.apache.blur.thrift.generated.Blur.Iface;
 import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurQueryStatus;
 
 public class QueryUtil {
 	
@@ -42,6 +43,13 @@ public class QueryUtil {
 			for (String table : tables) {
 				List<String> queryIds = client.queryStatusIdList(table);				
 				queryCount += queryIds.size();
+				System.out.println(queryCount);
+				
+				for (String queryId : queryIds) {
+					BlurQueryStatus status = client.queryStatusById(table, queryId);
+					System.out.println(status.getCpuTimes());
+					System.out.println(status.getQuery().getStartTime());
+				}
 			}
 			clusterQueryCount.put(cluster, queryCount);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7ee35f9d/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
index 8f4530a..a395488 100644
--- a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
+++ b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
@@ -44,28 +44,28 @@ blurApp.controller('DashboardCtrl', function($scope, $http, $timeout)
{
         });
     })();
 
-    (function query_tick() {
-        $http.get('/service/dashboard/query/status').success(function (data) {
-            $scope.queryData.errMsg = data.errMsg;
+    // (function query_tick() {
+    //     $http.get('/service/dashboard/query/status').success(function (data) {
+    //         $scope.queryData.errMsg = data.errMsg;
 
-            var chartData = [];
-            angular.forEach(data.clusters, function(value, key){
-                var clusterQueryData = $scope.queryData[key].clone() || [];
-                if (clusterQueryData.length == 50) {
-                    clusterQueryData.shift();
-                    for(var i = 0; i < clusterQueryData.length; i++) {
-                        clusterQueryData[i] = [i, clusterQueryData[1]];
-                    }    
-                }
-                clusterQueryData.push(value);
-                $scope.queryData[key] = clusterQueryData;
-                chartData.push(clusterQueryData);
-            });
-            $scope.queryData.chart = chartData;
-            $timeout(query_tick, 10000);
-        }).error(function(){
-            console.log("Unable to update queries");
-            $timeout(query_tick, 30000);
-        });
-    })();
+    //         var chartData = [];
+    //         angular.forEach(data.clusters, function(value, key){
+    //             var clusterQueryData = $scope.queryData[key].clone() || [];
+    //             if (clusterQueryData.length == 50) {
+    //                 clusterQueryData.shift();
+    //                 for(var i = 0; i < clusterQueryData.length; i++) {
+    //                     clusterQueryData[i] = [i, clusterQueryData[1]];
+    //                 }    
+    //             }
+    //             clusterQueryData.push(value);
+    //             $scope.queryData[key] = clusterQueryData;
+    //             chartData.push(clusterQueryData);
+    //         });
+    //         $scope.queryData.chart = chartData;
+    //         $timeout(query_tick, 10000);
+    //     }).error(function(){
+    //         console.log("Unable to update queries");
+    //         $timeout(query_tick, 30000);
+    //     });
+    // })();
 })
\ No newline at end of file


Mime
View raw message