Repository: incubator-blur Updated Branches: refs/heads/master 7f24a6fb6 -> 0c04e4e6a
Removing some servlets that are no longer used. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/4fafd59b Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/4fafd59b Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/4fafd59b Branch: refs/heads/master Commit: 4fafd59b2f6489bb77de1ec9b06c437d5531b67b Parents: 7f24a6f Author: Aaron McCurry <[email protected]> Authored: Sun Feb 1 19:11:34 2015 -0500 Committer: Aaron McCurry <[email protected]> Committed: Sun Feb 1 19:11:34 2015 -0500 ---------------------------------------------------------------------- .../blur/thrift/ThriftBlurControllerServer.java | 2 - .../blur/thrift/ThriftBlurShardServer.java | 2 - .../apache/blur/gui/JSONReporterServlet.java | 40 ------------- .../org/apache/blur/gui/LiveMetricsServlet.java | 60 -------------------- 4 files changed, 104 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4fafd59b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java ---------------------------------------------------------------------- diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java index 538316a..276f2b8 100644 --- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java +++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java @@ -56,7 +56,6 @@ import org.apache.blur.command.ControllerCommandManager; import org.apache.blur.concurrent.SimpleUncaughtExceptionHandler; import org.apache.blur.concurrent.ThreadWatcher; import org.apache.blur.gui.HttpJettyServer; -import org.apache.blur.gui.JSONReporterServlet; import org.apache.blur.log.Log; import org.apache.blur.log.LogFactory; import org.apache.blur.manager.BlurQueryChecker; @@ -225,7 +224,6 @@ public class ThriftBlurControllerServer extends ThriftServer { WebAppContext context = httpServer.getContext(); context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface), new TJSONProtocol.Factory())), "/blur"); - context.addServlet(new ServletHolder(new JSONReporterServlet()), "/livemetrics"); } // This will shutdown the server when the correct path is set in zk http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4fafd59b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java ---------------------------------------------------------------------- diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java index eb6be75..93bbcd5 100644 --- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java +++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java @@ -69,7 +69,6 @@ import org.apache.blur.command.ShardCommandManager; import org.apache.blur.concurrent.SimpleUncaughtExceptionHandler; import org.apache.blur.concurrent.ThreadWatcher; import org.apache.blur.gui.HttpJettyServer; -import org.apache.blur.gui.JSONReporterServlet; import org.apache.blur.log.Log; import org.apache.blur.log.LogFactory; import org.apache.blur.lucene.search.DeepPagingCache; @@ -288,7 +287,6 @@ public class ThriftBlurShardServer extends ThriftServer { WebAppContext context = httpServer.getContext(); context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface), new TJSONProtocol.Factory())), "/blur"); - context.addServlet(new ServletHolder(new JSONReporterServlet()), "/livemetrics"); if (enableJsonReporter) { JSONReporter.enable("json-reporter", 1, TimeUnit.SECONDS, 60); } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4fafd59b/blur-status/src/main/java/org/apache/blur/gui/JSONReporterServlet.java ---------------------------------------------------------------------- diff --git a/blur-status/src/main/java/org/apache/blur/gui/JSONReporterServlet.java b/blur-status/src/main/java/org/apache/blur/gui/JSONReporterServlet.java deleted file mode 100644 index 60b8e9b..0000000 --- a/blur-status/src/main/java/org/apache/blur/gui/JSONReporterServlet.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.apache.blur.gui; - -/** - * 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. - */ -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.blur.metrics.JSONReporter; - -public class JSONReporterServlet extends HttpServlet { - private static final long serialVersionUID = -3086441832701983642L; - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException { - response.setContentType("application/json"); - PrintWriter writer = response.getWriter(); - JSONReporter.writeJSONData(writer); - writer.flush(); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4fafd59b/blur-status/src/main/java/org/apache/blur/gui/LiveMetricsServlet.java ---------------------------------------------------------------------- diff --git a/blur-status/src/main/java/org/apache/blur/gui/LiveMetricsServlet.java b/blur-status/src/main/java/org/apache/blur/gui/LiveMetricsServlet.java deleted file mode 100644 index c91fbad..0000000 --- a/blur-status/src/main/java/org/apache/blur/gui/LiveMetricsServlet.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.apache.blur.gui; - -/** - * 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. - */ -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - - -public class LiveMetricsServlet extends HttpServlet { - - private static final long serialVersionUID = 1L; - - - public LiveMetricsServlet() {} - - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - /* - * The live metrics page is currently not being used - */ - - /* - response.setContentType("application/json"); - PrintWriter out = response.getWriter(); - out.write("{"); - out.write("\"jvm\":{\"xLabel\":\"Time\",\"yLabel\":\"Heap (GB)\",\"lines\":"); - heapMetrics.writeJson(out); - out.write("}"); - out.write(",\"blur_calls\":{\"xLabel\":\"Time\",\"yLabel\":\"Rates\",\"lines\":"); - queryMetrics.writeGraph1Json(out); - out.write("}"); - out.write(",\"blur_recordRates\":{\"xLabel\":\"Time\",\"yLabel\":\"Rates\",\"lines\":"); - queryMetrics.writeGraph2Json(out); - out.write("}"); - out.write(",\"system\":{\"xLabel\":\"Time\",\"yLabel\":\"Load\",\"lines\":"); - systemLoadMetrics.writeJson(out); - out.write("}"); - out.write("}"); - */ - } - -}
