You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@htrace.apache.org by cm...@apache.org on 2016/02/10 00:36:23 UTC

[1/2] incubator-htrace git commit: HTRACE-334. htrace-web: Make limit of search and children API configurable (iwasakims via cmccabe)

Repository: incubator-htrace
Updated Branches:
  refs/heads/branch-4.1 40ffa8202 -> 9e56be495


HTRACE-334. htrace-web: Make limit of search and children API configurable (iwasakims via cmccabe)


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

Branch: refs/heads/branch-4.1
Commit: 0476dd89a2586dfb22c5b9796799e6d456cf9a39
Parents: 40ffa82
Author: Colin P. Mccabe <cm...@apache.org>
Authored: Thu Jan 21 11:13:44 2016 -0800
Committer: Colin P. Mccabe <cm...@apache.org>
Committed: Tue Feb 9 15:35:53 2016 -0800

----------------------------------------------------------------------
 .../src/main/webapp/app/search_view.js          |  4 +++-
 htrace-webapp/src/main/webapp/app/span.js       | 19 +++++++++---------
 .../src/main/webapp/app/span_widget.js          | 10 +++++++++-
 htrace-webapp/src/main/webapp/index.html        | 21 ++++++++++++++++++++
 4 files changed, 43 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/0476dd89/htrace-webapp/src/main/webapp/app/search_view.js
----------------------------------------------------------------------
diff --git a/htrace-webapp/src/main/webapp/app/search_view.js b/htrace-webapp/src/main/webapp/app/search_view.js
index 5936410..b5abd1f 100644
--- a/htrace-webapp/src/main/webapp/app/search_view.js
+++ b/htrace-webapp/src/main/webapp/app/search_view.js
@@ -80,9 +80,11 @@ htrace.SearchView = Backbone.View.extend({
         return false;
       }
     }
