flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/2] flink git commit: [FLINK-3194] [web client] Remove standalone web client
Date Mon, 04 Jan 2016 13:04:41 GMT
[FLINK-3194] [web client] Remove standalone web client

The JAR upload and submit functionality is now integrated into the JobManager web interface.

This closes #1481


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/4f128e3a
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/4f128e3a
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/4f128e3a

Branch: refs/heads/master
Commit: 4f128e3a84f811462c8c5d87d19d28354e2bd3b8
Parents: ca9b2b5
Author: Stephan Ewen <sewen@apache.org>
Authored: Mon Dec 28 15:47:35 2015 +0100
Committer: Stephan Ewen <sewen@apache.org>
Committed: Mon Jan 4 12:09:02 2016 +0100

----------------------------------------------------------------------
 flink-clients/pom.xml                           |  33 --
 .../org/apache/flink/client/WebFrontend.java    |  78 ----
 .../apache/flink/client/web/GUIServletStub.java | 169 -------
 .../apache/flink/client/web/JobJSONServlet.java | 163 -------
 .../flink/client/web/JobSubmissionServlet.java  | 464 -------------------
 .../apache/flink/client/web/JobsServlet.java    | 247 ----------
 .../flink/client/web/PlanDisplayServlet.java    | 144 ------
 .../flink/client/web/WebInterfaceServer.java    | 245 ----------
 .../src/main/flink-bin/bin/start-webclient.sh   |  26 --
 .../src/main/flink-bin/bin/stop-webclient.sh    |  26 --
 flink-dist/src/main/flink-bin/bin/webclient.sh  |  75 ---
 flink-dist/src/main/resources/flink-conf.yaml   |   5 -
 12 files changed, 1675 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/pom.xml
----------------------------------------------------------------------
diff --git a/flink-clients/pom.xml b/flink-clients/pom.xml
index e36731e..f81dbc0 100644
--- a/flink-clients/pom.xml
+++ b/flink-clients/pom.xml
@@ -75,39 +75,6 @@ under the License.
 		</dependency>
 
 		<dependency>
-			<groupId>org.eclipse.jetty</groupId>
-			<artifactId>jetty-server</artifactId>
-			<version>8.0.0.M1</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.eclipse.jetty</groupId>
-			<artifactId>jetty-security</artifactId>
-			<version>8.0.0.M1</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.eclipse.jetty</groupId>
-			<artifactId>jetty-servlet</artifactId>
-			<version>8.0.0.M1</version>
-		</dependency>
-
-		<dependency>
-			<groupId>commons-fileupload</groupId>
-			<artifactId>commons-fileupload</artifactId>
-			<version>1.3.1</version>
-			<type>jar</type>
-			<scope>compile</scope>
-		</dependency>
-
-		<!-- commons-io is required by commons-fileupload See http://commons.apache.org/proper/commons-fileupload/dependencies.html 
-			and https://github.com/dimalabs/ozone/pull/157 -->
-		<dependency>
-			<groupId>commons-io</groupId>
-			<artifactId>commons-io</artifactId>
-		</dependency>
-
-		<dependency>
 			<groupId>commons-cli</groupId>
 			<artifactId>commons-cli</artifactId>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/src/main/java/org/apache/flink/client/WebFrontend.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/WebFrontend.java b/flink-clients/src/main/java/org/apache/flink/client/WebFrontend.java
