You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ganonp <gi...@git.apache.org> on 2015/01/20 12:39:16 UTC
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
GitHub user ganonp opened a pull request:
https://github.com/apache/spark/pull/4120
[SPARK-5311][core] Corrected EventLoggingListener throws exception if log directory does not exist
Corrected exception handling:
Now instead of blocking execution, when the baselogpath refers to a nonexistant directory, one is created at the baselogpath location. As intended, if the baselogpath is a file and not a directory, an exception is thrown.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ganonp/spark apache-master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/4120.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 #4120
----
commit 1867869f5dbc19584e9f2827c440bd0134ab84e9
Author: ganonp <ga...@gmail.com>
Date: 2014-12-14T23:05:01Z
Added setMinCount method to Word2Vec
Converted minCount from val to var and created setMinCount method.
Allows one to set the minimum number of times a word must be present to
be included into the vocabulary.
commit 3060b24c682e9230da7aa8e4612fe33204309fc6
Author: ganonp <ga...@gmail.com>
Date: 2015-01-19T07:14:58Z
Revert "Added setMinCount method to Word2Vec"
This reverts commit 1867869f5dbc19584e9f2827c440bd0134ab84e9.
commit be3cd809c9e371d7f5d13191457e1f0cc1ad075e
Author: ganonp <ga...@gmail.com>
Date: 2015-01-19T07:15:42Z
update
commit f06caccb71ed73d8e5b9d8e1d9f7218845bf1fbf
Author: ganonp <ga...@gmail.com>
Date: 2015-01-19T07:15:54Z
Merge branch 'master' of https://github.com/apache/spark into apache-master
commit f5774d27cfb3388b6c9f4f3ae673df90f7e84a0b
Author: Ganon <ga...@gmail.com>
Date: 2015-01-20T09:15:46Z
Corrects Issue SPARK-5311
Issue Description: EventLoggingListener throws exception if log directory does not exist
Replaced with code that uses a try catch with getFileStatus method to first determine if the file exists (if it doesn't it is created in the catch block), if it does exist, then an exception is thrown if the file is not a directory.
commit 13391307406224898d6abbff47aa3eaa9069208f
Author: Ganon <ga...@gmail.com>
Date: 2015-01-20T09:57:22Z
Update EventLoggingListener.scala
commit 7b106e2312c7a1a06bd9c77de701e23c82cb5221
Author: Ganon <ga...@gmail.com>
Date: 2015-01-20T10:16:20Z
Update EventLoggingListener.scala
commit 3df637b551be58ed94f92e11a9735232ba95686c
Author: Ganon <ga...@gmail.com>
Date: 2015-01-20T10:31:56Z
Update EventLoggingListener.scala
commit 4d3b84b84fe53a84bafebd57c15c51434caa6fa7
Author: Ganon <ga...@gmail.com>
Date: 2015-01-20T10:48:34Z
Update EventLoggingListener.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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23242552
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
+ if(!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()){
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+
+ }
+ catch{
--- End diff --
nit: this goes in the previous line.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by ganonp <gi...@git.apache.org>.
Github user ganonp commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70932707
Yeah, I will do that shortly. I got a little ahead of myself on this pull request, as I thought the fileSystem.getfilestatus check and fileSystem.mkdirs had resolved the problem before I had adequately tested. Unfortunately, now I'm getting new exceptions a little further down in the EventLoggingListener class. I've made some changes and am currently rebuilding spark and testing.
In the meantime, is the proper protocol to close the pull request until I have it working correctly, or do I leave it open since it should be in working order shortly?
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by ganonp <gi...@git.apache.org>.
Github user ganonp commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23337178
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,13 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
+ if( !fileSystem.getFileStatus( new Path( logBaseDir ) ).isDir() ){
--- End diff --
Sorry, I'm losing my mind, I changed it to that, then I saw his, and I thought he had changed it. Should be right 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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23242522
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
--- End diff --
nit: you needs spaces after `{` and `(` in all your code.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71389714
[Test build #26067 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26067/consoleFull) for PR 4120 at commit [`c2c2001`](https://github.com/apache/spark/commit/c2c2001a856a0583bea58d5e8396da2ab95fd38e).
* This patch merges cleanly.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70641651
Can one of the admins verify this patch?
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70933381
It's fine to leave the PR open if you're still planning to work on it. Just make sure to leave a comment to ping us when you bring it up to date.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23253261
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
+ if(!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()){
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+
+ }
+ catch{
+ case ioe: FileNotFoundException => fileSystem.mkdirs(new Path(logBaseDir))
--- End diff --
Let's at log a warning before creating this since as @vanzin points out, it may not have correct permissions for downstream consumers.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r24126641
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,17 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try {
+ if (!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()) {
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+ } catch {
+ case ioe: FileNotFoundException => {
+ logWarning(s"Log directory $logBaseDir does not exist. Creating with default file " +
+ "permissions...")
+ new File(logBaseDir).mkdir()
--- End diff --
Actually, scratch that: the old behavior was to use `mkdirs`. Sigh...
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by ganonp <gi...@git.apache.org>.
Github user ganonp commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23331168
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
--- End diff --
Do I need them before the closing } and ) as well?
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70923856
Also, you still need to undo the mode change on `make-distribution.sh`.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71392752
[Test build #26067 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26067/consoleFull) for PR 4120 at commit [`c2c2001`](https://github.com/apache/spark/commit/c2c2001a856a0583bea58d5e8396da2ab95fd38e).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r24126352
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,17 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try {
+ if (!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()) {
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+ } catch {
+ case ioe: FileNotFoundException => {
+ logWarning(s"Log directory $logBaseDir does not exist. Creating with default file " +
+ "permissions...")
+ new File(logBaseDir).mkdir()
--- End diff --
We should remove this line, since we need to use `fileSystem` to create the file. Also, I think we should use `mkdir` and not `mkdirs`, since I think that the old code failed if they didn't exist.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71929366
[Test build #26259 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26259/consoleFull) for PR 4120 at commit [`c2c2001`](https://github.com/apache/spark/commit/c2c2001a856a0583bea58d5e8396da2ab95fd38e).
* This patch **does not merge cleanly**.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23337718
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,12 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try {
+ if (!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()) {
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+ } catch {
+ case ioe: FileNotFoundException => fileSystem.mkdirs(new Path(logBaseDir))
--- End diff --
Per @pwendell's earlier comment, I think we should check whether `logBaseDir` already exists and log a warning if it's being automatically created to let users know that it could potentially have wider directory permissions than they intended.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r24127152
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,17 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try {
+ if (!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()) {
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+ } catch {
+ case ioe: FileNotFoundException => {
+ logWarning(s"Log directory $logBaseDir does not exist. Creating with default file " +
+ "permissions...")
+ new File(logBaseDir).mkdir()
--- End diff --
Yeah, I mixed two comments into one: we need to remove this line, but I was referring to `mkdir` vs `mkdirs` in the line below.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by ganonp <gi...@git.apache.org>.
Github user ganonp commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70935824
Cool, thanks
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by ganonp <gi...@git.apache.org>.
Github user ganonp commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23332402
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
--- End diff --
Ok, got it, sorry and thanks for correcting it. I read the style guid last time I contributed, but obviously forgot and didn't look at it again this time. However, I did use the scalastyle script in the dev folder this time and it said everything was good, so I probably need to figure out what I did wrong with that.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/4120
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by CodingCat <gi...@git.apache.org>.
Github user CodingCat commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23218213
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try(
--- End diff --
I think they prefer {} to ()
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-72954989
Actually, maybe we don't want to fix this: the old behavior was pretty bad since it might create an entire hierarchy of directories with the default permissions. @andrewor14, do you have any thoughts on 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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71389518
Jenkins, this is ok to test.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r24126921
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,17 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try {
+ if (!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()) {
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+ } catch {
+ case ioe: FileNotFoundException => {
+ logWarning(s"Log directory $logBaseDir does not exist. Creating with default file " +
+ "permissions...")
+ new File(logBaseDir).mkdir()
--- End diff --
Wait. This line does need to be removed. The correct `FileSystem` call is right below.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23331676
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
--- End diff --
Here's our code style guide: https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide
The Spark style would format the code like this:
```scala
try {
if (!filesystem.getFileStatus(newPath(logBaseDir)).isDir()) {
throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
}
} catch {
case ioe: FileNotFoundException => fileSystem.mkdirs(newPath(logBaseDir)))
}
```
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71928493
Jenkins, retest this please.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71944078
[Test build #26259 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26259/consoleFull) for PR 4120 at commit [`c2c2001`](https://github.com/apache/spark/commit/c2c2001a856a0583bea58d5e8396da2ab95fd38e).
* This patch **passes all tests**.
* This patch **does not merge cleanly**.
* This patch adds no public classes.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70704368
Doesn't seem like you should be touching the `make-distribution.sh` script.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by CodingCat <gi...@git.apache.org>.
Github user CodingCat commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70645559
it seems that the change of the mode of make-distribution.sh is introduced by accident...we need recover that?
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70704744
We should also add a regression test to EventLoggingListenerSuite; this can try to use a non-existent subdirectory of the test directory as the event log dir.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23335194
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,13 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try{
+ if( !fileSystem.getFileStatus( new Path( logBaseDir ) ).isDir() ){
--- End diff --
This is still not right. Just take a look at the code Josh posted, or the code you're replacing. Basically, do this:
if (foo) {
Not this:
if( foo ){
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by CodingCat <gi...@git.apache.org>.
Github user CodingCat commented on a diff in the pull request:
https://github.com/apache/spark/pull/4120#discussion_r23218200
--- Diff: core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -86,8 +86,14 @@ private[spark] class EventLoggingListener(
* Creates the log file in the configured log directory.
*/
def start() {
- if (!fileSystem.isDirectory(new Path(logBaseDir))) {
- throw new IllegalArgumentException(s"Log directory $logBaseDir does not exist.")
+ try(
+ if(!fileSystem.getFileStatus(new Path(logBaseDir)).isDir()){
+ throw new IllegalArgumentException(s"Log directory $logBaseDir is not a directory.")
+ }
+
--- End diff --
this is an extra line?
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-73578333
@ganonp I agree with @JoshRosen that we should probably not arbitrarily create the directory for the user if it doesn't exist. The semantics of the `spark.eventLog.dir` should be that "this is an existing directory and I want to use it to put my event logs". Would you mind closing this PR then?
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71944085
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26259/
Test PASSed.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-70704888
It's a little sketchy to have the app create this directory, since it will probably not do so with the desired permissions. But if that's the old behavior, well, guess it will have to 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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-5311][core] Corrected EventLoggingListe...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/4120#issuecomment-71392756
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26067/
Test FAILed.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org