Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1160#discussion_r174440528
  
    --- Diff: exec/java-exec/src/main/resources/rest/index.ftl ---
    @@ -291,6 +300,46 @@
                 var url = protocol + "//" + host + requestPath;
                 return url;
           }
    +
    +      //Iterates through all the nodes for update
    +      function reloadMemory () {
    +          for (i = 1; i <= size; i++) {
    +              var address = 
$("#row-"+i).find("#address").contents().get(0).nodeValue.trim();
    +              updateMemory(address, i);
    +          }
    +      }
    +
    +      //Update memory
    +      function updateMemory(drillbit,idx) {
    +        var result = $.ajax({
    +          type: 'GET',
    +          url: "http://"+drillbit+":8047/status/metrics";,
    +          dataType: "json",
    +          complete: function(data) {
    +            var metrics = data.responseJSON['gauges'];
    +            var usedHeap = metrics['heap.used'].value;
    +            var maxHeap  = metrics['heap.max'].value;
    +            var usedDirect = metrics['drill.allocator.root.used'].value;
    +            var peakDirect = metrics['drill.allocator.root.peak'].value;
    +            var heapUsage    = computeMemUsage(usedHeap,maxHeap);
    --- End diff --
    
    Please remove unnecessary spaces here and in other file as well.


---

Reply via email to