Browse files

FLUME-227: Web pages should show flume version / hash

  • Loading branch information...
1 parent 0af297f commit 8a82185c3c9548c494dfd0531a940fee7fa65b69 @jmhsieh jmhsieh committed Oct 2, 2010
View
21 DEVNOTES
@@ -138,9 +138,24 @@ debugging process.
Here are some tips for getting the web apps for Flume Master or Flume
Node running from inside eclipse.
-* Make sure `tools.jar` is in your java classpath. This allows the compiler to be present.
-* Ant is used to compile jsps. Make sure some version of ant-launcher.jar and ant-1.x.x.jar is in your build path. (if you are in eclipse for example)
-* The default is to point to a the web app at a precompiled version of of the servlets. There is a hook in flume-site.xml to point the jetty at a directory full of jsps. It assumes that hte flume directory is the base for relative paths or can use a fully qualified path
+* Make sure `tools.jar` is in your java classpath. If JAVA_HOME is
+ set to a JDK JVM path (as opposed to a JRE) this jar should be
+ included. This jar includes the java compiler which is required to
+ enable the compilation of jsp's so they can be served on the fly.
+* Ant is used to compile jsps. Make sure some version of
+ ant-launcher.jar and ant-1.x.x.jar is in your build path. (if you
+ are in eclipse for example). These files live in ./libbuild
+* The default is to point to a the web app at a precompiled version of
+ of the servlets. There is a hook in flume-site.xml to point the
+ jetty at a directory full of jsps. It assumes that hte flume
+ directory is the base for relative paths or can use a fully
+ qualified path
+
+Environment variables can be set in the +bin/flume-env.sh+ script.
+----
+# bin/flume-env.sh for Ubuntu installs
+export JAVA_HOME=/usr/lib/jvm/java-6-sun
+----
Alternately, instead of using symlnks, one can set the following
property in the system's flume-site.conf file, like below.
View
11 src/webapps/flumeagent/environment.jsp
@@ -18,22 +18,29 @@
<html><head>
<!-- Copyright (c) 2010 Cloudera, Inc. All rights reserved. -->
<!-- Retro web 1.0 flume Agent configuration display -->
-<title>Flume Node: Environment</title>
<%@ page
contentType="text/html; charset=UTF-8"
import="javax.servlet.*"
import="javax.servlet.http.*"
import="java.io.*"
import="java.util.*"
import="java.text.DecimalFormat"
+ import="com.cloudera.flume.agent.FlumeNode"
%>
+<title>Flume Node: <%=FlumeNode.getInstance().getPhysicalNodeName()%> :: Environment</title>
+
<link rel="stylesheet" type="text/css" href="/flume.css" />
</head>
<body>
<jsp:include page="menu_agent.jsp" />
-<h1>Environment</h1>
+<h1>Flume Node: <%= FlumeNode.getInstance().getPhysicalNodeName()%> : Environment</h1>
+
+<jsp:include page="version.jsp" />
+<hr>
+
+
<table>
View
10 src/webapps/flumeagent/extension.jsp
@@ -18,7 +18,6 @@
<html><head>
<!-- Copyright (c) 2010 Cloudera, Inc. All rights reserved. -->
<!-- Retro web 1.0 flume Agent configuration display -->
-<title>Flume Node: Sources and Sinks</title>
<%@ page
contentType="text/html; charset=UTF-8"
import="javax.servlet.*"
@@ -27,14 +26,21 @@
import="java.util.*"
import="java.text.DecimalFormat"
import="com.cloudera.flume.conf.FlumeBuilder"
+ import="com.cloudera.flume.agent.FlumeNode"
%>
+<title>Flume Node: <%= FlumeNode.getInstance().getPhysicalNodeName()%> :: Sources and Sinks</title>
+
<link rel="stylesheet" type="text/css" href="/flume.css" />
</head>
<body>
<jsp:include page="menu_agent.jsp" />
-<h1>Extensions - Sink/Source/Decorator</h1>
+<h1>Flume Node: <%=FlumeNode.getInstance().getPhysicalNodeName()%> :: Extensions - Sink/Source/Decorator</h1>
+
+<jsp:include page="version.jsp" />
+<hr>
+
<div id="sinks">
<h2>Sinks</h2>
View
18 src/webapps/flumeagent/flumeagent.jsp
@@ -18,36 +18,26 @@
<html><head>
<!-- Copyright (c) 2010 Cloudera, Inc. All rights reserved. -->
<!-- Retro web 1.0 flume Agent configuration display -->
-<title>Flume Node</title>
<%@ page
contentType="text/html; charset=UTF-8"
import="javax.servlet.*"
import="javax.servlet.http.*"
import="java.io.*"
import="java.util.*"
import="java.text.DecimalFormat"
- import="com.cloudera.flume.VersionInfo"
import="com.cloudera.flume.agent.FlumeNode"
%>
+<title>Flume Node: <%= FlumeNode.getInstance().getPhysicalNodeName()%></title>
<link rel="stylesheet" type="text/css" href="/flume.css" />
</head>
<body>
<jsp:include page="menu_agent.jsp" />
-<h1> Flume Agent </h1>
-
-<%--
-<b>Started:</b> <%= new Date(tracker.getStartTime())%><br>
---%>
-<b>Version:</b> <%= VersionInfo.getVersion()%>,
- r<%= VersionInfo.getRevision()%><br>
-<b>Compiled:</b> <%= VersionInfo.getDate()%> by
- <%= VersionInfo.getUser()%><br>
-<%--
-<b>Identifier:</b> <%= tracker.getTrackerIdentifier()%><br>
---%>
+<h1> Flume Node: <%= FlumeNode.getInstance().getPhysicalNodeName()%></h1>
+<jsp:include page="version.jsp" />
+<hr>
<%= FlumeNode.getInstance().report() %>
View
19 src/webapps/flumeagent/flumereporter.jsp
@@ -18,7 +18,7 @@
<html>
<link rel="stylesheet" type="text/css" href="/flume.css">
<head>
-<!--(c) Copyright (2009) Cloudera, Inc. -->
+<!--(c) Copyright (2010) Cloudera, Inc. -->
<!-- Retro web 1.0 flume reporter display -->
<title>Flume Node Metrics Report (JSON)</title>
<%@ page
@@ -28,8 +28,8 @@
import="java.io.*"
import="java.util.*"
import="java.text.DecimalFormat"
- import="com.cloudera.flume.VersionInfo"
import="com.cloudera.flume.reporter.ReportManager"
+ import="com.cloudera.flume.agent.FlumeNode"
%>
<meta HTTP-EQUIV="REFRESH" content="5;url=flumereporter.jsp"/>
@@ -39,17 +39,12 @@
<jsp:include page="menu_agent.jsp" />
-<h1> Flume Node Metrics Report (JSON) </h1>
-
-<%-- <b>Started:</b> <%= new Date(tracker.getStartTime())%><br> --%>
-<b>Version:</b> <%= VersionInfo.getVersion()%>,
- r<%= VersionInfo.getRevision()%><br>
-<b>Compiled:</b> <%= VersionInfo.getDate()%> by
- <%= VersionInfo.getUser()%><br>
-<%--
-<b>Identifier:</b> <%= tracker.getTrackerIdentifier()%><br>
---%>
+<h1> Flume Node: <%=FlumeNode.getInstance().getPhysicalNodeName()%>
+ :: Metrics Report (JSON) </h1>
+<jsp:include page="version.jsp" />
+<hr>
+
<%= ReportManager.get().getReport().toJson() %>
</body></html>
View
2 src/webapps/flumeagent/menu_agent.jsp
@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<a href="flumeagent.jsp">agent</a> |
+<a href="flumeagent.jsp">node</a> |
<a href="staticconfig.jsp">static config</a> |
<a href="environment.jsp">env</a> |
<a href="extension.jsp">ext</a> |
View
13 src/webapps/flumeagent/staticconfig.jsp
@@ -18,7 +18,6 @@
<html><head>
<!-- Copyright (c) 2010 Cloudera, Inc. All rights reserved. -->
<!-- Retro web 1.0 flume Agent configuration display -->
-<title>Flume Node: Static Configuration</title>
<%@ page
contentType="text/html; charset=UTF-8"
import="javax.servlet.*"
@@ -27,14 +26,24 @@
import="java.util.*"
import="java.text.DecimalFormat"
import="com.cloudera.flume.conf.FlumeConfiguration"
+ import="com.cloudera.flume.agent.FlumeNode"
%>
+<title>
+Flume Node: <%= FlumeNode.getInstance().getPhysicalNodeName()%>
+ :: Static Configuration
+</title>
+
<link rel="stylesheet" type="text/css" href="/flume.css" />
</head>
<body>
<jsp:include page="menu_agent.jsp" />
-<h1> Static Configuration </h1>
+<h1> Flume Node: <%= FlumeNode.getInstance().getPhysicalNodeName()%> :: Static Configuration</h1>
+
+<jsp:include page="version.jsp" />
+<hr>
+
<%= FlumeConfiguration.get().toHtml() %>
View
29 src/webapps/flumeagent/version.jsp
@@ -0,0 +1,29 @@
+
+<!--
+ Licensed to Cloudera, Inc. under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. Cloudera, Inc. 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.
+-->
+<%@ page
+ contentType="text/html; charset=UTF-8"
+ import="com.cloudera.flume.VersionInfo"
+%>
+
+<b>Version:</b> <%= VersionInfo.getVersion()%>,
+r<%= VersionInfo.getRevision()%><br>
+<b>Compiled:</b> <%= VersionInfo.getDate()%> by
+<%= VersionInfo.getUser()%><br>
+
+
View
9 src/webapps/flumeconfig/flumemaster.jsp
@@ -37,6 +37,7 @@
<body>
<jsp:include page="menu.jsp" />
<h1>Flume Master</h1>
+<jsp:include page="version.jsp" />
<h3>ServerID: <%= FlumeConfiguration.get().getMasterServerId()%></h3>
<h3>Servers <% for (String s :
@@ -45,13 +46,7 @@ FlumeConfiguration.get().getMasterServers().split(",")) { %>
<% } %>
</h3>
-<%-- <b>Started:</b> <%= new Date(tracker.getStartTime())%><br>
-<b>Version:</b> <%= VersionInfo.getVersion()%>,
- r<%= VersionInfo.getRevision()%><br>
-<b>Compiled:</b> <%= VersionInfo.getDate()%> by
- <%= VersionInfo.getUser()%><br>
-<b>Identifier:</b> <%= tracker.getTrackerIdentifier()%><br>
---%>
+<hr>
<% FlumeMaster.getInstance().reportHtml(out); %>
View
5 src/webapps/flumeconfig/masterenv.jsp
@@ -34,8 +34,9 @@
<body>
<jsp:include page="menu.jsp" />
-<h1>Environment</h1>
-
+<h1>Flume Master : Environment</h1>
+<jsp:include page="version.jsp" />
+<hr>
<table>
<%
View
4 src/webapps/flumeconfig/masterext.jsp
@@ -34,7 +34,9 @@
<body>
<jsp:include page="menu.jsp" />
-<h1>Extensions - Sink/Source/Decorator</h1>
+<h1>Flume Master : Extensions - Sink/Source/Decorator</h1>
+<jsp:include page="version.jsp" />
+<hr>
<div id="sinks">
<h2>Sinks</h2>
View
5 src/webapps/flumeconfig/masterstaticconfig.jsp
@@ -34,7 +34,10 @@
<body>
<jsp:include page="menu.jsp" />
-<h1> Static Configuration </h1>
+<h1> Flume Master: Static Configuration </h1>
+
+<jsp:include page="version.jsp" />
+<hr>
<%= FlumeConfiguration.get().toHtml() %>
View
29 src/webapps/flumeconfig/version.jsp
@@ -0,0 +1,29 @@
+
+<!--
+ Licensed to Cloudera, Inc. under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. Cloudera, Inc. 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.
+-->
+<%@ page
+ contentType="text/html; charset=UTF-8"
+ import="com.cloudera.flume.VersionInfo"
+%>
+
+<b>Version:</b> <%= VersionInfo.getVersion()%>,
+r<%= VersionInfo.getRevision()%><br>
+<b>Compiled:</b> <%= VersionInfo.getDate()%> by
+<%= VersionInfo.getUser()%><br>
+
+

0 comments on commit 8a82185

Please sign in to comment.