+    var lim = Math.min(parseInt($("#search-lim").val()) || 20, 200);
+    $("#search-lim").val(lim.toString());
     var queryJson = {
       pred: predicates,
-      lim: 20
+      lim: lim
     };
     // If there are existing search results, we want results which "come after"
     // those.  So pass the last span we saw as a continuation token.

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/0476dd89/htrace-webapp/src/main/webapp/app/span.js
----------------------------------------------------------------------
diff --git a/htrace-webapp/src/main/webapp/app/span.js b/htrace-webapp/src/main/webapp/app/span.js
index ca867ec..20944b9 100644
--- a/htrace-webapp/src/main/webapp/app/span.js
+++ b/htrace-webapp/src/main/webapp/app/span.js
@@ -219,18 +219,19 @@ htrace.Span = Backbone.Model.extend({
     return rootDeferred.promise();
   },
 
-  reifyChildrenRecursive: function(depth) {
+  reifyChildrenRecursive: function(depth, lim) {
     var rootDeferred = jQuery.Deferred();
     var span = this;
-    span.reifyChildren().done(function(err) {
-      if ((err != "") || (depth <= 0)) {
+    span.reifyChildren(lim).done(function(err) {
+      var reifiedChildren = span.get("reifiedChildren");
+      lim = lim - reifiedChildren.length;
+      if ((err != "") || (depth <= 0) || (lim <= 0)) {
         rootDeferred.resolve(err);
         return;
       }
       var recursivePromises = [];
-      var reifiedChildren = span.get("reifiedChildren");
       for (var j = 0; j < reifiedChildren.length; j++) {
-        recursivePromises.push(reifiedChildren[j].reifyChildrenRecursive(depth - 1));
+        recursivePromises.push(reifiedChildren[j].reifyChildrenRecursive(depth - 1, lim));
       }
       $.when.apply($, recursivePromises).then(function() {
         for (var i = 0; i < arguments.length; i++) {
@@ -253,11 +254,11 @@ htrace.Span = Backbone.Model.extend({
   // this span and stores them into reifiedChildren.  The promise returns the
   // empty string on success, or an error string on failure.
   //
-  reifyChildren: function() {
+  reifyChildren: function(lim) {
     var rootDeferred = jQuery.Deferred();
     var span = this;
     $.ajax({
-        url: "span/" + span.get("spanId") + "/children?lim=50",
+        url: "span/" + span.get("spanId") + "/children?lim=" + lim.toString(),
         data: {},
         contentType: "application/json; charset=utf-8",
         dataType: "json"
@@ -288,8 +289,8 @@ htrace.Span = Backbone.Model.extend({
           for (var j = 0; j < reifiedChildren.length; j++) {
             reifiedChildren[j].set("reifiedParents", [span]);
           }
-          console.log("Setting reified children for " + span.get("spanId") +
-              " to " + htrace.spanModelsToString (reifiedChildren));
+          //console.log("Setting reified children for " + span.get("spanId") +
+          //    " to " + htrace.spanModelsToString (reifiedChildren));
           span.set("reifiedChildren", reifiedChildren);
           rootDeferred.resolve("");
         });

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/0476dd89/htrace-webapp/src/main/webapp/app/span_widget.js
----------------------------------------------------------------------
diff --git a/htrace-webapp/src/main/webapp/app/span_widget.js b/htrace-webapp/src/main/webapp/app/span_widget.js
index ba70577..8ebe4a7 100644
--- a/htrace-webapp/src/main/webapp/app/span_widget.js
+++ b/htrace-webapp/src/main/webapp/app/span_widget.js
@@ -246,7 +246,9 @@ htrace.SpanWidget = function(params) {
       case "dblclick":
         if (htrace.inBoundingBox(e.x, e.y,
             this.x0, this.xF, this.y0, this.yF)) {
+          $("body").css("cursor", "progress");
           htrace.showSpanDetails(this.span);
+          $("body").css("cursor", "default");
         }
         return true;
     }
@@ -271,10 +273,12 @@ htrace.SpanWidget = function(params) {
       y0: this.y0 + 2,
       yF: this.yF - 2,
       callback: function(e) {
+        $("body").css("cursor", "progress");
         var depth = (e.raw.ctrlKey) ? 100 : 0;
         $.when(widget.span.reifyParentsRecursive(depth)).done(function(result) {
           console.log("reifyParentsRecursive(" + depth + "): result was '" +
               result + "'");
+          $("body").css("cursor", "default");
           if (result != "") {
             alert(result);
           } else {
@@ -294,10 +298,14 @@ htrace.SpanWidget = function(params) {
       y0: this.y0 + 2,
       yF: this.yF - 2,
       callback: function(e) {
+        $("body").css("cursor", "progress");
+        var lim = Math.min(parseInt($("#children-lim").val()) || 50, 500);
+        $("#children-lim").val(lim.toString());
         var depth = (e.raw.ctrlKey) ? 100 : 0;
-        $.when(widget.span.reifyChildrenRecursive(depth)).done(function (result) {
+        $.when(widget.span.reifyChildrenRecursive(depth, lim)).done(function (result) {
           console.log("reifyChildrenRecursive(" + depth + "): result was '" +
               result + "'");
+          $("body").css("cursor", "default");
           if (result != "") {
             alert(result);
           } else {

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/0476dd89/htrace-webapp/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/htrace-webapp/src/main/webapp/index.html b/htrace-webapp/src/main/webapp/index.html
index 7f4a687..c8f2493 100644
--- a/htrace-webapp/src/main/webapp/index.html
+++ b/htrace-webapp/src/main/webapp/index.html
@@ -207,6 +207,27 @@
               </form>
             </div>
           </div>
+          <div class="panel panel-default">
+            <div class="panel-heading">
+              <h1 class="panel-title">Limits</h1>
+            </div style="border: 1px solid #000000;">
+            <div class="panel-body">
+              <div class="form-horizontal">
+                <div class="form-group">
+                  <label class="col-sm-8 control-label">Max search results</label>
+                  <div class="col-sm-4">
+                    <input type="text" class="form-control" id="search-lim" value="20"/>
+                  </div>
+                </div>
+                <div class="form-group">
+                  <label class="col-sm-8 control-label">Max child lookup</label>
+                  <div class="col-sm-4">
+                    <input type="text" class="form-control" id="children-lim" value="50"/>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
         </div>
         <div class="col-md-9" id="resultsView">
         </div>


[2/2] incubator-htrace git commit: HTRACE-342. Centralize building instructions in BUILDING.txt (cmccabe)

Posted by cm...@apache.org.
HTRACE-342. Centralize building instructions in BUILDING.txt (cmccabe)


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

Branch: refs/heads/branch-4.1
Commit: 9e56be495ee3f42aa79665c74f29c4616b05aebb
Parents: 0476dd8
Author: Colin P. Mccabe <cm...@apache.org>
Authored: Tue Feb 9 15:34:40 2016 -0800
Committer: Colin P. Mccabe <cm...@apache.org>
Committed: Tue Feb 9 15:35:59 2016 -0800

----------------------------------------------------------------------
 BUILDING.txt |  9 +++++++--
 README.md    | 15 ++++-----------
 2 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/9e56be49/BUILDING.txt
----------------------------------------------------------------------
diff --git a/BUILDING.txt b/BUILDING.txt
index e1bf0e9..ad8ef12 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -4,10 +4,15 @@ Building HTrace
 Building HTrace requires
 
 * Java 1.7 at least.
-* Apache Maven 3.x.
-* Go programming language, version 1.3 or higher (for htrace-htraced)
+* Apache Maven 3.x
+* Go programming language, version 1.4 or higher (for htrace-htraced)
 * The development package for leveldb (for htrace-htraced)
 
+Note that at the moment, only Maven 3.0.4 should be used to create HTrace
+releases - see [HTRACE-236](https://issues.apache.org/jira/browse/HTRACE-236)
+(Support building release artifacts with Maven versions other than 3.0.4) for
+details.
+
 After installing dependencies, to build, run:
 
    $ mvn install

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/9e56be49/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index fd48635..39a2331 100644
--- a/README.md
+++ b/README.md
@@ -17,15 +17,8 @@
 
 HTrace
 ======
-HTrace is a tracing framework for use with distributed systems.
-
-See documentation at src/main/site/markdown/index.md or at http://htrace.incubator.apache.org.
-
-Building
---------
-Only Maven 3.0.4 should be used to create HTrace releases - see [HTRACE-236](https://issues.apache.org/jira/browse/HTRACE-236)
-(Support building release artifacts with Maven versions other than 3.0.4) for details.  
-
-To get around this while using Maven 3.3 [HTRACE-234](https://issues.apache.org/jira/browse/HTRACE-234)
-you can run maven with `-DcreateDependencyReducedPom=false`.  
+HTrace is a tracing framework for use with distributed systems.  See the
+documentation at [src/main/site/markdown/index.md] or at
+http://htrace.incubator.apache.org for more details.
 
+For help on building the software, see [BUILDING.txt].