ASTERIXDB-1786: Remove servlet/jetty dependency Change-Id: Id72b394fa967dd130c0df7e813812e3c6b985c84 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1527 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Michael Blow <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/68e290a4 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/68e290a4 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/68e290a4 Branch: refs/heads/master Commit: 68e290a43022cc469a915063f74cbb60f8b7d00d Parents: bcdc2ab Author: Till Westmann <[email protected]> Authored: Thu Feb 23 19:08:00 2017 -0800 Committer: Till Westmann <[email protected]> Committed: Fri Feb 24 18:23:25 2017 -0800 ---------------------------------------------------------------------- asterixdb/pom.xml | 1 + .../hyracks-control/hyracks-control-cc/pom.xml | 38 -- .../HyracksAdminConsoleApplication.java | 43 -- .../cc/adminconsole/pages/AbstractPage.java | 31 - .../cc/adminconsole/pages/IndexPage.java | 96 ---- .../cc/adminconsole/pages/JobDetailsPage.java | 341 ----------- .../cc/adminconsole/pages/NodeDetailsPage.java | 28 - .../hyracks/control/cc/web/WebServer.java | 30 +- .../control/cc/web/util/RoutingHandler.java | 69 --- .../cc/adminconsole/pages/AbstractPage.html | 38 -- .../cc/adminconsole/pages/IndexPage.html | 76 --- .../cc/adminconsole/pages/JobDetailsPage.html | 84 --- .../cc/adminconsole/pages/NodeDetailsPage.html | 87 --- .../src/main/resources/static/file.txt | 16 + .../static/javascript/adminconsole/Graphs.js | 179 ------ .../javascript/adminconsole/JobDetailsPage.js | 105 ---- .../javascript/adminconsole/NodeDetailsPage.js | 261 --------- .../javascript/adminconsole/json.human.js | 395 ------------- .../static/javascript/flot/jquery.flot.min.js | 6 - .../javascript/flot/jquery.flot.resize.min.js | 1 - .../static/javascript/jquery/jquery.min.js | 4 - .../javascript/jquery/plugins/jquery-ui.min.js | 356 ------------ .../jquery/plugins/jquery.getParams.js | 39 -- .../javascript/jquery/plugins/jquery.timer.js | 111 ---- .../jsplumb/jquery.jsPlumb-1.3.5-all-min.js | 1 - .../static/stylesheet/adminconsole.css | 24 - .../jquery-ui/themes/base/jquery-ui.css | 563 ------------------- .../resources/static/stylesheet/json.human.css | 146 ----- .../static/stylesheet/adminconsole.css | 24 + .../StaticResourcesAPIIntegrationTest.java | 4 +- .../hyracks/http/server/utils/HttpUtil.java | 2 + hyracks-fullstack/pom.xml | 16 - 32 files changed, 46 insertions(+), 3169 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/asterixdb/pom.xml ---------------------------------------------------------------------- diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml index 5221c4e..11b706b 100644 --- a/asterixdb/pom.xml +++ b/asterixdb/pom.xml @@ -183,6 +183,7 @@ <exclude>**/*.tsv</exclude> <exclude>**/*.txt</exclude> <exclude>**/*.xsd</exclude> + <exclude>**/target/**</exclude> </excludes> <includes> <include>**/asterix-*</include> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml index 7076cf7..9dc3c1a 100644 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml +++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml @@ -88,40 +88,6 @@ <artifactId>netty-all</artifactId> </dependency> <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-server</artifactId> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>3.1.0</version> - </dependency> - <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-servlet</artifactId> - </dependency> - <dependency> - <groupId>org.apache.wicket</groupId> - <artifactId>wicket-core</artifactId> - <version>1.5.2</version> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.wicket</groupId> - <artifactId>wicket-request</artifactId> - <version>1.5.2</version> - </dependency> - <dependency> - <groupId>org.apache.wicket</groupId> - <artifactId>wicket-util</artifactId> - <version>1.5.2</version> - </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </dependency> @@ -150,10 +116,6 @@ <artifactId>commons-lang3</artifactId> </dependency> <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - </dependency> - <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/HyracksAdminConsoleApplication.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/HyracksAdminConsoleApplication.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/HyracksAdminConsoleApplication.java deleted file mode 100644 index fbd5e25..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/HyracksAdminConsoleApplication.java +++ /dev/null @@ -1,43 +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.hyracks.control.cc.adminconsole; - -import org.apache.wicket.Page; -import org.apache.wicket.protocol.http.WebApplication; - -import org.apache.hyracks.control.cc.ClusterControllerService; -import org.apache.hyracks.control.cc.adminconsole.pages.IndexPage; - -public class HyracksAdminConsoleApplication extends WebApplication { - private ClusterControllerService ccs; - - @Override - public void init() { - ccs = (ClusterControllerService) getServletContext().getAttribute(ClusterControllerService.class.getName()); - } - - @Override - public Class<? extends Page> getHomePage() { - return IndexPage.class; - } - - public ClusterControllerService getClusterControllerService() { - return ccs; - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.java deleted file mode 100644 index db40465..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.java +++ /dev/null @@ -1,31 +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.hyracks.control.cc.adminconsole.pages; - -import org.apache.wicket.markup.html.WebPage; - -import org.apache.hyracks.control.cc.adminconsole.HyracksAdminConsoleApplication; - -public class AbstractPage extends WebPage { - private static final long serialVersionUID = 1L; - - public HyracksAdminConsoleApplication getAdminConsoleApplication() { - return (HyracksAdminConsoleApplication) getApplication(); - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java deleted file mode 100644 index 443fa88..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java +++ /dev/null @@ -1,96 +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.hyracks.control.cc.adminconsole.pages; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.google.common.collect.Lists; -import org.apache.wicket.markup.html.basic.Label; -import org.apache.wicket.markup.html.link.BookmarkablePageLink; -import org.apache.wicket.markup.html.list.ListItem; -import org.apache.wicket.markup.html.list.ListView; -import org.apache.wicket.request.mapper.parameter.PageParameters; - -import org.apache.hyracks.control.cc.ClusterControllerService; -import org.apache.hyracks.control.cc.work.GetJobSummariesJSONWork; -import org.apache.hyracks.control.cc.work.GetNodeSummariesJSONWork; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -public class IndexPage extends AbstractPage { - private static final long serialVersionUID = 1L; - - public IndexPage() throws Exception { - ClusterControllerService ccs = getAdminConsoleApplication().getClusterControllerService(); - - GetNodeSummariesJSONWork gnse = new GetNodeSummariesJSONWork(ccs.getNodeManager()); - ccs.getWorkQueue().scheduleAndSync(gnse); - ArrayNode nodeSummaries = gnse.getSummaries(); - add(new Label("node-count", String.valueOf(nodeSummaries.size()))); - ListView<JsonNode> nodeList = new ListView<JsonNode>("node-list", - Lists.newArrayList(nodeSummaries.iterator())) { - private static final long serialVersionUID = 1L; - - @Override - protected void populateItem(ListItem<JsonNode> item) { - JsonNode o = item.getModelObject(); - item.add(new Label("node-id", o.get("node-id").asText())); - item.add(new Label("heap-used", o.get("heap-used").asText())); - item.add(new Label("system-load-average", o.get("system-load-average").asText())); - PageParameters params = new PageParameters(); - params.add("node-id", o.get("node-id").asText()); - item.add(new BookmarkablePageLink<Object>("node-details", NodeDetailsPage.class, params)); - } - }; - add(nodeList); - - GetJobSummariesJSONWork gjse = new GetJobSummariesJSONWork(ccs.getJobManager()); - ccs.getWorkQueue().scheduleAndSync(gjse); - ArrayNode jobSummaries = gjse.getSummaries(); - ListView<JsonNode> jobList = new ListView<JsonNode>("jobs-list", Lists.newArrayList(jobSummaries.iterator())) { - private static final long serialVersionUID = 1L; - - @Override - protected void populateItem(ListItem<JsonNode> item) { - JsonNode o = item.getModelObject(); - item.add(new Label("job-id", o.get("job-id").asText())); - item.add(new Label("status", o.get("status").asText())); - item.add(new Label("create-time", longToDateString(Long.parseLong(o.get("create-time").asText())))); - item.add(new Label("start-time", longToDateString(Long.parseLong(o.get("start-time").asText())))); - item.add(new Label("end-time", longToDateString(Long.parseLong(o.get("end-time").asText())))); - PageParameters params = new PageParameters(); - params.add("job-id", o.get("job-id")); - item.add(new BookmarkablePageLink<Object>("job-details", JobDetailsPage.class, params)); - } - }; - add(jobList); - } - - private String longToDateString(long milliseconds) { - if (milliseconds == 0) { - return "n/a"; - } - SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss"); - Date date = new Date(milliseconds); - return sdf.format(date); - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java deleted file mode 100644 index 68add85..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.java +++ /dev/null @@ -1,341 +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.hyracks.control.cc.adminconsole.pages; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.fasterxml.jackson.databind.JsonNode; -import org.apache.wicket.markup.html.basic.Label; -import org.apache.wicket.request.mapper.parameter.PageParameters; -import org.apache.wicket.util.string.StringValue; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; - -import org.apache.hyracks.api.dataflow.ActivityId; -import org.apache.hyracks.api.dataflow.TaskAttemptId; -import org.apache.hyracks.api.dataflow.TaskId; -import org.apache.hyracks.api.job.JobId; -import org.apache.hyracks.control.cc.ClusterControllerService; -import org.apache.hyracks.control.cc.work.GetActivityClusterGraphJSONWork; -import org.apache.hyracks.control.cc.work.GetJobRunJSONWork; - -public class JobDetailsPage extends AbstractPage { - private static final long serialVersionUID = 1L; - - private static final int HEIGHT = 29; - - public JobDetailsPage(PageParameters params) throws Exception { - ClusterControllerService ccs = getAdminConsoleApplication().getClusterControllerService(); - - StringValue jobIdStr = params.get("job-id"); - - JobId jobId = JobId.parse(jobIdStr.toString()); - - GetActivityClusterGraphJSONWork gacgw = new GetActivityClusterGraphJSONWork(ccs, jobId); - ccs.getWorkQueue().scheduleAndSync(gacgw); - Label jag = new Label("activity-cluster-graph", gacgw.getJSON().toString()); - jag.setEscapeModelStrings(false); - add(jag); - - ObjectNode jagO = gacgw.getJSON(); - - Map<ActivityId, String> activityMap = new HashMap<ActivityId, String>(); - if (jagO.has("activity-clusters")) { - JsonNode acArray = jagO.get("activity-clusters"); - for (int j = 0; j < acArray.size(); ++j) { - JsonNode acO = acArray.get(j); - if (acO.has("activities")) { - JsonNode aArray = acO.get("activities"); - for (int i = 0; i < aArray.size(); ++i) { - JsonNode aO = aArray.get(i); - ActivityId aid = ActivityId.parse(aO.get("id").asText()); - String className = aO.get("java-class").asText(); - - activityMap.put(aid, className); - } - } - } - } - - GetJobRunJSONWork gjrw = new GetJobRunJSONWork(ccs.getJobManager(), jobId); - ccs.getWorkQueue().scheduleAndSync(gjrw); - Label jobrun = new Label("job-run", gjrw.getJSON().toString()); - jobrun.setEscapeModelStrings(false); - add(jobrun); - - ObjectNode jrO = gjrw.getJSON(); - - List<TaskClusterAttempt[]> tcList = new ArrayList<TaskClusterAttempt[]>(); - long minTime = Long.MAX_VALUE; - long maxTime = Long.MIN_VALUE; - if (jrO.has("activity-clusters")) { - JsonNode acA = jrO.get("activity-clusters"); - for (int i = 0; i < acA.size(); ++i) { - JsonNode acO = acA.get(i); - if (acO.has("plan")) { - JsonNode planO = acO.get("plan"); - if (planO.has("task-clusters")) { - JsonNode tcA = planO.get("task-clusters"); - for (int j = 0; j < tcA.size(); ++j) { - JsonNode tcO = tcA.get(j); - String tcId = tcO.get("task-cluster-id").asText(); - if (tcO.has("attempts")) { - JsonNode tcaA = tcO.get("attempts"); - TaskClusterAttempt[] tcAttempts = new TaskClusterAttempt[tcaA.size()]; - for (int k = 0; k < tcaA.size(); ++k) { - JsonNode tcaO = tcaA.get(k); - int attempt = tcaO.get("attempt").asInt(); - long startTime = tcaO.get("start-time").asLong(); - long endTime = tcaO.get("end-time").asLong(); - - tcAttempts[k] = new TaskClusterAttempt(tcId, attempt, startTime, endTime); - if (startTime < minTime) { - minTime = startTime; - } - if (endTime > maxTime) { - maxTime = endTime; - } - if (tcaO.has("task-attempts")) { - JsonNode taArray = tcaO.get("task-attempts"); - tcAttempts[k].tasks = new TaskAttempt[taArray.size()]; - for (int l = 0; l < taArray.size(); ++l) { - JsonNode taO = taArray.get(l); - TaskAttemptId taId = TaskAttemptId.parse(taO.get("task-attempt-id").asText()); - TaskAttempt ta = new TaskAttempt(taId, taO.get("start-time").asLong(), - taO.get("end-time").asLong()); - tcAttempts[k].tasks[l] = ta; - TaskId tid = taId.getTaskId(); - ta.name = activityMap.get(tid.getActivityId()); - ta.partition = tid.getPartition(); - } - Arrays.sort(tcAttempts[k].tasks, new Comparator<TaskAttempt>() { - @Override - public int compare(TaskAttempt o1, TaskAttempt o2) { - return o1.startTime < o2.startTime ? -1 - : (o1.startTime > o2.startTime ? 1 : 0); - } - }); - } - } - Arrays.sort(tcAttempts, new Comparator<TaskClusterAttempt>() { - @Override - public int compare(TaskClusterAttempt o1, TaskClusterAttempt o2) { - return o1.startTime < o2.startTime ? -1 : (o1.startTime > o2.startTime ? 1 : 0); - } - }); - tcList.add(tcAttempts); - } - } - } - } - } - } - - Map<TaskAttemptId, TaskProfile> tpMap = new HashMap<TaskAttemptId, TaskProfile>(); - if (jrO.has("profile")) { - JsonNode pO = jrO.get("profile"); - if (pO.has("joblets")) { - JsonNode jobletsA = pO.get("joblets"); - for (int i = 0; i < jobletsA.size(); ++i) { - JsonNode jobletO = jobletsA.get(i); - if (jobletO.has("tasks")) { - JsonNode tasksA = jobletO.get("tasks"); - for (int j = 0; j < tasksA.size(); ++j) { - JsonNode taskO = tasksA.get(j); - ActivityId activityId = ActivityId.parse(taskO.get("activity-id").asText()); - int partition = taskO.get("partition").asInt(); - int attempt = taskO.get("attempt").asInt(); - TaskAttemptId taId = new TaskAttemptId(new TaskId(activityId, partition), attempt); - if (taskO.has("partition-send-profile")) { - JsonNode taskProfilesA = taskO.get("partition-send-profile"); - for (int k = 0; k < taskProfilesA.size(); ++k) { - JsonNode ppO = taskProfilesA.get(k); - long openTime = ppO.get("open-time").asLong(); - long closeTime = ppO.get("close-time").asLong(); - int resolution = ppO.get("resolution").asInt(); - long offset = ppO.get("offset").asLong(); - JsonNode frameTimesA = ppO.get("frame-times"); - long[] frameTimes = new long[frameTimesA.size()]; - for (int l = 0; l < frameTimes.length; ++l) { - frameTimes[l] = frameTimesA.get(l).asLong() + offset; - } - TaskProfile tp = new TaskProfile(taId, openTime, closeTime, frameTimes, resolution); - if (!tpMap.containsKey(tp.taId)) { - tpMap.put(tp.taId, tp); - } - } - } - } - } - } - } - } - - if (!tcList.isEmpty()) { - Collections.sort(tcList, new Comparator<TaskClusterAttempt[]>() { - @Override - public int compare(TaskClusterAttempt[] o1, TaskClusterAttempt[] o2) { - if (o1.length == 0) { - return o2.length == 0 ? 0 : -1; - } else if (o2.length == 0) { - return 1; - } - return o1[0].startTime < o2[0].startTime ? -1 : (o1[0].startTime > o2[0].startTime ? 1 : 0); - } - }); - long range = maxTime - minTime; - - double leftOffset = 20; - - int xWidth = 1024; - double width = ((double) xWidth) / range; - StringBuilder buffer = new StringBuilder(); - int y = 0; - for (TaskClusterAttempt[] tcAttempts : tcList) { - for (int i = 0; i < tcAttempts.length; ++i) { - TaskClusterAttempt tca = tcAttempts[i]; - long startTime = tca.startTime - minTime; - long endTime = tca.endTime - minTime; - buffer.append("<rect x=\"").append(startTime * width + leftOffset).append("\" y=\"") - .append(y * (HEIGHT + 1)).append("\" width=\"").append(width * (endTime - startTime)) - .append("\" height=\"").append(HEIGHT).append("\"/>\n"); - buffer.append("<text x=\"").append(endTime * width + leftOffset + 20).append("\" y=\"") - .append(y * (HEIGHT + 1) + HEIGHT * 3 / 4).append("\">") - .append((endTime - startTime) + " ms").append("</text>\n"); - ++y; - for (int j = 0; j < tca.tasks.length; ++j) { - TaskAttempt ta = tca.tasks[j]; - long tStartTime = ta.startTime - minTime; - long tEndTime = ta.endTime - minTime; - buffer.append("<rect x=\"").append(tStartTime * width + leftOffset).append("\" y=\"") - .append(y * (HEIGHT + 1) + HEIGHT / 4).append("\" width=\"") - .append(width * (tEndTime - tStartTime)).append("\" height=\"").append(HEIGHT / 2) - .append("\" style=\"fill:rgb(255,255,255);stroke-width:1;stroke:rgb(0,0,0)\"/>\n"); - buffer.append("<text x=\"").append(tEndTime * width + leftOffset + 20).append("\" y=\"") - .append(y * (HEIGHT + 1) + HEIGHT * 3 / 4).append("\">") - .append((tEndTime - tStartTime) + " ms (" + ta.name + ":" + ta.partition + ")") - .append("</text>\n"); - TaskProfile tp = tpMap.get(ta.taId); - if (tp != null) { - for (int k = 0; k < tp.frameTimes.length; ++k) { - long taOpenTime = tp.openTime - minTime; - buffer.append("<rect x=\"") - .append(taOpenTime * width + leftOffset) - .append("\" y=\"") - .append(y * (HEIGHT + 1) + HEIGHT / 4) - .append("\" width=\"1\" height=\"") - .append(HEIGHT / 2) - .append("\" style=\"fill:rgb(255,0,0);stroke-width:1;stroke:rgb(255,0,0)\"/>\n"); - for (int l = 0; l < tp.frameTimes.length; ++l) { - long ft = tp.frameTimes[l]; - long ftn = l < tp.frameTimes.length - 1 ? tp.frameTimes[l + 1] : ft; - long taNextTime = ft - minTime; - long barWidth = ftn - ft; - buffer.append("<rect x=\"") - .append(taNextTime * width + leftOffset) - .append("\" y=\"") - .append(y * (HEIGHT + 1) + HEIGHT / 4) - .append("\" width=\"") - .append(barWidth == 0 ? 1 : (barWidth * width)) - .append("\" height=\"") - .append(HEIGHT / 2) - .append("\" style=\"fill:rgb(0,255,0);stroke-width:1;stroke:rgb(0,255,0)\"/>\n"); - } - long taCloseTime = tp.closeTime - minTime; - buffer.append("<rect x=\"") - .append(taCloseTime * width + leftOffset) - .append("\" y=\"") - .append(y * (HEIGHT + 1) + HEIGHT / 4) - .append("\" width=\"1\" height=\"") - .append(HEIGHT / 2) - .append("\" style=\"fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,255)\"/>\n"); - } - } - ++y; - } - } - } - buffer.append("<rect x=\"").append(leftOffset).append("\" y=\"").append(0).append("\" width=\"").append(1) - .append("\" height=\"").append((y + 2) * (HEIGHT + 1)).append("\"/>\n"); - buffer.append("<rect x=\"").append(0).append("\" y=\"").append((y + 1) * (HEIGHT + 1)) - .append("\" width=\"").append(xWidth + 2 * leftOffset).append("\" height=\"").append(1) - .append("\"/>\n"); - buffer.append("</svg>"); - Label markup = new Label("job-timeline", - "<svg version=\"1.1\"\nxmlns=\"http://www.w3.org/2000/svg\" width=\"" + (xWidth * 1.5) - + "\" height=\"" + ((y + 2) * (HEIGHT + 1)) + "\">\n" + buffer.toString()); - markup.setEscapeModelStrings(false); - add(markup); - } else { - Label markup = new Label("job-timeline", "No information available yet"); - add(markup); - } - } - - private static class TaskAttempt { - private TaskAttemptId taId; - private long startTime; - private long endTime; - private String name; - private int partition; - - public TaskAttempt(TaskAttemptId taId, long startTime, long endTime) { - this.taId = taId; - this.startTime = startTime; - this.endTime = endTime; - } - } - - private static class TaskClusterAttempt { - private String tcId; - private int attempt; - private long startTime; - private long endTime; - private TaskAttempt[] tasks; - - public TaskClusterAttempt(String tcId, int attempt, long startTime, long endTime) { - this.tcId = tcId; - this.attempt = attempt; - this.startTime = startTime; - this.endTime = endTime; - } - } - - private static class TaskProfile { - private TaskAttemptId taId; - private long openTime; - private long closeTime; - private long[] frameTimes; - private int resolution; - - public TaskProfile(TaskAttemptId taId, long openTime, long closeTime, long[] frameTimes, int resolution) { - this.taId = taId; - this.openTime = openTime; - this.closeTime = closeTime; - this.frameTimes = frameTimes; - this.resolution = resolution; - } - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.java deleted file mode 100644 index e13f5fd..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.java +++ /dev/null @@ -1,28 +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.hyracks.control.cc.adminconsole.pages; - -import org.apache.wicket.request.mapper.parameter.PageParameters; - -public class NodeDetailsPage extends AbstractPage { - private static final long serialVersionUID = 1L; - - public NodeDetailsPage(PageParameters params) throws Exception { - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/WebServer.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/WebServer.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/WebServer.java index f61d7c8..f79a178 100644 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/WebServer.java +++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/WebServer.java @@ -18,27 +18,15 @@ */ package org.apache.hyracks.control.cc.web; -import java.util.EnumSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import javax.servlet.DispatcherType; - import org.apache.hyracks.control.cc.ClusterControllerService; -import org.apache.hyracks.control.cc.adminconsole.HyracksAdminConsoleApplication; import org.apache.hyracks.control.cc.web.util.IJSONOutputFunction; import org.apache.hyracks.control.cc.web.util.JSONOutputRequestHandler; import org.apache.hyracks.http.server.HttpServer; import org.apache.hyracks.http.server.StaticResourceServlet; import org.apache.hyracks.http.server.WebManager; -import org.apache.wicket.Application; -import org.apache.wicket.RuntimeConfigurationType; -import org.apache.wicket.protocol.http.ContextParamWebApplicationFactory; -import org.apache.wicket.protocol.http.WicketFilter; -import org.eclipse.jetty.server.Handler; -import org.eclipse.jetty.servlet.DefaultServlet; -import org.eclipse.jetty.servlet.FilterHolder; -import org.eclipse.jetty.servlet.ServletContextHandler; public class WebServer { private final ClusterControllerService ccs; @@ -50,7 +38,7 @@ public class WebServer { public WebServer(ClusterControllerService ccs, int port) throws Exception { this.ccs = ccs; listeningPort = port; - ctx = new ConcurrentHashMap<String, Object>(); + ctx = new ConcurrentHashMap<>(); webMgr = new WebManager(); server = new HttpServer(webMgr.getBosses(), webMgr.getWorkers(), listeningPort); addHandlers(); @@ -61,7 +49,6 @@ public class WebServer { addJSONHandler("/rest/jobs/*", new JobsRESTAPIFunction(ccs)); addJSONHandler("/rest/nodes/*", new NodesRESTAPIFunction(ccs)); addJSONHandler("/rest/statedump", new StateDumpRESTAPIFunction(ccs)); - // TODO(tillw) addHandler(createAdminConsoleHandler()); server.addServlet(new StaticResourceServlet(ctx, new String[] { "/static/*" })); server.addServlet(new ApplicationInstallationHandler(ctx, new String[] { "/applications/*" }, ccs)); } @@ -70,21 +57,6 @@ public class WebServer { server.addServlet(new JSONOutputRequestHandler(ctx, new String[] { path }, fn)); } - private Handler createAdminConsoleHandler() { - FilterHolder filter = new FilterHolder(WicketFilter.class); - filter.setInitParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM, - HyracksAdminConsoleApplication.class.getName()); - filter.setInitParameter(WicketFilter.FILTER_MAPPING_PARAM, "/*"); - filter.setInitParameter(Application.CONFIGURATION, RuntimeConfigurationType.DEPLOYMENT.toString()); - - ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.SESSIONS); - handler.setContextPath("/adminconsole"); - handler.setAttribute(ClusterControllerService.class.getName(), ccs); - handler.addFilter(filter, "/*", EnumSet.of(DispatcherType.REQUEST, DispatcherType.ERROR)); - handler.addServlet(DefaultServlet.class, "/"); - return handler; - } - public int getListeningPort() { return listeningPort; } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/RoutingHandler.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/RoutingHandler.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/RoutingHandler.java deleted file mode 100644 index 55fda84..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/util/RoutingHandler.java +++ /dev/null @@ -1,69 +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.hyracks.control.cc.web.util; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.eclipse.jetty.server.Handler; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; - -public class RoutingHandler extends AbstractHandler { - private final Map<String, Handler> handlers; - - public RoutingHandler() { - handlers = new HashMap<String, Handler>(); - } - - public synchronized void addHandler(String route, Handler handler) { - handlers.put(route, handler); - } - - public synchronized void removeHandler(String route) { - handlers.remove(route); - } - - @Override - public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - while (target.startsWith("/")) { - target = target.substring(1); - } - int idx = target.indexOf('/'); - String path0 = target; - String rest = ""; - if (idx >= 0) { - path0 = target.substring(0, idx); - rest = target.substring(idx); - } - Handler h; - synchronized (this) { - h = handlers.get(path0); - } - if (h != null) { - h.handle(rest, baseRequest, request, response); - } - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.html ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.html b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.html deleted file mode 100644 index e0f60b2..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/AbstractPage.html +++ /dev/null @@ -1,38 +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. - !--> - -<html> -<head> - <script type="text/javascript" src="/static/javascript/jquery/jquery.min.js"></script> - <script type="text/javascript" src="/static/javascript/jquery/plugins/jquery.timer.js"></script> - <script type="text/javascript" src="/static/javascript/jquery/plugins/jquery.getParams.js"></script> - <script type="text/javascript" src="/static/javascript/jquery/plugins/jquery-ui.min.js"></script> - <script type="text/javascript" src="/static/javascript/flot/jquery.flot.min.js"></script> - <script type="text/javascript" src="/static/javascript/flot/jquery.flot.resize.min.js"></script> - <script type="text/javascript" src="/static/javascript/jsplumb/jquery.jsPlumb-1.3.5-all-min.js"></script> - <link rel="stylesheet" type="text/css" href="/static/stylesheet/jquery-ui/themes/base/jquery-ui.css"></link> - <link rel="stylesheet" type="text/css" href="/static/stylesheet/adminconsole.css"></link> - <link rel="stylesheet" type="text/css" href="/static/stylesheet/json.human.css"></link> -</head> -<body> - <div id="header"> - </div> - <wicket:child xmlns:wicket/> -</body> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html deleted file mode 100644 index bbb22b7..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html +++ /dev/null @@ -1,76 +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. - !--> - -<wicket:extend xmlns:wicket> - <div> - <b>Registered Node Count:</b> <span wicket:id="node-count"></span> - </div> - <table> - <tr> - <th>Node ID</th> - <th>Heap Used</th> - <th>System Load Average</th> - <th>Node Details</th> - </tr> - <tr wicket:id="node-list"> - <td> - <span wicket:id="node-id"></span> - </td> - <td> - <span wicket:id="heap-used"></span> - </td> - <td> - <span wicket:id="system-load-average"></span> - </td> - <td> - <a wicket:id="node-details">Details</a> - </td> - </tr> - </table> - <table> - <tr> - <th>JOB ID</th> - <th>Status</th> - <th>Create Time</th> - <th>Start Time</th> - <th>End Time</th> - <th>Job Details</th> - </tr> - <tr wicket:id="jobs-list"> - <td> - <span wicket:id="job-id"></span> - </td> - <td> - <span wicket:id="status"></span> - </td> - <td> - <span wicket:id="create-time"></span> - </td> - <td> - <span wicket:id="start-time"></span> - </td> - <td> - <span wicket:id="end-time"></span> - </td> - <td> - <a wicket:id="job-details">Details</a> - </td> - </tr> - </table> -</wicket:extend> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.html ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.html b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.html deleted file mode 100644 index 468d937..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/JobDetailsPage.html +++ /dev/null @@ -1,84 +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. - !--> - -<wicket:extend xmlns:wicket> - <div id="tabs"> - <ul> - <li><a href="#tabs-1">Activity Cluster Graph</a></li> - <li><a href="#tabs-2">Job Run</a></li> - <li><a href="#tabs-3">Job Timeline</a></li> - </ul> - - <div id="tabs-1"> - <table> - <tr> - <td> - <div> - <div id="activityclustergraph" wicket:id="activity-cluster-graph" style="display: none;"></div> - <div id="activityclustergraphpre"></div> - </div> - </td> - </tr> - </table> - </div> - - <div id="tabs-2"> - <table> - <tr> - <td> - <div> - <div id="jobrun" wicket:id="job-run" style="display: none;"></div> - <div id="jobrunpre"></div> - </div> - </td> - </tr> - </table> - </div> - - <div id="tabs-3"> - <table> - <tr> - <td> - <div wicket:id="job-timeline" style="overflow: auto;"></div> - </td> - </tr> - </table> - </div> - </div> - - <script src="/static/javascript/adminconsole/json.human.js" type="text/javascript"></script> - - <script> - var jobRun = JsonHuman.format(jQuery.parseJSON($('#jobrun')[0].innerHTML)); - $('#jobrunpre').append(jobRun); - - var activityGraph = JsonHuman.format(jQuery.parseJSON($('#activityclustergraph')[0].innerHTML)); - $('#activityclustergraphpre').append(activityGraph); - - if ($('#jobrun')[0].innerHTML == '{}') { - $('#jobrunpre')[0].innerHTML = "<b>Job is too old so it was cleared</b>"; - } - if ($('#activityclustergraph')[0].innerHTML == '{}') { - $('#activityclustergraphpre')[0].innerHTML = "<b>Job is too old so it was cleared</b>"; - } - </script> - - <script src="/static/javascript/adminconsole/Graphs.js" type="text/javascript"></script> - <script src="/static/javascript/adminconsole/JobDetailsPage.js" type="text/javascript"></script> -</wicket:extend> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.html ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.html b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.html deleted file mode 100644 index dc24ef9..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/NodeDetailsPage.html +++ /dev/null @@ -1,87 +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. - !--> - -<wicket:extend xmlns:wicket> - <div id="tabs"> - <ul> - <li><a href="#tabs-1">Node Information</a></li> - <li><a href="#tabs-2">System Load</a></li> - <li><a href="#tabs-3">Garbage Collection</a></li> - <li><a href="#tabs-4">Memory Usage</a></li> - <li><a href="#tabs-5">Thread Statistics</a></li> - <li><a href="#tabs-6">Network Statistics</a></li> - <li><a href="#tabs-7">IPC Statistics</a></li> - </ul> - - <div id="tabs-1"> - <table border="0"> - <tr><td>Node Id</td><td><span id="node-id"></span></td></tr> - <tr><td>Architecture</td><td><span id="arch"></span></td></tr> - <tr><td>OS Name</td><td><span id="os-name"></span></td></tr> - <tr><td>OS Version</td><td><span id="os-version"></span></td></tr> - <tr><td># of processors</td><td><span id="num-processors"></span></td></tr> - <tr><td>Java VM Name</td><td><span id="vm-name"></span></td></tr> - <tr><td>Java VM Version</td><td><span id="vm-version"></span></td></tr> - <tr><td>Java VM Vendor</td><td><span id="vm-vendor"></span></td></tr> - <tr><td>Java Classpath</td><td><span id="classpath"></span></td></tr> - <tr><td>Java Library Path</td><td><span id="library-path"></span></td></tr> - <tr><td>Java Boot Classpath</td><td><span id="boot-classpath"></span></td></tr> - <tr><td>Java VM Arguments</td><td><div id="input-arguments"></div></td></tr> - </table> - </div> - - <div id="tabs-2"> - <div id='system-load-chart' class="time-chart"> - </div> - </div> - - <div id="tabs-3"> - <div id='gc-charts'> - </div> - </div> - - <div id="tabs-4"> - <div id='heap-usage-chart' class="time-chart"> - </div> - <div id='nonheap-usage-chart' class="time-chart"> - </div> - </div> - - <div id="tabs-5"> - <div id='thread-chart' class="time-chart"> - </div> - </div> - - <div id="tabs-6"> - <div id='net-payload-bandwidth' class="time-chart"> - </div> - <div id='net-signaling-bandwidth' class="time-chart"> - </div> - </div> - - <div id="tabs-7"> - <div id='ipc-messages' class="time-chart"> - </div> - <div id='ipc-message-bytes' class="time-chart"> - </div> - </div> - </div> - - <script src="/static/javascript/adminconsole/NodeDetailsPage.js" type="text/javascript"></script> -</wicket:extend> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/file.txt ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/file.txt b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/file.txt new file mode 100644 index 0000000..60b675e --- /dev/null +++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/file.txt @@ -0,0 +1,16 @@ +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. http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/Graphs.js ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/Graphs.js b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/Graphs.js deleted file mode 100644 index 1495a17..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/Graphs.js +++ /dev/null @@ -1,179 +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. - */ - -Graphs = {}; - -Graphs.DAG = function() { - this.nodeMap = {}; - this.edgeMap = {}; -} - -Graphs.DAG.prototype.addNode = function(key, attachment) { - var node = new Graphs.Node(this, key, attachment); - this.nodeMap[key] = node; - return node; -} - -Graphs.DAG.prototype.addEdge = function(key, attachment, sNode, sIndex, tNode, tIndex) { - var edge = new Graphs.DirectedEdge(this, key, attachment, sNode, sIndex, tNode, tIndex); - this.edgeMap[key] = edge; - sNode.outEdges[sIndex] = edge; - tNode.inEdges[tIndex] = edge; - return edge; -} - -Graphs.DAG.prototype.lookupNode = function(key) { - return this.nodeMap[key]; -} - -Graphs.DAG.prototype.lookupEdge = function(key) { - return this.edgeMap[key]; -} - -Graphs.DAG.prototype.walkNodes = function(callback) { - for ( var nKey in this.nodeMap) { - callback(this.nodeMap[nKey]); - } -} - -Graphs.DAG.prototype.walkEdges = function(callback) { - for ( var eKey in this.edgeMap) { - callback(this.edgeMap[eKey]); - } -} - -Graphs.DAG.prototype.findRoots = function() { - var roots = []; - var callback = function(node) { - if (node.inEdges.length == 0) { - roots.push(node); - } - } - this.walkNodes(callback); - return roots; -} - -Graphs.DAG.prototype.findLeaves = function() { - var leaves = []; - var callback = function(node) { - if (node.outEdges.length == 0) { - leaves.push(node); - } - } - this.walkNodes(callback); - return leaves; -} - -Graphs.DAG.prototype.tsort = function() { - var sortedNodes = []; - var nodeState = {}; - - function visit(node) { - if (!nodeState[node.key]) { - nodeState[node.key] = true; - for ( var i = 0; i < node.inEdges.length; ++i) { - visit(node.inEdges[i].sNode); - } - sortedNodes.push(node); - } - } - - var roots = this.findLeaves(); - for ( var i = 0; i < roots.length; ++i) { - visit(roots[i]); - } - return sortedNodes; -} - -Graphs.DAG.prototype.stratify = function() { - var sortedNodes = this.tsort(); - var stratumMap = {}; - var strata = []; - for ( var i = 0; i < sortedNodes.length; ++i) { - var node = sortedNodes[i]; - var maxParentStratum = -1; - for ( var j = 0; j < node.inEdges.length; ++j) { - var edge = node.inEdges[j]; - maxParentStratum = Math.max(maxParentStratum, stratumMap[edge.sNode.key]); - } - var stratum = maxParentStratum + 1; - stratumMap[node.key] = stratum; - var stratumList = strata[stratum]; - if (!stratumList) { - stratumList = []; - strata[stratum] = stratumList; - } - stratumList.push(node); - } - return strata; -} - -Graphs.Node = function(dag, key, attachment) { - this.dag = dag; - this.key = key; - this.attachment = attachment; - this.inEdges = []; - this.outEdges = []; -} - -Graphs.DirectedEdge = function(dag, key, attachment, sNode, sIndex, tNode, tIndex) { - this.dag = dag; - this.key = key; - this.attachment = attachment; - this.sNode = sNode; - this.sIndex = sIndex; - this.tNode = tNode; - this.tIndex = tIndex; -} - -Graphs.JsPlumbRenderer = function(dag, element, options) { - this.dag = dag; - this.element = element; - this.options = options || { - levelStep : 100 - }; -} - -Graphs.JsPlumbRenderer.prototype.configureDiv = function(div, node, stratum, inStratumIndex, stratumWidth) { - div.id = node.key; - div.dagNode = node; - /* - * div.style.position = 'absolute'; div.style.left = (stratum * - * this.options.levelStep) + 'px'; div.style.top = (inStratumIndex * 100) + - * 'px'; div.style.width = '50px'; div.style.height = '50px'; - * div.style.border = 'thick solid #000000'; - */ -} - -Graphs.JsPlumbRenderer.prototype.refresh = function() { - var strata = this.dag.stratify(); - - while (this.element.hasChildNodes()) { - this.element.removeChild(this.element.lastChild); - } - for ( var i = 0; i < strata.length; ++i) { - var stratumList = strata[i]; - for ( var j = 0; j < stratumList.length; ++j) { - var node = stratumList[j]; - var div = document.createElement('div'); - this.configureDiv(div, node, i, j, stratumList.length); - this.element.appendChild(div); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/JobDetailsPage.js ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/JobDetailsPage.js b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/JobDetailsPage.js deleted file mode 100644 index 89f6032..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/JobDetailsPage.js +++ /dev/null @@ -1,105 +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. - */ - $(function() { - $('#tabs').tabs(); - - var jobSpecDAG = new Graphs.DAG(); - var jobSpecRenderer; - - function drawJobGraph() { - var jobGraphDiv = $('#job-graph')[0]; - jobSpecRenderer = new Graphs.JsPlumbRenderer(jobSpecDAG, jobGraphDiv, null); - jobSpecRenderer.refresh(); - } - - function onJobRunDataReceived(data) { - var run = data.result; - - if (run.status != 'TERMINATED' && run.status != 'FAILURE') { - setTimeout(fetchJobRun, 10000); - } - } - - function fetchJobRun() { - $.ajax({ - url : '/rest/jobs/' + $.getURLParam('job-id') + '/job-run', - method : 'GET', - dataType : 'json', - success : onJobRunDataReceived - }); - } - - function onJobActivityGraphDataReceived(data) { - var jag = data.result; - activityMap = new Object; - var activities = jag.activities; - for ( var i = 0; i < activities.length; ++i) { - var activity = activities[i]; - } - - drawJobGraph(); - - fetchJobRun(); - } - - function fetchJobActivityGraph() { - $.ajax({ - url : '/rest/jobs/' + $.getURLParam('job-id') + '/job-activity-graph', - method : 'GET', - dataType : 'json', - success : onJobActivityGraphDataReceived - }); - } - - function onJobSpecificationDataReceived(data) { - var jobSpec = data.result; - var operators = jobSpec.operators; - for ( var i = 0; i < operators.length; ++i) { - var op = operators[i]; - jobSpecDAG.addNode(op.id, op); - } - var connectors = jobSpec.connectors; - for ( var i = 0; i < connectors.length; ++i) { - var conn = connectors[i]; - var sNode = jobSpecDAG.lookupNode(conn['in-operator-id']); - var sIndex = conn['in-operator-port']; - var tNode = jobSpecDAG.lookupNode(conn['out-operator-id']); - var tIndex = conn['out-operator-port']; - jobSpecDAG.addEdge(conn.id, conn, sNode, sIndex, tNode, tIndex); - } - fetchJobActivityGraph(); - } - - function fetchJobSpecification() { - $.ajax({ - url : '/rest/jobs/' + $.getURLParam('job-id') + '/job-specification', - method : 'GET', - dataType : 'json', - success : onJobSpecificationDataReceived - }); - } - - function init() { - fetchJobActivityGraph(); - } - - jsPlumb.bind("ready", function() { - init(); - }); -}); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/68e290a4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js deleted file mode 100644 index 10027f4..0000000 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js +++ /dev/null @@ -1,261 +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. - */ -$(function() { - $('#tabs').tabs(); - - var options = { - lines : { - show : true, - fill : true - }, - points : { - show : false - }, - xaxis : { - tickDecimals : 0, - tickSize : 0 - } - }; - - function computeRate(array, rrdPtr) { - return (array[(rrdPtr + 1) % array.length] - array[rrdPtr]) / 10; - } - - function formatArray(array) { - var result = ""; - for (var i = 0; i < array.length; ++i) { - if (result !== "") { - result += "<br/>"; - } - result += "<span>" + array[i] + "</span>"; - } - return result; - } - - function onDataReceived(data) { - var result = data.result; - $('#node-id')[0].innerHTML = result['node-id']; - $('#arch')[0].innerHTML = result['arch']; - $('#os-name')[0].innerHTML = result['os-name']; - $('#os-version')[0].innerHTML = result['os-version']; - $('#num-processors')[0].innerHTML = result['num-processors']; - $('#vm-name')[0].innerHTML = result['vm-name']; - $('#vm-version')[0].innerHTML = result['vm-version']; - $('#vm-vendor')[0].innerHTML = result['vm-vendor']; - $('#classpath')[0].innerHTML = formatArray(result['classpath']); - $('#library-path')[0].innerHTML = formatArray(result['library-path']); - $('#boot-classpath')[0].innerHTML = formatArray(result['boot-classpath']); - $('#input-arguments')[0].innerHTML = formatArray(result['input-arguments']); - var sysLoad = result['system-load-averages']; - var heapUsageInitSizes = result['heap-init-sizes']; - var heapUsageUsedSizes = result['heap-used-sizes']; - var heapUsageCommittedSizes = result['heap-committed-sizes']; - var heapUsageMaxSizes = result['heap-max-sizes']; - var nonheapUsageInitSizes = result['nonheap-init-sizes']; - var nonheapUsageUsedSizes = result['nonheap-used-sizes']; - var nonheapUsageCommittedSizes = result['nonheap-committed-sizes']; - var nonheapUsageMaxSizes = result['nonheap-max-sizes']; - var threadCounts = result['thread-counts']; - var peakThreadCounts = result['peak-thread-counts']; - var gcCollectionCounts = result['gc-collection-counts']; - var gcCollectionTimes = result['gc-collection-times']; - var netPayloadBytesRead = result['net-payload-bytes-read']; - var netPayloadBytesWritten = result['net-payload-bytes-written']; - var netSignalingBytesRead = result['net-signaling-bytes-read']; - var netSignalingBytesWritten = result['net-signaling-bytes-written']; - var datasetNetPayloadBytesRead = result['dataset-net-payload-bytes-read']; - var datasetNetPayloadBytesWritten = result['dataset-net-payload-bytes-written']; - var datasetNetSignalingBytesRead = result['dataset-net-signaling-bytes-read']; - var datasetNetSignalingBytesWritten = result['dataset-net-signaling-bytes-written']; - var ipcMessagesSent = result['ipc-messages-sent']; - var ipcMessageBytesSent = result['ipc-message-bytes-sent']; - var ipcMessagesReceived = result['ipc-messages-received']; - var ipcMessageBytesReceived = result['ipc-message-bytes-received']; - - var sysLoadArray = []; - var heapUsageInitSizesArray = []; - var heapUsageUsedSizesArray = []; - var heapUsageCommittedSizesArray = []; - var heapUsageMaxSizesArray = []; - var nonheapUsageInitSizesArray = []; - var nonheapUsageUsedSizesArray = []; - var nonheapUsageCommittedSizesArray = []; - var nonheapUsageMaxSizesArray = []; - var threadCountsArray = []; - var peakThreadCountsArray = []; - var gcCollectionCountsArray = []; - var gcCollectionTimesArray = []; - var netPayloadReadBWArray = []; - var netPayloadWriteBWArray = []; - var netSignalingReadBWArray = []; - var netSignalingWriteBWArray = []; - var ipcMessageSendRateArray = []; - var ipcMessageBytesSendRateArray = []; - var ipcMessageReceiveRateArray = []; - var ipcMessageBytesReceiveRateArray = []; - var gcChartsDiv = document.getElementById('gc-charts'); - for ( var i = 0; i < gcCollectionCounts.length; ++i) { - gcCollectionCountsArray.push([]); - gcCollectionTimesArray.push([]); - var gcCollectionCountDiv = document.createElement('div'); - gcCollectionCountDiv.id = 'gc-collection-count-' + i; - gcCollectionCountDiv.style = "jqplot-target time-chart"; - gcChartsDiv.appendChild(gcCollectionCountDiv); - var gcCollectionTimeDiv = document.createElement('div'); - gcCollectionTimeDiv.id = 'gc-collection-time-' + i; - gcChartsDiv.appendChild(gcCollectionTimeDiv); - } - var rrdPtr = result['rrd-ptr']; - for ( var i = 0; i < sysLoad.length; ++i) { - sysLoadArray.push([ i, sysLoad[rrdPtr] ]); - heapUsageInitSizesArray.push([ i, heapUsageInitSizes[rrdPtr] / (1024 * 1024) ]); - heapUsageUsedSizesArray.push([ i, heapUsageUsedSizes[rrdPtr] / (1024 * 1024) ]); - heapUsageCommittedSizesArray.push([ i, heapUsageCommittedSizes[rrdPtr] / (1024 * 1024) ]); - heapUsageMaxSizesArray.push([ i, heapUsageMaxSizes[rrdPtr] / (1024 * 1024) ]); - nonheapUsageInitSizesArray.push([ i, nonheapUsageInitSizes[rrdPtr] / (1024 * 1024) ]); - nonheapUsageUsedSizesArray.push([ i, nonheapUsageUsedSizes[rrdPtr] / (1024 * 1024) ]); - nonheapUsageCommittedSizesArray.push([ i, nonheapUsageCommittedSizes[rrdPtr] / (1024 * 1024) ]); - nonheapUsageMaxSizesArray.push([ i, nonheapUsageMaxSizes[rrdPtr] / (1024 * 1024) ]); - threadCountsArray.push([ i, threadCounts[rrdPtr] ]); - peakThreadCountsArray.push([ i, peakThreadCounts[rrdPtr] ]); - for ( var j = 0; j < gcCollectionCounts.length; ++j) { - gcCollectionCountsArray[j].push([ i, gcCollectionCounts[j][rrdPtr] ]); - } - for ( var j = 0; j < gcCollectionTimes.length; ++j) { - gcCollectionTimesArray[j].push([ i, gcCollectionTimes[j][rrdPtr] ]); - } - if (i < sysLoad.length - 1) { - netPayloadReadBWArray.push([ i, computeRate(netPayloadBytesRead, rrdPtr) ]); - netPayloadReadBWArray.push([ i, computeRate(datasetNetPayloadBytesRead, rrdPtr) ]); - netPayloadWriteBWArray.push([ i, computeRate(netPayloadBytesWritten, rrdPtr) ]); - netPayloadWriteBWArray.push([ i, computeRate(datasetNetPayloadBytesWritten, rrdPtr) ]); - netSignalingReadBWArray.push([ i, computeRate(netSignalingBytesRead, rrdPtr) ]); - netSignalingReadBWArray.push([ i, computeRate(datasetNetSignalingBytesRead, rrdPtr) ]); - netSignalingWriteBWArray.push([ i, computeRate(netSignalingBytesWritten, rrdPtr) ]); - netSignalingWriteBWArray.push([ i, computeRate(netSignalingBytesWritten, rrdPtr) ]); - ipcMessageSendRateArray.push([ i, computeRate(ipcMessagesSent, rrdPtr) ]); - ipcMessageBytesSendRateArray.push([ i, computeRate(ipcMessageBytesSent, rrdPtr) ]); - ipcMessageReceiveRateArray.push([ i, computeRate(ipcMessagesReceived, rrdPtr) ]); - ipcMessageBytesReceiveRateArray.push([ i, computeRate(ipcMessageBytesReceived, rrdPtr) ]); - } - rrdPtr = (rrdPtr + 1) % sysLoad.length; - } - - $.plot($('#system-load-chart'), [ { - label : 'System Load', - data : sysLoadArray - } ], options); - - var gcNames = result['gc-names']; - for ( var i = 0; i < gcCollectionCounts.length; ++i) { - $('#gc-collection-count-' + i).addClass("time-chart"); - $.plot($('#gc-collection-count-' + i), [ { - label : gcNames[i] + ' Collection Count', - data : gcCollectionCountsArray[i] - } ], options); - - $('#gc-collection-time-' + i).addClass("time-chart"); - $.plot($('#gc-collection-time-' + i), [ { - label : gcNames[i] + ' Collection Time (ms)', - data : gcCollectionTimesArray[i] - } ], options); - } - - $.plot($('#heap-usage-chart'), [ { - label : 'Heap Usage Initial Size (MB)', - data : heapUsageInitSizesArray - }, { - label : 'Heap Usage Used Size (MB)', - data : heapUsageUsedSizesArray - }, { - label : 'Heap Usage Committed Size (MB)', - data : heapUsageCommittedSizesArray - }, { - label : 'Heap Usage Max Size (MB)', - data : heapUsageMaxSizesArray - } ], options); - - $.plot($('#nonheap-usage-chart'), [ { - label : 'Non-Heap Usage Initial Size (MB)', - data : nonheapUsageInitSizesArray - }, { - label : 'Non-Heap Usage Used Size (MB)', - data : nonheapUsageUsedSizesArray - }, { - label : 'Non-Heap Usage Committed Size (MB)', - data : nonheapUsageCommittedSizesArray - }, { - label : 'Non-Heap Usage Max Size (MB)', - data : nonheapUsageMaxSizesArray - } ], options); - - $.plot($('#thread-chart'), [ { - label : 'Thread Count', - data : threadCountsArray - }, { - label : 'Peak Thread Count', - data : peakThreadCountsArray - } ], options); - - $.plot($('#net-payload-bandwidth'), [ { - label : 'Payload Read Bandwidth (bytes/sec)', - data : netPayloadReadBWArray - }, { - label : 'Payload Write Bandwidth (bytes/sec)', - data : netPayloadWriteBWArray - } ], options); - - $.plot($('#net-signaling-bandwidth'), [ { - label : 'Signaling Read Bandwidth (bytes/sec)', - data : netSignalingReadBWArray - }, { - label : 'Signaling Write Bandwidth (bytes/sec)', - data : netSignalingWriteBWArray - } ], options); - - $.plot($('#ipc-messages'), [ { - label : 'IPC Messages Send Rate (messages/sec)', - data : ipcMessageSendRateArray - }, { - label : 'IPC Messages Receive Rate (messages/sec)', - data : ipcMessageReceiveRateArray - } ], options); - - $.plot($('#ipc-message-bytes'), [ { - label : 'IPC Message Send Bandwidth (bytes/sec)', - data : ipcMessageBytesSendRateArray - }, { - label : 'IPC Message Receive Bandwidth (bytes/sec)', - data : ipcMessageBytesReceiveRateArray - } ], options); - } - - function fetchData() { - $.ajax({ - url : '/rest/nodes/' + $.getURLParam('node-id'), - method : 'GET', - dataType : 'json', - success : onDataReceived - }); - - setTimeout(fetchData, 10000); - } - - fetchData(); -});
