YARN-6275. Fail to show real-time tracking charts in SLS (yufeigu via rkanter)
This commit is contained in:
parent
bb06ecf1ad
commit
5ce7fb0f18
|
@ -103,12 +103,16 @@ function run_simulation() {
|
||||||
hadoop_java_exec sls org.apache.hadoop.yarn.sls.SLSRunner ${args}
|
hadoop_java_exec sls org.apache.hadoop.yarn.sls.SLSRunner ${args}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this="${BASH_SOURCE-$0}"
|
||||||
|
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||||
|
|
||||||
|
# copy 'html' directory to current directory to make sure web sever can access
|
||||||
|
cp -r "${bin}/../html" "$(pwd)"
|
||||||
|
|
||||||
# let's locate libexec...
|
# let's locate libexec...
|
||||||
if [[ -n "${HADOOP_HOME}" ]]; then
|
if [[ -n "${HADOOP_HOME}" ]]; then
|
||||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_HOME}/libexec"
|
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_HOME}/libexec"
|
||||||
else
|
else
|
||||||
this="${BASH_SOURCE-$0}"
|
|
||||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
|
||||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../../../../../libexec"
|
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../../../../../libexec"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.apache.hadoop.yarn.sls.SLSRunner;
|
||||||
import org.apache.hadoop.yarn.sls.scheduler.FairSchedulerMetrics;
|
import org.apache.hadoop.yarn.sls.scheduler.FairSchedulerMetrics;
|
||||||
import org.apache.hadoop.yarn.sls.scheduler.SchedulerMetrics;
|
import org.apache.hadoop.yarn.sls.scheduler.SchedulerMetrics;
|
||||||
import org.apache.hadoop.yarn.sls.scheduler.SchedulerWrapper;
|
import org.apache.hadoop.yarn.sls.scheduler.SchedulerWrapper;
|
||||||
|
import org.eclipse.jetty.http.MimeTypes;
|
||||||
import org.eclipse.jetty.server.Handler;
|
import org.eclipse.jetty.server.Handler;
|
||||||
import org.eclipse.jetty.server.Request;
|
import org.eclipse.jetty.server.Request;
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
|
@ -118,6 +119,7 @@ public class SLSWebApp extends HttpServlet {
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
// static files
|
// static files
|
||||||
final ResourceHandler staticHandler = new ResourceHandler();
|
final ResourceHandler staticHandler = new ResourceHandler();
|
||||||
|
staticHandler.setMimeTypes(new MimeTypes());
|
||||||
staticHandler.setResourceBase("html");
|
staticHandler.setResourceBase("html");
|
||||||
|
|
||||||
Handler handler = new AbstractHandler() {
|
Handler handler = new AbstractHandler() {
|
||||||
|
|
Loading…
Reference in New Issue