deleted file mode 100644
index 0fd6a04..0000000
--- a/flink-clients/src/main/java/org/apache/flink/client/WebFrontend.java
+++ /dev/null
@@ -1,78 +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.flink.client;
-
-import org.apache.flink.runtime.util.EnvironmentInformation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.flink.client.web.WebInterfaceServer;
-import org.apache.flink.configuration.ConfigConstants;
-import org.apache.flink.configuration.Configuration;
-import org.apache.flink.configuration.GlobalConfiguration;
-
-/**
- * Main entry point for the web frontend. Creates a web server according to the configuration
- * in the given directory.
- */
-public class WebFrontend {
-	/**
-	 * The log for this class.
-	 */
-	private static final Logger LOG = LoggerFactory.getLogger(WebFrontend.class);
-
-	/**
-	 * Main method. Accepts a single command line parameter, which is the config directory.
-	 * 
-	 * @param args The command line parameters.
-	 */
-	public static void main(String[] args) {
-		EnvironmentInformation.logEnvironmentInfo(LOG, "Web Client", args);
-
-		// check the arguments
-		if (args.length < 2 || !args[0].equals("--configDir")) {
-			LOG.error("Wrong command line arguments. Usage: WebFrontend --configDir <directory>");
-			System.exit(1);
-		}
-
-		try {
-			// load the global configuration
-			String configDir = args[1];
-			GlobalConfiguration.loadConfiguration(configDir);
-			Configuration config = GlobalConfiguration.getConfiguration();
-			
-			// add flink base dir to config
-			config.setString(ConfigConstants.FLINK_BASE_DIR_PATH_KEY, configDir+"/..");
-
-			// get the listening port
-			int port = config.getInteger(ConfigConstants.WEB_FRONTEND_PORT_KEY,
-										ConfigConstants.DEFAULT_WEBCLIENT_PORT);
-
-			// start the server
-			CliFrontend.webFrontend = true;
-			WebInterfaceServer server = new WebInterfaceServer(args[1], config, port);
-			LOG.info("Starting web frontend server on port " + port + '.');
-			server.start();
-			server.join();
-		}
-		catch (Throwable t) {
-			LOG.error("Exception while starting the web server: " + t.getMessage(), t);
-			System.exit(2);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/src/main/java/org/apache/flink/client/web/GUIServletStub.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/web/GUIServletStub.java b/flink-clients/src/main/java/org/apache/flink/client/web/GUIServletStub.java
deleted file mode 100644
index e15deed..0000000
--- a/flink-clients/src/main/java/org/apache/flink/client/web/GUIServletStub.java
+++ /dev/null
@@ -1,169 +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.flink.client.web;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-
-public abstract class GUIServletStub extends HttpServlet {
-	/**
-	 * The content type for plain textual data.
-	 */
-	public static final String CONTENT_TYPE_PLAIN = "text/plain;charset=utf-8";
-
-	/**
-	 * The content type for HTML data.
-	 */
-	public static final String CONTENT_TYPE_HTML = "text/html;charset=utf-8";
-
-	// ------------------------------------------------------------------------
-
-	/**
-	 * Serial UID for serialization interoperability.
-	 */
-	private static final long serialVersionUID = -7992677786569004843L;
-
-	/**
-	 * The references to CSS files, to be included in the header.
-	 */
-	private List<String> cssFiles;
-
-	/**
-	 * The javascript files to be included.
-	 */
-	private List<String> jsFiles;
-
-	/**
-	 * The title of the website.
-	 */
-	private String title;
-
-	/**
-	 * The constructor to be invoked by subclasses.
-	 * 
-	 * @param title
-	 *        The title of the page, to be entered into the headers title tag.
-	 */
-	public GUIServletStub(String title) {
-		this.title = title;
-		this.cssFiles = new ArrayList<String>();
-		this.jsFiles = new ArrayList<String>();
-	}
-
-	/**
-	 * Adds a stylesheet file to be included in the header.
-	 * 
-	 * @param file
-	 *        The file to be included.
-	 */
-	public void addStyleSheet(String file) {
-		cssFiles.add(file);
-	}
-
-	/**
-	 * Adds a javascript file to be included in the header.
-	 * 
-	 * @param file
-	 *        The file to be included.
-	 */
-	public void addJavascriptFile(String file) {
-		jsFiles.add(file);
-	}
-
-	@Override
-	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-		// response setup
-		resp.setContentType("text/html;charset=utf-8");
-		resp.setStatus(HttpServletResponse.SC_OK);
-
-		PrintWriter writer = resp.getWriter();
-
-		// print the header
-		writer
-			.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n        \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
-		writer.println("<html>");
-		writer.println("<head>");
-		writer.print("  <title>");
-		writer.print(title);
-		writer.println("</title>");
-		writer.println("  <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />");
-
-		// print all the stylesheets
-		writer.println("  <link rel=\"stylesheet\" type=\"text/css\" href=\"css/nephelefrontend.css\" />");
-
-		for (int i = 0; i < cssFiles.size(); i++) {
-			writer.print("  <link rel=\"stylesheet\" type=\"text/css\" href=\"");
-			writer.print(cssFiles.get(i));
-			writer.println("\" />");
-		}
-
-		// print all the included javascript files
-
-		for (int i = 0; i < jsFiles.size(); i++) {
-			writer.print("  <script type=\"text/javascript\" src=\"");
-			writer.print(jsFiles.get(i));
-			writer.println("\"></script>");
-		}
-
-		// write the other scripts and style definitions
-
-		// write the header
-		writer.println("<body>");
-		writer.println("  <div class=\"mainHeading\">");
-		writer.println("    <h1 style=\"margin-top:0\"><img src=\"img/flink-logo.png\" width=\"100\" height=\"100\" alt=\"Flink Logo\" align=\"middle\"/>Flink Web Submission Client"
-				+ "<div style='position:absolute; top:40px; right:110px;'>"
-				+ "<button id='zoomIn' type='button' class='btn btn-default'>Zoom In</button>"
-				+ "<button id='zoomOut' type='button' class='btn btn-default'>Zoom Out</button>"
-				+ "</div></h1>");
-		writer.println("  </div>");
-
-		Map<String, String[]> m = (Map<String, String[]>) req.getParameterMap();
-
-		// let the content be printed by the child class
-		printPage(writer, m, req);
-
-		// print the footer
-		writer.println("</body>");
-		writer.println("</html>");
-
-	}
-
-	/**
-	 * This method must be overridden by the subclass. It will be called to print the contents
-	 * of the page.
-	 * 
-	 * @param writer
-	 *        The <tt>PrintWriter</tt> to print the content to.
-	 * @param parameters
-	 *        The map containing all parameters mapped to their values.
-	 * @throws IOException
-	 *         If the request processing failed due to an I/O problem.
-	 */
-	public abstract void printPage(PrintWriter writer, Map<String, String[]> parameters, HttpServletRequest req) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/src/main/java/org/apache/flink/client/web/JobJSONServlet.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/web/JobJSONServlet.java b/flink-clients/src/main/java/org/apache/flink/client/web/JobJSONServlet.java
deleted file mode 100644
index 77250d3..0000000
--- a/flink-clients/src/main/java/org/apache/flink/client/web/JobJSONServlet.java
+++ /dev/null
@@ -1,163 +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.flink.client.web;
-
-import java.io.File;
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.flink.client.program.PackagedProgram;
-
-
-public class JobJSONServlet extends HttpServlet {
-	
-	/** Serial UID for serialization interoperability. */
-	private static final long serialVersionUID = 558077298726449201L;
-	
-	private static final Logger LOG = LoggerFactory.getLogger(JobJSONServlet.class);
-
-	// ------------------------------------------------------------------------
-
-	private static final String JOB_PARAM_NAME = "job";
-
-	private static final String CLASS_PARAM_NAME = "assemblerClass";
-
-	// ------------------------------------------------------------------------
-
-	private final File jobStoreDirectory; // the directory in which the jobs are stored
-
-	public JobJSONServlet(File jobStoreDirectory) {
-		this.jobStoreDirectory = jobStoreDirectory;
-	}
-
-	@Override
-	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-		resp.setContentType("application/json");
-
-		String jobName = req.getParameter(JOB_PARAM_NAME);
-		if (jobName == null) {
-			LOG.warn("Received request without job parameter name.");
-			resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-			return;
-		}
-
-		// check, if the jar exists
-		File jarFile = new File(jobStoreDirectory, jobName);
-		if (!jarFile.exists()) {
-			LOG.warn("Received request for non-existing jar file.");
-			resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-			return;
-		}
-
-		// create the pact plan
-		PackagedProgram pactProgram;
-		try {
-			pactProgram = new PackagedProgram(jarFile, req.getParameter(CLASS_PARAM_NAME), new String[0]);
-		}
-		catch (Throwable t) {
-			LOG.info("Instantiating the PactProgram for '" + jarFile.getName() + "' failed.", t);
-			resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-			resp.getWriter().print(t.getMessage());
-			return;
-		}
-		
-		String jsonPlan = null;
-		String programDescription = null;
-		
-		try {
-			jsonPlan = pactProgram.getPreviewPlan();
-		}
-		catch (Throwable t) {
-			LOG.error("Failed to create json dump of pact program.", t);
-		}
-		
-		try {
-			programDescription = pactProgram.getDescription();
-		}
-		catch (Throwable t) {
-			LOG.error("Failed to create description of pact program.", t);
-		}
-			
-		if (jsonPlan == null && programDescription == null) {
-			resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-			return;
-		} else {
-			resp.setStatus(HttpServletResponse.SC_OK);
-			PrintWriter wrt = resp.getWriter();
-			wrt.print("{ \"jobname\": \"");
-			wrt.print(jobName);
-			if (jsonPlan != null) {
-				wrt.print("\", \"plan\": ");
-				wrt.println(jsonPlan);
-			}
-			if (programDescription != null) {
-				wrt.print(", \"description\": \"");
-				wrt.print(escapeString(programDescription));
-				wrt.print("\"");
-			}
-			
-			wrt.println("}");
-		}
-	}
-
-	protected String escapeString(String str) {
-		int len = str.length();
-		char[] s = str.toCharArray();
-		StringBuilder sb = new StringBuilder();
-
-		for (int i = 0; i < len; i += 1) {
-			char c = s[i];
-			if ((c == '\\') || (c == '"') || (c == '/')) {
-				sb.append('\\');
-				sb.append(c);
-			}
-			else if (c == '\b') {
-				sb.append("\\b");
-			} else if (c == '\t') {
-				sb.append("\\t");
-			} else if (c == '\n') {
-				sb.append("<br>");
-			} else if (c == '\f') {
-				sb.append("\\f");
-			} else if (c == '\r') {
-				sb.append("\\r");
-			} else if (c == '>') {
-				sb.append("&gt;");
-			} else if (c == '<') {
-				sb.append("&lt;");
-			} else {
-				if (c < ' ') {
-					// Unreadable throw away
-				} else {
-					sb.append(c);
-				}
-			}
-		}
-
-		return sb.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/src/main/java/org/apache/flink/client/web/JobSubmissionServlet.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/web/JobSubmissionServlet.java b/flink-clients/src/main/java/org/apache/flink/client/web/JobSubmissionServlet.java
deleted file mode 100644
index 472c8d5..0000000
--- a/flink-clients/src/main/java/org/apache/flink/client/web/JobSubmissionServlet.java
+++ /dev/null
@@ -1,464 +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.flink.client.web;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringEscapeUtils;
-import org.apache.flink.api.java.tuple.Tuple2;
-import org.apache.flink.client.CliFrontend;
-import org.apache.flink.client.cli.CliFrontendParser;
-import org.apache.flink.client.program.Client;
-import org.apache.flink.client.program.PackagedProgram;
-import org.apache.flink.client.program.ProgramInvocationException;
-import org.apache.flink.optimizer.CompilerException;
-import org.apache.flink.optimizer.plan.FlinkPlan;
-import org.apache.flink.optimizer.plan.OptimizedPlan;
-import org.apache.flink.optimizer.plan.StreamingPlan;
-import org.apache.flink.optimizer.plandump.PlanJSONDumpGenerator;
-import org.apache.flink.configuration.GlobalConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class JobSubmissionServlet extends HttpServlet {
-
-	private static final long serialVersionUID = 8447312301029847397L;
-
-	// ------------------------------------------------------------------------
-
-	public static final String START_PAGE_URL = "launch.html";
-
-	private static final String ACTION_PARAM_NAME = "action";
-
-	private static final String ACTION_SUBMIT_VALUE = "submit";
-
-	private static final String ACTION_RUN_SUBMITTED_VALUE = "runsubmitted";
-
-	private static final String ACTION_BACK_VALUE = "back";
-
-	private static final String OPTIONS_PARAM_NAME = "options";
-
-	private static final String JOB_PARAM_NAME = "job";
-
-	private static final String CLASS_PARAM_NAME = "assemblerClass";
-
-	private static final String ARGUMENTS_PARAM_NAME = "arguments";
-
-	private static final String SHOW_PLAN_PARAM_NAME = "show_plan";
-
-	private static final String SUSPEND_PARAM_NAME = "suspend";
-
-	private static final Logger LOG = LoggerFactory.getLogger(JobSubmissionServlet.class);
-
-	// ------------------------------------------------------------------------
-
-	private final File jobStoreDirectory;										// the directory containing the uploaded jobs
-
-	private final File planDumpDirectory;										// the directory to dump the optimizer plans to
-
-	private final Map<Long, Tuple2<PackagedProgram, FlinkPlan>> submittedJobs;	// map from UIDs to the submitted jobs
-
-	private final Random rand;													// random number generator for UID
-
-	private final CliFrontend cli;
-	
-
-
-	public JobSubmissionServlet(CliFrontend cli, File jobDir, File planDir) {
-		this.cli = cli;
-		this.jobStoreDirectory = jobDir;
-		this.planDumpDirectory = planDir;
-
-		this.submittedJobs = Collections.synchronizedMap(new HashMap<Long, Tuple2<PackagedProgram, FlinkPlan>>());
-
-		this.rand = new Random(System.currentTimeMillis());
-	}
-
-	@Override
-	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-		String action = req.getParameter(ACTION_PARAM_NAME);
-		if (checkParameterSet(resp, action, "action")) {
-			return;
-		}
-
-		// decide according to the action
-		if (action.equals(ACTION_SUBMIT_VALUE)) {
-			// --------------- submit a job -------------------
-
-			// get the parameters
-			String options = req.getParameter(OPTIONS_PARAM_NAME);
-			String jobName = req.getParameter(JOB_PARAM_NAME);
-			String assemblerClass = req.getParameter(CLASS_PARAM_NAME);
-			String arguments = req.getParameter(ARGUMENTS_PARAM_NAME);
-			String showPlan = req.getParameter(SHOW_PLAN_PARAM_NAME);
-			String suspendPlan = req.getParameter(SUSPEND_PARAM_NAME);
-
-			// check that parameters are set
-			// do NOT check 'options' or 'assemblerClass' -> it is OK if not set
-			if (checkParameterSet(resp, jobName, JOB_PARAM_NAME)
-				|| checkParameterSet(resp, arguments, ARGUMENTS_PARAM_NAME)
-				|| checkParameterSet(resp, showPlan, SHOW_PLAN_PARAM_NAME)
-				|| checkParameterSet(resp, suspendPlan, SUSPEND_PARAM_NAME))
-			{
-				return;
-			}
-
-			boolean show = Boolean.parseBoolean(showPlan);
-			boolean suspend = Boolean.parseBoolean(suspendPlan);
-
-			List<String> cliOptions;
-			try {
-				cliOptions = tokenizeArguments(options);
-			} catch (IllegalArgumentException iaex) {
-				showErrorPage(resp, "Flink options contain an unterminated quoted string.");
-				return;
-			}
-
-			List<String> cliArguments;
-			try {
-				cliArguments = tokenizeArguments(arguments);
-			} catch (IllegalArgumentException iaex) {
-				showErrorPage(resp, "Program arguments contain an unterminated quoted string.");
-				return;
-			}
-
-			String[] args = new String[1 + (assemblerClass == null ? 0 : 2) + cliOptions.size() + 1 + cliArguments.size()];
-
-			List<String> parameters = new ArrayList<String>(args.length);
-			parameters.add(CliFrontend.ACTION_INFO);
-			parameters.addAll(cliOptions);
-			if (assemblerClass != null) {
-				parameters.add("-" + CliFrontendParser.CLASS_OPTION.getOpt());
-				parameters.add(assemblerClass);
-			}
-			parameters.add(jobStoreDirectory + File.separator + jobName);
-			parameters.addAll(cliArguments);
-
-			FlinkPlan optPlan;
-			try {
-				this.cli.parseParameters(parameters.toArray(args));
-
-				optPlan = this.cli.getFlinkPlan();
-				if (optPlan == null) {
-					// wrapping hack to get this exception handled correctly by following catch block
-					throw new RuntimeException(new Exception("The optimized plan could not be produced."));
-				}
-			}
-			catch (RuntimeException e) {
-				Throwable t = e.getCause();
-
-				if(t instanceof ProgramInvocationException) {
-					// collect the stack trace
-					StringWriter sw = new StringWriter();
-					PrintWriter w = new PrintWriter(sw);
-
-					if (t.getCause() == null) {
-						t.printStackTrace(w);
-					} else {
-						t.getCause().printStackTrace(w);
-					}
-
-					String message = sw.toString();
-					message = StringEscapeUtils.escapeHtml4(message);
-
-					showErrorPage(resp, "An error occurred while invoking the program:<br/><br/>"
-							+ t.getMessage() + "<br/>"
-							+ "<br/><br/><pre>" + message + "</pre>");
-					return;
-				} else if (t instanceof CompilerException) {
-					// collect the stack trace
-					StringWriter sw = new StringWriter();
-					PrintWriter w = new PrintWriter(sw);
-					t.printStackTrace(w);
-
-					String message = sw.toString();
-					message = StringEscapeUtils.escapeHtml4(message);
-
-					showErrorPage(resp, "An error occurred in the compiler:<br/><br/>"
-							+ t.getMessage() + "<br/>"
-							+ (t.getCause() != null ? "Caused by: " + t.getCause().getMessage():"")
-							+ "<br/><br/><pre>" + message + "</pre>");
-					return;
-				} else {
-					// collect the stack trace
-					StringWriter sw = new StringWriter();
-					PrintWriter w = new PrintWriter(sw);
-					t.printStackTrace(w);
-
-					String message = sw.toString();
-					message = StringEscapeUtils.escapeHtml4(message);
-
-					showErrorPage(resp, "An unexpected error occurred:<br/><br/>" + t.getMessage() + "<br/><br/><pre>"
-							+ message + "</pre>");
-					return;
-				}
-			}
-
-			// redirect according to our options
-			if (show) {
-				// we have a request to show the plan
-
-				// create a UID for the job
-				Long uid;
-				do {
-					uid = Math.abs(this.rand.nextLong());
-				} while (this.submittedJobs.containsKey(uid));
-
-				// dump the job to a JSON file
-				String planName = uid + ".json";
-				File jsonFile = new File(this.planDumpDirectory, planName);
-
-				if (optPlan instanceof StreamingPlan) {
-					((StreamingPlan) optPlan).dumpStreamingPlanAsJSON(jsonFile);
-				}
-				else {
-					PlanJSONDumpGenerator jsonGen = new PlanJSONDumpGenerator();
-					jsonGen.setEncodeForHTML(true);
-					jsonGen.dumpOptimizerPlanAsJSON((OptimizedPlan) optPlan, jsonFile);
-				}
-
-				// submit the job only, if it should not be suspended
-				if (!suspend) {
-					parameters.set(0, CliFrontend.ACTION_RUN);
-					try {
-						this.cli.parseParameters(parameters.toArray(args));
-					} catch(RuntimeException e) {
-						LOG.error("Error submitting job to the job-manager.", e.getCause());
-						showErrorPage(resp, e.getCause().getMessage());
-						return;
-					}
-				}
-				else {
-					this.submittedJobs.put(uid, new Tuple2<PackagedProgram, FlinkPlan>(this.cli.getPackagedProgram(), optPlan));
-				}
-
-				// redirect to the plan display page
-				resp.sendRedirect("showPlan?id=" + uid + "&suspended=" + (suspend ? "true" : "false"));
-			}
-			else {
-				// don't show any plan. directly submit the job and redirect to the
-				// runtime monitor
-				parameters.set(0, CliFrontend.ACTION_RUN);
-				try {
-					this.cli.parseParameters(parameters.toArray(args));
-				}
-				catch (RuntimeException e) {
-					LOG.error("Error submitting job to the job-manager.", e.getCause());
-					// HACK: Is necessary because Message contains whole stack trace
-					String errorMessage = e.getCause().getMessage().split("\n")[0];
-					showErrorPage(resp, errorMessage);
-					return;
-				}
-				resp.sendRedirect(START_PAGE_URL);
-			}
-		}
-		else if (action.equals(ACTION_RUN_SUBMITTED_VALUE)) {
-			// --------------- run a job that has been submitted earlier, but was -------------------
-			// --------------- not executed because of a plan display -------------------
-
-			String id = req.getParameter("id");
-			if (checkParameterSet(resp, id, "id")) {
-				return;
-			}
-
-			Long uid;
-			try {
-				uid = Long.parseLong(id);
-			}
-			catch (NumberFormatException nfex) {
-				showErrorPage(resp, "An invalid id for the job was provided.");
-				return;
-			}
-
-			// get the retained job
-			Tuple2<PackagedProgram, FlinkPlan> job = submittedJobs.remove(uid);
-			if (job == null) {
-				resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
-					"No job with the given uid was retained for later submission.");
-				return;
-			}
-
-			// submit the job
-			try {
-				Client client = new Client(GlobalConfiguration.getConfiguration());
-				client.runDetached(client.getJobGraph(job.f0, job.f1), job.f0.getUserCodeClassLoader());
-			}
-			catch (Exception ex) {
-				LOG.error("Error submitting job to the job-manager.", ex);
-				resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-				// HACK: Is necessary because Message contains whole stack trace
-				String errorMessage = ex.getMessage().split("\n")[0];
-				resp.getWriter().print(errorMessage);
-				// resp.sendError(HttpServletResponse.SC_BAD_REQUEST, ex.getMessage());
-				return;
-			}
-
-			// redirect to the start page
-			resp.sendRedirect(START_PAGE_URL);
-		}
-		else if (action.equals(ACTION_BACK_VALUE)) {
-			// remove the job from the map
-
-			String id = req.getParameter("id");
-			if (checkParameterSet(resp, id, "id")) {
-				return;
-			}
-
-			Long uid;
-			try {
-				uid = Long.parseLong(id);
-			}
-			catch (NumberFormatException nfex) {
-				showErrorPage(resp, "An invalid id for the job was provided.");
-				return;
-			}
-
-			// remove the retained job
-			submittedJobs.remove(uid);
-
-			// redirect to the start page
-			resp.sendRedirect(START_PAGE_URL);
-		}
-		else {
-			showErrorPage(resp, "Invalid action specified.");
-		}
-	}
-
-	/**
-	 * Prints the error page, containing the given message.
-	 * 
-	 * @param resp
-	 *        The response handler.
-	 * @param message
-	 *        The message to display.
-	 * @throws IOException
-	 *         Thrown, if the error page could not be printed due to an I/O problem.
-	 */
-	private void showErrorPage(HttpServletResponse resp, String message) throws IOException {
-		resp.setStatus(HttpServletResponse.SC_OK);
-		resp.setContentType(GUIServletStub.CONTENT_TYPE_HTML);
-
-		PrintWriter writer = resp.getWriter();
-
-		writer.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n        \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
-		writer.println("<html>");
-		writer.println("<head>");
-		writer.println("  <title>Launch Job - Error</title>");
-		writer.println("  <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />");
-		writer.println("  <link rel=\"stylesheet\" type=\"text/css\" href=\"css/nephelefrontend.css\" />");
-		writer.println("</head>");
-
-		writer.println("<body>");
-		writer.println("  <div class=\"mainHeading\">");
-		writer.println("    <h1><img src=\"img/flink-logo.png\" width=\"100\" height=\"100\" alt=\"Flink Logo\" align=\"middle\"/>Flink Web Submission Client</h1>");
-		writer.println("  </div>");
-		writer.println("  <div style=\"margin-top: 50px; text-align: center;\">");
-		writer.println("    <p class=\"error_text\" style=\"font-size: 18px;\">");
-		writer.println(message);
-		writer.println("    </p><br/><br/>");
-		writer.println("    <form action=\"launch.html\" method=\"GET\">");
-		writer.println("      <input type=\"submit\" value=\"back\">");
-		writer.println("    </form>");
-		writer.println("  </div>");
-		writer.println("</body>");
-		writer.println("</html>");
-	}
-
-	/**
-	 * Checks the given parameter. If it is null, it prints the error page.
-	 * 
-	 * @param resp
-	 *        The response handler.
-	 * @param parameter
-	 *        The parameter to check.
-	 * @param parameterName
-	 *        The name of the parameter, to describe it in the error message.
-	 * @return True, if the parameter is null, false otherwise.
-	 * @throws IOException
-	 *         Thrown, if the error page could not be printed.
-	 */
-	private boolean checkParameterSet(HttpServletResponse resp, String parameter, String parameterName)
-			throws IOException {
-		if (parameter == null) {
-			showErrorPage(resp, "The parameter '" + parameterName + "' is not set.");
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-	/**
-	 * Utility method that takes the given arguments, splits them at the whitespaces (space and tab) and
-	 * turns them into an array of Strings. Other than the <tt>StringTokenizer</tt>, this method
-	 * takes care of quotes, such that quoted passages end up being one string.
-	 * 
-	 * @param args
-	 *        The string to be split.
-	 * @return The array of split strings.
-	 */
-	private static List<String> tokenizeArguments(String args) {
-		List<String> list = new ArrayList<String>();
-		StringBuilder curr = new StringBuilder();
-
-		int pos = 0;
-		boolean quoted = false;
-
-		while (pos < args.length()) {
-			char c = args.charAt(pos);
-			if ((c == ' ' || c == '\t') && !quoted) {
-				if (curr.length() > 0) {
-					list.add(curr.toString());
-					curr.setLength(0);
-				}
-			} else if (c == '"') {
-				quoted = !quoted;
-			} else {
-				curr.append(c);
-			}
-
-			pos++;
-		}
-
-		if (quoted) {
-			throw new IllegalArgumentException("Unterminated quoted string.");
-		}
-
-		if (curr.length() > 0) {
-			list.add(curr.toString());
-		}
-
-		return list;
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/src/main/java/org/apache/flink/client/web/JobsServlet.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/web/JobsServlet.java b/flink-clients/src/main/java/org/apache/flink/client/web/JobsServlet.java
deleted file mode 100644
index a8e3c79..0000000
--- a/flink-clients/src/main/java/org/apache/flink/client/web/JobsServlet.java
+++ /dev/null
@@ -1,247 +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.flink.client.web;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.GregorianCalendar;
-import java.util.Iterator;
-import java.util.List;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.FileUploadException;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.flink.client.program.PackagedProgram;
-import org.apache.flink.client.program.ProgramInvocationException;
-
-/**
- * A servlet that accepts uploads of pact programs, returns a listing of the
- * directory containing the job jars, and deleting these jars.
- */
-public class JobsServlet extends HttpServlet {
-	/**
-	 * Serial UID for serialization interoperability.
-	 */
-	private static final long serialVersionUID = -1373210261957434273L;
-
-	// ------------------------------------------------------------------------
-
-	private static final String ACTION_PARAM_NAME = "action";
-
-	private static final String ACTION_LIST_VALUE = "list";
-
-	private static final String ACTION_DELETE_VALUE = "delete";
-
-	private static final String FILENAME_PARAM_NAME = "filename";
-
-	private static final String CONTENT_TYPE_PLAIN = "text/plain";
-
-	private static final Comparator<File> FILE_SORTER = new Comparator<File>() {
-		@Override
-		public int compare(File o1, File o2) {
-			return o1.getName().compareTo(o2.getName());
-		}
-
-	};
-
-	// ------------------------------------------------------------------------
-
-	/**
-	 * The file object for the directory for temporary files.
-	 */
-	private final File tmpDir;
-
-	/**
-	 * The file object for the directory for the submitted jars.
-	 */
-	private final File destinationDir;
-
-	/**
-	 * The name of the file to redirect to after the upload.
-	 */
-	private final String targetPage;
-
-	// ------------------------------------------------------------------------
-
-	/**
-	 * Creates a new <tt>JobServlet</tt>, configured with the given directories
-	 * and the given result page.
-	 * 
-	 * @param jobsDir
-	 *        The directory to store uploaded jobs in.
-	 * @param tmpDir
-	 *        The directory for temporary files.
-	 * @param targetPage
-	 *        The page to redirect to after a successful upload.
-	 */
-	public JobsServlet(File jobsDir, File tmpDir, String targetPage) {
-		this.tmpDir = tmpDir;
-		this.destinationDir = jobsDir;
-		this.targetPage = targetPage;
-	}
-
-	// ------------------------------------------------------------------------
-
-	public void init(ServletConfig config) throws ServletException {
-		super.init(config);
-
-		if (!(tmpDir.isDirectory() && tmpDir.canWrite())) {
-			throw new ServletException(tmpDir.getAbsolutePath() + " is not a writable directory");
-		}
-
-		if (!(destinationDir.isDirectory() && destinationDir.canWrite())) {
-			throw new ServletException(destinationDir.getAbsolutePath() + " is not a writable directory");
-		}
-	}
-
-	@Override
-	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-		String action = req.getParameter(ACTION_PARAM_NAME);
-
-		if (action.equals(ACTION_LIST_VALUE)) {
-			GregorianCalendar cal = new GregorianCalendar();
-
-			File[] files = destinationDir.listFiles();
-			Arrays.<File> sort(files, FILE_SORTER);
-
-			resp.setStatus(HttpServletResponse.SC_OK);
-			resp.setContentType(CONTENT_TYPE_PLAIN);
-
-			PrintWriter writer = resp.getWriter();
-			for (int i = 0; i < files.length; i++) {
-				if (!files[i].getName().endsWith(".jar")) {
-					continue;
-				}
-
-				JarFile jar = new JarFile(files[i]);
-				Manifest manifest = jar.getManifest();
-				String assemblerClass = null;
-				String descriptions = "";
-
-				if (manifest != null) {
-					assemblerClass = manifest.getMainAttributes().getValue(PackagedProgram.MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS);
-					if (assemblerClass == null) {
-						assemblerClass = manifest.getMainAttributes().getValue(PackagedProgram.MANIFEST_ATTRIBUTE_MAIN_CLASS);
-					}
-				}
-				if (assemblerClass == null) {
-					assemblerClass = "";
-				} else {
-					String[] classes = assemblerClass.split(",");
-					for (String c : classes) {
-						try {
-							String d = new PackagedProgram(files[i], c, new String[0]).getDescription();
-							if (d == null) {
-								d = "No description provided.";
-							}
-							descriptions += "#" + d;
-						} catch (ProgramInvocationException e) {
-							descriptions += "#No description provided.";
-							continue;
-						}
-					}
-
-					assemblerClass = '\t' + assemblerClass;
-				}
-
-				cal.setTimeInMillis(files[i].lastModified());
-				writer.println(files[i].getName() + '\t' + (cal.get(GregorianCalendar.MONTH) + 1) + '/'
-					+ cal.get(GregorianCalendar.DAY_OF_MONTH) + '/' + cal.get(GregorianCalendar.YEAR) + ' '
-					+ cal.get(GregorianCalendar.HOUR_OF_DAY) + ':' + cal.get(GregorianCalendar.MINUTE) + ':'
-					+ cal.get(GregorianCalendar.SECOND) + assemblerClass + descriptions);
-			}
-		} else if (action.equals(ACTION_DELETE_VALUE)) {
-			String filename = req.getParameter(FILENAME_PARAM_NAME);
-
-			if (filename == null || filename.length() == 0) {
-				resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-			} else {
-				File f = new File(destinationDir, filename);
-				if (!f.exists() || f.isDirectory()) {
-					resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
-				}
-				f.delete();
-				resp.setStatus(HttpServletResponse.SC_OK);
-			}
-		} else {
-			resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-		}
-	}
-
-	@Override
-	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-		// check, if we are doing the right request
-		if (!ServletFileUpload.isMultipartContent(req)) {
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
-			return;
-		}
-
-		// create the disk file factory, limiting the file size to 20 MB
-		DiskFileItemFactory fileItemFactory = new DiskFileItemFactory();
-		fileItemFactory.setSizeThreshold(20 * 1024 * 1024); // 20 MB
-		fileItemFactory.setRepository(tmpDir);
-
-		String filename = null;
-
-		// parse the request
-		ServletFileUpload uploadHandler = new ServletFileUpload(fileItemFactory);
-		try {
-			Iterator<FileItem> itr = ((List<FileItem>) uploadHandler.parseRequest(req)).iterator();
-
-			// go over the form fields and look for our file
-			while (itr.hasNext()) {
-				FileItem item = itr.next();
-				if (!item.isFormField()) {
-					if (item.getFieldName().equals("upload_jar_file")) {
-
-						// found the file, store it to the specified location
-						filename = item.getName();
-						File file = new File(destinationDir, filename);
-						item.write(file);
-						break;
-					}
-				}
-			}
-		} catch (FileUploadException ex) {
-			resp.sendError(HttpServletResponse.SC_NOT_ACCEPTABLE, "Invalid Fileupload.");
-			return;
-		} catch (Exception ex) {
-			resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
-				"An unknown error occurred during the file upload.");
-			return;
-		}
-
-		// write the okay message
-		resp.sendRedirect(targetPage);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/src/main/java/org/apache/flink/client/web/PlanDisplayServlet.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/web/PlanDisplayServlet.java b/flink-clients/src/main/java/org/apache/flink/client/web/PlanDisplayServlet.java
deleted file mode 100644
index 9043a2e..0000000
--- a/flink-clients/src/main/java/org/apache/flink/client/web/PlanDisplayServlet.java
+++ /dev/null
@@ -1,144 +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.flink.client.web;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * Simple servlet that displays the visualization of a data flow plan.
- */
-public class PlanDisplayServlet extends GUIServletStub {
-
-	private static final long serialVersionUID = 3610115341264927614L;
-	
-	
-	private final int runtimeVisualizationPort;
-	
-	private String runtimeVisURL;
-
-	/**
-	 * Default constructor. Sets up all CSS and JS files for the header.
-	 */
-	public PlanDisplayServlet(int runtimePort) {
-		super("Flink Query Interface - Query Plan");
-		
-		this.runtimeVisualizationPort = runtimePort;
-
-		addStyleSheet("css/nephelefrontend.css");
-		addStyleSheet("css/pactgraphs.css");
-		addStyleSheet("css/graph.css");
-		addStyleSheet("css/overlay.css");
-		addStyleSheet("css/bootstrap.css");
-
-		addJavascriptFile("js/jquery-2.1.0.js");
-		addJavascriptFile("js/graphCreator.js");
-		addJavascriptFile("js/d3.js");
-		addJavascriptFile("js/dagre-d3.js");
-		addJavascriptFile("js/bootstrap.min.js");
-		addJavascriptFile("js/jquery.tools.min.js");
-
-	}
-
-	@Override
-	public void printPage(PrintWriter writer, Map<String, String[]> parameters, HttpServletRequest req) throws IOException {
-		String[] x = parameters.get("id");
-		String uid = (x != null && x.length >= 1) ? x[0] : null;
-
-		x = parameters.get("suspended");
-		String suspend = (x != null && x.length >= 1) ? x[0] : null;
-
-		// check, if all parameters are there
-		if (uid == null || suspend == null) {
-			writer.println("    <div class=\"error_text\" style=\"margin-top: 50px; font-size: 18px;\">");
-			writer.println("      <p>Parameters identifying the plan and the suspension strategy are missing.</p>");
-			writer.println("    </div>");
-			return;
-		}
-		
-		if (this.runtimeVisURL == null) {
-			try {
-				URI request = new URI(req.getRequestURL().toString());
-				URI vizURI = new URI(request.getScheme(), null, request.getHost(), runtimeVisualizationPort, null, null, null);
-				this.runtimeVisURL = vizURI.toString();
-			} catch (URISyntaxException e) {
-				; // ignore and simply do not forward
-			}
-		}
-		
-		boolean suspended = Boolean.parseBoolean(suspend);
-
-		// write the canvas for the graph area
-		writer.println("    <div style=\"position: relative;\">\n"
-					+ "      <div id=\"mainCanvas\" class=\"canvas boxed\">\n"
-					+ "      <div id=\"attach\"><svg id=\"svg-main\" width=500 height=500><g transform=\"translate(20, 20)\"/></svg></div>"
-					+ "      </div>\n"
-					+ "      <div style=\"position: absolute; right: 20px; bottom: 20px;\">\n"
-					+ "        <input id=\"back_button\" type=\"button\" value=\"&lt; Back\"/>");
-		if (suspended) {
-			writer.println("        <input id=\"run_button\" type=\"button\" value=\"Continue &gt;\"/>");
-		}
-		writer.println("      </div>\n" + "    </div>");
-
-		// write the canvas for the properties area
-		writer.println("    <div class=\"simple_overlay\" id=\"propertyO\">"
-				+ "<div id=\"propertyCanvas\" class=\"propertyCanvas\"></div>\n"
-				+ "    </div>");
-
-		// write the page initialization code
-		writer.println("    <script type=\"text/javascript\">\n" + "    <!--\n" + "      var maxColumnWidth = 350;\n"
-			+ "      var minColumnWidth = 150;\n\n" + "      $(document).ready(function() {\n");
-
-		writer.println("        // register the event handler for the 'run' button and activate zoom Buttons\n"
-					+ " activateZoomButtons();"
-					+ "        $('#run_button').click(function () {\n" + "          $('#run_button').remove();\n"
-					+ "          $.ajax( {" + " url: '/runJob'," + " data: { action: 'runsubmitted', id: '" + uid + "' },"
-					+ " success: function () { alert('Job succesfully submitted');"
-					+ (this.runtimeVisURL != null ? (" window.location = \"" + this.runtimeVisURL + "\"; },") : " },")
-					+ " error: function (xhr, ajaxOptions, thrownError) { alert(xhr.responseText); }" + "          });\n"
-					+ "        });\n");
-
-		writer.println("        // register the event handler for the 'back' button\n"
-					+ "        $('#back_button').click(function () {\n"
-		+ (suspended ? "          var url = \"/runJob?\" + $.param({action: \"back\", id: \"" + uid + "\" });\n"
-					: "          var url = \"" + JobSubmissionServlet.START_PAGE_URL + "\";\n")
-					+ "          window.location = url;\n" + "        });\n");
-
-		// writer.println(
-		// "        // register an ajax error handler\n" +
-		// "        $(document).ajaxError(function(e, xhr, settings, exception) {\n" +
-		// "          var str = \"An error occurred while getting the PACT plan:\\n\";\n" +
-		// "          str += \"\\nUrl: \" + settings.url;\n" +
-		// "          str += \"\\nException: \" + exception;\n" +
-		// "          alert(str);\n" +
-		// "        });\n");
-
-		writer.println("        //change height of mainCanvas to maximum"
-				+ "        $(\"#mainCanvas\").css(\"height\", $(document).height() - 15 - 105);\n"
-				+ "        // use jquery to asynchronously load the pact plan description\n"
-			+ "        $.getJSON(\"ajax-plans/" + uid
-			+ ".json\", function(data) { drawGraph(data, \"#svg-main\"); });" + "      });\n" + "    //-->\n"
-			+ "    </script>");
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-clients/src/main/java/org/apache/flink/client/web/WebInterfaceServer.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/web/WebInterfaceServer.java b/flink-clients/src/main/java/org/apache/flink/client/web/WebInterfaceServer.java
deleted file mode 100644
index 68a0706..0000000
--- a/flink-clients/src/main/java/org/apache/flink/client/web/WebInterfaceServer.java
+++ /dev/null
@@ -1,245 +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.flink.client.web;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URL;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.flink.client.CliFrontend;
-import org.apache.flink.configuration.ConfigConstants;
-import org.apache.flink.configuration.Configuration;
-import org.apache.flink.configuration.GlobalConfiguration;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.handler.HandlerList;
-import org.eclipse.jetty.server.handler.ResourceHandler;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-
-/**
- * This class sets up the web-server that serves the web client. It instantiates and
- * configures an embedded jetty server.
- */
-public class WebInterfaceServer {
-
-	private static final String WEB_ROOT_DIR = "web-docs";
-
-	/**
-	 * The log for this class.
-	 */
-	private static final Logger LOG = LoggerFactory.getLogger(WebInterfaceServer.class);
-
-	/**
-	 * The jetty server serving all requests.
-	 */
-	private final Server server;
-
-	/**
-	 * Creates a new web interface server. The server runs the servlets that implement the logic
-	 * to upload, list, delete and submit jobs, to compile them and to show the optimizer plan.
-	 * It serves the asynchronous requests for the plans and all other static resources, like
-	 * static web pages, stylesheets or javascript files.
-	 * 
-	 * @param configDir
-	 *        The path to the configuration directory.
-	 * @param config
-	 *        The configuration for the JobManager. All jobs will be sent
-	 *        to the JobManager described by this configuration.
-	 * @param port
-	 *        The port to launch the server on.
-	 * @throws Exception
-	 *         Thrown, if the server setup failed.
-	 */
-	public WebInterfaceServer(String configDir, Configuration config, int port) throws Exception {
-		// if no explicit configuration is given, use the global configuration
-		if (config == null) {
-			config = GlobalConfiguration.getConfiguration();
-		}
-		
-		// get base path of Flink installation
-		String basePath = config.getString(ConfigConstants.FLINK_BASE_DIR_PATH_KEY,"");
-
-		File tmpDir;
-		File uploadDir;
-		File planDumpDir;
-		
-		URL webRootDir = this.getClass().getClassLoader().getResource(WEB_ROOT_DIR);
-
-		if(webRootDir == null){
-			throw new FileNotFoundException("Cannot start web interface server because the web " +
-					"root dir " + WEB_ROOT_DIR + " is not included in the jar.");
-		}
-
-		String tmpDirPath = config.getString(ConfigConstants.WEB_TMP_DIR_KEY,
-			ConfigConstants.DEFAULT_WEB_TMP_DIR);
-		
-		tmpDir = new File(tmpDirPath);
-		if (!tmpDir.isAbsolute()) {
-			// path relative to base dir
-			tmpDir = new File(basePath+"/"+tmpDirPath);
-		}
-		
-		String uploadDirPath = config.getString(ConfigConstants.WEB_JOB_UPLOAD_DIR_KEY,
-				ConfigConstants.DEFAULT_WEB_JOB_STORAGE_DIR);
-		
-		uploadDir = new File(uploadDirPath);
-		if (!uploadDir.isAbsolute()) {
-			// path relative to base dir
-			uploadDir = new File(basePath+"/"+uploadDirPath);
-		}
-
-		String planDumpDirPath = config.getString(ConfigConstants.WEB_PLAN_DUMP_DIR_KEY,
-				ConfigConstants.DEFAULT_WEB_PLAN_DUMP_DIR);
-		
-		planDumpDir = new File(planDumpDirPath);
-		if (!planDumpDir.isAbsolute()) {
-			// path relative to base dir
-			planDumpDir = new File(basePath+"/"+planDumpDirPath);
-		}
-		
-		if (LOG.isInfoEnabled()) {
-			LOG.info("Setting up web client server, using web-root directory '" +
-					webRootDir.toExternalForm() + "'.");
-			LOG.info("Web frontend server will store temporary files in '" + tmpDir.getAbsolutePath()
-				+ "', uploaded jobs in '" + uploadDir.getAbsolutePath() + "', plan-json-dumps in '"
-				+ planDumpDir.getAbsolutePath() + "'.");
-	
-			LOG.info("Web client will submit jobs to JobManager at "
-				+ config.getString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, null) + ", port "
-				+ config.getInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY, ConfigConstants.DEFAULT_JOB_MANAGER_IPC_PORT)
-				+ ".");
-		}
-
-		server = new Server(port);
-
-		// ensure, that all the directories exist
-		checkAndCreateDirectories(tmpDir, true);
-		checkAndCreateDirectories(uploadDir, true);
-		checkAndCreateDirectories(planDumpDir, true);
-		
-		int jobManagerWebPort = config.getInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY,
-												ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_PORT);
-
-		// ----- the handlers for the servlets -----
-		CliFrontend cli = new CliFrontend(configDir);
-		ServletContextHandler servletContext = new ServletContextHandler(ServletContextHandler.SESSIONS);
-		servletContext.setContextPath("/");
-		servletContext.addServlet(new ServletHolder(new JobJSONServlet(uploadDir)), "/pactPlan");
-		servletContext.addServlet(new ServletHolder(new PlanDisplayServlet(jobManagerWebPort)), "/showPlan");
-		servletContext.addServlet(new ServletHolder(new JobsServlet(uploadDir, tmpDir, "launch.html")), "/jobs");
-		servletContext.addServlet(new ServletHolder(new JobSubmissionServlet(cli, uploadDir, planDumpDir)), "/runJob");
-
-		// ----- the hander serving the written pact plans -----
-		ResourceHandler pactPlanHandler = new ResourceHandler();
-		pactPlanHandler.setDirectoriesListed(false);
-		pactPlanHandler.setResourceBase(planDumpDir.getAbsolutePath());
-		ContextHandler pactPlanContext = new ContextHandler();
-		pactPlanContext.setContextPath("/ajax-plans");
-		pactPlanContext.setHandler(pactPlanHandler);
-
-		// ----- the handler serving all the static files -----
-		ResourceHandler resourceHandler = new ResourceHandler();
-		resourceHandler.setDirectoriesListed(false);
-		resourceHandler.setResourceBase(webRootDir.toExternalForm());
-
-		// ----- add the handlers to the list handler -----
-		HandlerList handlers = new HandlerList();
-		handlers.addHandler(servletContext);
-		handlers.addHandler(pactPlanContext);
-		handlers.addHandler(resourceHandler);
-
-		// ----- create the login module with http authentication -----
-
-		File af = null;
-		String authFile = config.getString(ConfigConstants.WEB_ACCESS_FILE_KEY,
-			ConfigConstants.DEFAULT_WEB_ACCESS_FILE_PATH);
-		if (authFile != null) {
-			af = new File(authFile);
-			if (!af.exists()) {
-				LOG.error("The specified file '" + af.getAbsolutePath()
-					+ "' with the authentication information is missing. Starting server without HTTP authentication.");
-				af = null;
-			}
-		}
-		server.setHandler(handlers);
-	}
-
-	/**
-	 * Starts the web frontend server.
-	 * 
-	 * @throws Exception
-	 *         Thrown, if the start fails.
-	 */
-	public void start() throws Exception {
-		server.start();
-	}
-
-	/**
-	 * Lets the calling thread wait until the server terminates its operation.
-	 * 
-	 * @throws InterruptedException
-	 *         Thrown, if the calling thread is interrupted.
-	 */
-	public void join() throws InterruptedException {
-		server.join();
-	}
-
-	/**
-	 * Checks and creates the directory described by the abstract directory path. This function checks
-	 * if the directory exists and creates it if necessary. It also checks read permissions and
-	 * write permission, if necessary.
-	 * 
-	 * @param f
-	 *        The file describing the directory path.
-	 * @param needWritePermission
-	 *        A flag indicating whether to check write access.
-	 * @throws IOException
-	 *         Thrown, if the directory could not be created, or if one of the checks failed.
-	 */
-	private void checkAndCreateDirectories(File f, boolean needWritePermission) throws IOException {
-		String dir = f.getAbsolutePath();
-
-		// check if it exists and it is not a directory
-		if (f.exists() && !f.isDirectory()) {
-			throw new IOException("A none directory file with the same name as the configured directory '" + dir
-				+ "' already exists.");
-		}
-
-		// try to create the directory
-		if (!f.exists()) {
-			if (!f.mkdirs()) {
-				throw new IOException("Could not create the directory '" + dir + "'.");
-			}
-		}
-
-		// check the read and execute permission
-		if (!(f.canRead() && f.canExecute())) {
-			throw new IOException("The directory '" + dir + "' cannot be read and listed.");
-		}
-
-		// check the write permission
-		if (needWritePermission && !f.canWrite()) {
-			throw new IOException("No write access could be obtained on directory '" + dir + "'.");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-dist/src/main/flink-bin/bin/start-webclient.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/start-webclient.sh b/flink-dist/src/main/flink-bin/bin/start-webclient.sh
deleted file mode 100755
index 5eb6e74..0000000
--- a/flink-dist/src/main/flink-bin/bin/start-webclient.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-################################################################################
-#  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.
-################################################################################
-
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/config.sh
-
-"$FLINK_BIN_DIR"/webclient.sh start

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-dist/src/main/flink-bin/bin/stop-webclient.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/stop-webclient.sh b/flink-dist/src/main/flink-bin/bin/stop-webclient.sh
deleted file mode 100755
index d95c483..0000000
--- a/flink-dist/src/main/flink-bin/bin/stop-webclient.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-################################################################################
-#  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.
-################################################################################
-
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/config.sh
-
-"$FLINK_BIN_DIR"/webclient.sh stop

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-dist/src/main/flink-bin/bin/webclient.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/webclient.sh b/flink-dist/src/main/flink-bin/bin/webclient.sh
deleted file mode 100755
index 8a07275..0000000
--- a/flink-dist/src/main/flink-bin/bin/webclient.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env bash
-################################################################################
-#  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.
-################################################################################
-
-
-STARTSTOP=$1
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-# get nephele config
-. "$bin"/config.sh
-
-if [ "$FLINK_IDENT_STRING" = "" ]; then
-        FLINK_IDENT_STRING="$USER"
-fi
-
-JVM_ARGS="$JVM_ARGS -Xmx512m"
-
-FLINK_WEBCLIENT_CLASSPATH=`constructFlinkClassPath`
-
-log=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-webclient-$HOSTNAME.log
-out=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-webclient-$HOSTNAME.out
-pid=$FLINK_PID_DIR/flink-$FLINK_IDENT_STRING-webclient.pid
-log_setting=(-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j.properties -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml)
-
-case $STARTSTOP in
-
-        (start)
-                mkdir -p "$FLINK_PID_DIR"
-                if [ -f $pid ]; then
-                        if kill -0 `cat $pid` > /dev/null 2>&1; then
-                                echo Flink webclient running as process `cat $pid`.  Stop it first.
-                                exit 1
-                        fi
-                fi
-                echo Starting Flink webclient
-		$JAVA_RUN $JVM_ARGS "${log_setting[@]}" -classpath "`manglePathList "$FLINK_WEBCLIENT_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" org.apache.flink.client.WebFrontend --configDir "$FLINK_CONF_DIR" > "$out" 2>&1 < /dev/null &
-		echo $! > $pid
-	;;
-
-        (stop)
-                if [ -f $pid ]; then
-                        if kill -0 `cat $pid` > /dev/null 2>&1; then
-                                echo Stopping Flink webclient
-                                kill `cat $pid`
-                        else
-                                echo No Flink webclient to stop
-                        fi
-                else
-                        echo No Flink webclient to stop
-                fi
-        ;;
-
-        (*)
-                echo Please specify start or stop
-        ;;
-
-esac
-

http://git-wip-us.apache.org/repos/asf/flink/blob/4f128e3a/flink-dist/src/main/resources/flink-conf.yaml
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/resources/flink-conf.yaml b/flink-dist/src/main/resources/flink-conf.yaml
index d1d9b8a..8bd4747 100644
--- a/flink-dist/src/main/resources/flink-conf.yaml
+++ b/flink-dist/src/main/resources/flink-conf.yaml
@@ -71,11 +71,6 @@ jobmanager.web.port: 8081
 
 #jobmanager.web.submit.enable: false
 
-# The port uder which the standalone web client
-# (for job upload and submit) listens.
-
-webclient.port: 8080
-
 
 #==============================================================================
 # Streaming state checkpointing


Mime
View raw message