Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIVY-257. access log is not available #239

Merged
merged 3 commits into from Dec 2, 2016
Merged

LIVY-257. access log is not available #239

merged 3 commits into from Dec 2, 2016

Conversation

zjffdu
Copy link
Contributor

@zjffdu zjffdu commented Nov 29, 2016

Straightforward bugfix for access log file.

@jerryshao
Copy link
Contributor

LGTM, the test failure should also be fixed.

@@ -693,6 +695,7 @@
<environmentVariables>
<LIVY_TEST>true</LIVY_TEST>
<SPARK_HOME>${spark.home}</SPARK_HOME>
<LIVY_LOG_DIR>${livy.log.dir}</LIVY_LOG_DIR>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this change the log output dir for integration test, previously it is under miniLivyMain.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still under miniLivyMain, but the access log is under target

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks.

@codecov-io
Copy link

codecov-io commented Nov 30, 2016

Current coverage is 71.92% (diff: 100%)

Merging #239 into master will increase coverage by 0.05%

@@             master       #239   diff @@
==========================================
  Files            90         90          
  Lines          4539       4541     +2   
  Methods           0          0          
  Messages          0          0          
  Branches        772        772          
==========================================
+ Hits           3262       3266     +4   
+ Misses          828        826     -2   
  Partials        449        449          

Powered by Codecov. Last update f52c0d9...b423a95

@@ -71,6 +71,8 @@
<test.redirectToFile>true</test.redirectToFile>
<execution.root>${user.dir}</execution.root>
<spark.home>${execution.root}/dev/spark</spark.home>
<!-- used for testing, NCSARequestLog use it for access log -->
<livy.log.dir>${basedir}/target</livy.log.dir>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Mind if we keep it under MiniLivyMain for integration test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I put it in parent is that HttpClientSpec also use WebServer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@@ -74,12 +72,14 @@ class WebServer(livyConf: LivyConf, var host: String, var port: Int) extends Log
val handlers = new HandlerCollection
handlers.addHandler(context)

// configure the access log
// configure the access log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

// Configure the access log

val requestLogHandler = new RequestLogHandler
val requestLog = new NCSARequestLog("/jetty-yyyy_mm_dd.request.log")
val requestLog = new NCSARequestLog(sys.env.getOrElse("LIVY_LOG_DIR",
sys.env("LIVY_HOME") + "/logs") + "/jetty-yyyy_mm_dd.request.log")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: name it "yyyy_mm_dd.request.log" instead of "jetty-yyyy_mm_dd.request.log"

@alex-the-man
Copy link
Contributor

LGTM.

@alex-the-man alex-the-man merged commit 2a8e9cf into cloudera:master Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants