You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by sachingoel0101 <gi...@git.apache.org> on 2015/10/06 19:04:42 UTC

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

GitHub user sachingoel0101 opened a pull request:

    https://github.com/apache/flink/pull/1233

    [FLINK-2731][web-dashboard] Adds access to Job Manager stdout and log.

    This adds minimalist support for accessing Job manager logs and stdout files to the new web frontend.
    Right now, to refresh the logs, user needs to explicitly press the refresh button, at which the whole log/stdout file is re-fetched and shown.
    
    Later on, I plan to implement a better system which doesn't have to fetch the whole file again. That might take some time and not be complete in time for the next release.
    @uce , can you take a look at this?
    Attaching a few screenshots:
    Logs:
    
    ![log](https://cloud.githubusercontent.com/assets/8874261/10315839/35641984-6c7a-11e5-98d7-253e74b3e684.PNG)
    
    Logs file download:
    
    ![log_download](https://cloud.githubusercontent.com/assets/8874261/10315847/3d379118-6c7a-11e5-8dce-cb53eaf1ef5f.PNG)
    
    Stdout:
    
    ![out](https://cloud.githubusercontent.com/assets/8874261/10315861/54c22370-6c7a-11e5-980d-d87f8f2ce7a8.PNG)
    
    Stdout file download:
    
    ![out_download](https://cloud.githubusercontent.com/assets/8874261/10315870/65b4e488-6c7a-11e5-9d05-9bf0f015f3f2.PNG)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sachingoel0101/flink jobmanagerlog

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1233.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1233
    
----
commit 2939b07e2028391623c6fad8ad727b7b34a6e087
Author: Sachin Goel <sa...@gmail.com>
Date:   2015-10-06T15:10:12Z

    [FLINK-2731][web-dashboard] Adds access to Job Manager stdout and log.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41395253
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -139,7 +148,14 @@ else if (flinkRoot != null) {
     			throw new IllegalConfigurationException("The path to the static contents (" + 
     					webRootDir.getAbsolutePath() + ") is not a readable directory.");
     		}
    -		
    +
    +		final File logStdoutDir = new File(flinkRoot, LOG_OUTPUT_DIRECTORY);
    --- End diff --
    
    please use the same kind of checks as for the resources. its fails for my machine after building:
    ```
    org.apache.flink.configuration.IllegalConfigurationException: The path to the log and stdout directory (/Users/ufuk/code/flink-2/flink-dist/target/flink-0.10-SNAPSHOT-bin/flink-0.10-SNAPSHOT/conf/../log) is not a readable directory.
    	at org.apache.flink.runtime.webmonitor.WebRuntimeMonitor.<init>(WebRuntimeMonitor.java:156)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    	at org.apache.flink.runtime.jobmanager.JobManager$.startWebRuntimeMonitor(JobManager.scala:1772)
    	at org.apache.flink.runtime.jobmanager.JobManager$.runJobManager(JobManager.scala:1322)
    	at org.apache.flink.runtime.jobmanager.JobManager$.main(JobManager.scala:1194)
    	at org.apache.flink.runtime.jobmanager.JobManager.main(JobManager.scala)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146473400
  
    @uce Since the web frontend isn't integrated yet, I have verified correct logs directory paths by examining container logs by deploying on yarn. This will now work with Yarn too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-149171828
  
    Hi @mxm I have fixed the `WebFrontendITCase`. Please have a look again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-145929720
  
    Yes, I will look at it today. Thanks! Looks great from the screenshots.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41397837
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java ---
    @@ -123,9 +124,18 @@ public void channelRead0(ChannelHandlerContext ctx, Routed routed) throws Except
     		final HttpRequest request = routed.request();
     		String requestPath = routed.path();
     
    +		// TODO REMOVE BEFORE COMMITTING. THIS IS ONLY TO TEST THAT JOB MANAGER STDOUT IS ACCESSED
    +		System.out.println(requestPath);
    +
     		// make sure we request the "index.html" in case there is a directory request
     		if (requestPath.endsWith("/")) {
     			requestPath = requestPath + "index.html";
    +		} else if (requestPath.equals("/jobmanager/logfile")) {
    +			requestPath = "/" + WebRuntimeMonitor.LOG_FILE_PATH;
    +		} else if (requestPath.equals("/jobmanager/stdout")) {
    +			requestPath = "/" + WebRuntimeMonitor.STDOUT_FILE_PATH;
    +		} else {
    --- End diff --
    
    Will do.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by mxm <gi...@git.apache.org>.
Github user mxm commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-149142260
  
    Thanks a lot @sachingoel0101. I'll check out and test your changes now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/1233


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41395372
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java ---
    @@ -177,7 +187,11 @@ public void channelRead0(ChannelHandlerContext ctx, Routed routed) throws Except
     
     		HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
     		setContentTypeHeader(response, file);
    -		setDateAndCacheHeaders(response, file);
    +		// TODO This is counter-intuitive. Will be changed later when a dynamic file server is added
    --- End diff --
    
    please remove this special branch. what is confusing exactly?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146737214
  
    @sachingoel0101: my pull request (https://github.com/apache/flink/pull/1222) is actually based on @uce's PR (https://github.com/apache/flink/pull/1202). I'm not sure when I'll find time to merge my PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41395336
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java ---
    @@ -123,9 +124,18 @@ public void channelRead0(ChannelHandlerContext ctx, Routed routed) throws Except
     		final HttpRequest request = routed.request();
     		String requestPath = routed.path();
     
    +		// TODO REMOVE BEFORE COMMITTING. THIS IS ONLY TO TEST THAT JOB MANAGER STDOUT IS ACCESSED
    +		System.out.println(requestPath);
    +
     		// make sure we request the "index.html" in case there is a directory request
     		if (requestPath.endsWith("/")) {
     			requestPath = requestPath + "index.html";
    +		} else if (requestPath.equals("/jobmanager/logfile")) {
    +			requestPath = "/" + WebRuntimeMonitor.LOG_FILE_PATH;
    +		} else if (requestPath.equals("/jobmanager/stdout")) {
    +			requestPath = "/" + WebRuntimeMonitor.STDOUT_FILE_PATH;
    +		} else {
    --- End diff --
    
    the else comment is confusing. please remove


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146208712
  
    I made some comments. I've initially said that I am going to address them myself, but I won't have the time today. Can you please address them? Thanks for the fast PR btw.
    
    And how does this interact with YARN?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-149036747
  
    @mxm I've rebased on your latest changes to enable dashboard on yarn. 
    Also, there was a little redundant code in `StaticFileServerHandler` 
    ```java
    if (File.separatorChar != '/') {
        requestPath = requestPath.replace('/', File.separatorChar);
    }
    ```
    which I think was meant to make sure things work on windows, but it doesn't actually serve that purpose. I've removed it in the second commit.
    
    The log and out files are now accessible both with and without yarn. I have also enabled the logs related tests on both `YARNSessionFIFOITCase` and `WebFrontendITCase`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41397986
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -139,7 +148,14 @@ else if (flinkRoot != null) {
     			throw new IllegalConfigurationException("The path to the static contents (" + 
     					webRootDir.getAbsolutePath() + ") is not a readable directory.");
     		}
    -		
    +
    +		final File logStdoutDir = new File(flinkRoot, LOG_OUTPUT_DIRECTORY);
    --- End diff --
    
    Yes. Moving around the log file path finding code will take care of this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by mxm <gi...@git.apache.org>.
Github user mxm commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-149160757
  
    Looks good, @sachingoel0101. I think we can merge this if we adapt the test which checks for the log file access in the web frontend. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41395108
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -276,4 +294,18 @@ public int getServerPort() {
     	private static RuntimeMonitorHandler handler(RequestHandler handler) {
     		return new RuntimeMonitorHandler(handler);
     	}
    +
    +	private static String getFilePath(String pattern) {
    --- End diff --
    
    There is a  list files version which takes a filter. You can directly use that one.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41393573
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java ---
    @@ -123,9 +124,18 @@ public void channelRead0(ChannelHandlerContext ctx, Routed routed) throws Except
     		final HttpRequest request = routed.request();
     		String requestPath = routed.path();
     
    +		// TODO REMOVE BEFORE COMMITTING. THIS IS ONLY TO TEST THAT JOB MANAGER STDOUT IS ACCESSED
    --- End diff --
    
    Please remove


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41398182
  
    --- Diff: flink-runtime-web/web-dashboard/app/styles/index.styl ---
    @@ -405,3 +405,7 @@ pre.exception
       .table
         td.td-long
           width: 30%
    +
    +a
    --- End diff --
    
    This is kind of required to make the mouse change to pointer on hovering over the refresh button. But yes, will make it a little better.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by mxm <gi...@git.apache.org>.
Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r42351565
  
    --- Diff: flink-tests/src/test/java/org/apache/flink/test/web/WebFrontendITCase.java ---
    @@ -110,21 +112,18 @@ public void getTaskmanagers() {
     		}
     	}
     
    -// TODO activate this test after logging retrieval has been added to the new web frontend
    -//	@Test
    -//	public void getLogfiles() {
    -//		try {
    -//			String logPath = cluster.configuration().getString(ConfigConstants.JOB_MANAGER_WEB_LOG_PATH_KEY, null);
    -//			Assert.assertNotNull(logPath);
    -//			FileUtils.writeStringToFile(new File(logPath, "jobmanager-main.log"), "test content");
    -//
    -//			String logs = getFromHTTP("http://localhost:8081/logInfo");
    -//			Assert.assertTrue(logs.contains("test content"));
    -//		}catch(Throwable e) {
    -//			e.printStackTrace();
    -//			Assert.fail(e.getMessage());
    -//		}
    -//	}
    +	@Test
    +	public void getLogAndStdoutFiles() {
    +		try {
    +			String logs = getFromHTTP("http://localhost:" + port + "/jobmanager/log");
    +			Assert.assertTrue(logs.contains("job manager log"));
    +			logs = getFromHTTP("http://localhost:" + port + "/jobmanager/stdout");
    +			Assert.assertTrue(logs.contains("job manager out"));
    --- End diff --
    
    How about writing something to the log or stdout and checking for the result here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146217143
  
    @uce , @fhueske thanks for the review. 
    I've addressed all your concerns and am testing it right now.
    However, I'm not at all familiar with yarn and whether this will work with it or not. I'll see if I can setup yarn locally and test this out.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146752849
  
    IMO this can be merged as it works as expected in non-yarn mode. And the
    number of changes to be made are minimal when you finally merge your PR.
    I can remove the yarn specific changes in this and it should be mergeable
    for now. What do you think?
    On Oct 9, 2015 7:39 AM, "Robert Metzger" <no...@github.com> wrote:
    
    > @sachingoel0101 <https://github.com/sachingoel0101>: my pull request (
    > #1222 <https://github.com/apache/flink/pull/1222>) is actually based on
    > @uce <https://github.com/uce>'s PR (#1202
    > <https://github.com/apache/flink/pull/1202>). I'm not sure when I'll find
    > time to merge my PR.
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/flink/pull/1233#issuecomment-146737214>.
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by mxm <gi...@git.apache.org>.
Github user mxm commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-149200585
  
    Thanks. Looks great. Merging this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41393269
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -276,4 +294,18 @@ public int getServerPort() {
     	private static RuntimeMonitorHandler handler(RequestHandler handler) {
     		return new RuntimeMonitorHandler(handler);
     	}
    +
    +	private static String getFilePath(String pattern) {
    --- End diff --
    
    can you rename the function to `getLogFilePath()` or add `directory` parameter?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41395166
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -139,7 +148,14 @@ else if (flinkRoot != null) {
     			throw new IllegalConfigurationException("The path to the static contents (" + 
     					webRootDir.getAbsolutePath() + ") is not a readable directory.");
     		}
    -		
    +
    +		final File logStdoutDir = new File(flinkRoot, LOG_OUTPUT_DIRECTORY);
    --- End diff --
    
    i like `logDir` is more consistent


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41393603
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -276,4 +294,18 @@ public int getServerPort() {
     	private static RuntimeMonitorHandler handler(RequestHandler handler) {
     		return new RuntimeMonitorHandler(handler);
     	}
    +
    +	private static String getFilePath(String pattern) {
    --- End diff --
    
    FYI I'm testing this locally and will change some minor stuff.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146319734
  
    @uce, the new web dashboard doesn't work with yarn yet. The files are not shipped with the jar. I'm confused why it isn't being done so. The old frontend's files are included in the jar itself. 
    
    Also, I may have missed something in configuring things but I don't think the old one works either.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41398012
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java ---
    @@ -123,9 +124,18 @@ public void channelRead0(ChannelHandlerContext ctx, Routed routed) throws Except
     		final HttpRequest request = routed.request();
     		String requestPath = routed.path();
     
    +		// TODO REMOVE BEFORE COMMITTING. THIS IS ONLY TO TEST THAT JOB MANAGER STDOUT IS ACCESSED
    --- End diff --
    
    will do


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41395396
  
    --- Diff: flink-runtime-web/web-dashboard/app/styles/index.styl ---
    @@ -405,3 +405,7 @@ pre.exception
       .table
         td.td-long
           width: 30%
    +
    +a
    --- End diff --
    
    unrelated change. please revert


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146208103
  
    Just found two minor issues, but I'm not a web guy and have no clue of coffee script and .jade files...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146322559
  
    I have a pending pull request to enable it on YARN.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/1233#issuecomment-146433225
  
    @rmetzger , I looked at your changes to enable the dashboard on yarn. Looks good. :)
    
    A few comments to make sure this PR can directly start working after yours:
    I would like to rename the yarn log files to `jobmanager.log`, `jobmanager.out` and `jobmanager.err`. Can you do this with your commit?
    Further, the web runtime resources and log file paths are entirely different things. Right now, in normal mode, I can assume that the log files are present under the directory `flink.base.dir.key/log`. However, that won't be the case in yarn. What would be the best way to pass the log directory path to Web runtime? Should it be given as an argument or as an environment variable? I'm more inclined towards an ev.
    
    After you address my comments, I will rebase this on top of your PR and check if everything works. :)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by sachingoel0101 <gi...@git.apache.org>.
Github user sachingoel0101 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41397816
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/files/StaticFileServerHandler.java ---
    @@ -177,7 +187,11 @@ public void channelRead0(ChannelHandlerContext ctx, Routed routed) throws Except
     
     		HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
     		setContentTypeHeader(response, file);
    -		setDateAndCacheHeaders(response, file);
    +		// TODO This is counter-intuitive. Will be changed later when a dynamic file server is added
    --- End diff --
    
    This is to prevent the browser from caching the log or out files since they're highly dynamic. The refresh button will have no effect whatsoever otherwise.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2731][web-dashboard] Adds access to Job...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1233#discussion_r41395123
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -160,8 +176,10 @@ else if (flinkRoot != null) {
     			// the overview - how many task managers, slots, free slots, ...
     			.GET("/overview", handler(new ClusterOverviewHandler(retriever, DEFAULT_REQUEST_TIMEOUT)))
     
    -			// job manager configuration
    +			// job manager configuration, log and stdout
     			.GET("/jobmanager/config", handler(new JobManagerConfigHandler(config)))
    +			.GET("/jobmanager/logfile", new StaticFileServerHandler(logStdoutDir))
    --- End diff --
    
    log is fine imo


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---