You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rahulsinghaliitd <gi...@git.apache.org> on 2014/06/12 12:56:48 UTC

[GitHub] spark pull request: SPARK-2127: Use application specific folders t...

GitHub user rahulsinghaliitd opened a pull request:

    https://github.com/apache/spark/pull/1067

    SPARK-2127: Use application specific folders to dump metrics via CsvSink

    Generate an unique app name which is used to create events and metric folders.

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

    $ git pull https://github.com/Guavus/spark SPARK-2127

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

    https://github.com/apache/spark/pull/1067.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 #1067
    
----
commit f56b421e11ad30228a4bc66e84fac52b1ede5fd2
Author: Rahul Singhal <ra...@guavus.com>
Date:   2014-06-12T10:42:45Z

    SPARK-2127: Use application specific folders to dump metrics via CsvSink
    
    Generate an unique app name which is used to create events and metric folders.

----


---
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] spark pull request: SPARK-2127: Use application specific folders t...

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

    https://github.com/apache/spark/pull/1067#discussion_r13701712
  
    --- Diff: core/src/main/scala/org/apache/spark/metrics/sink/CsvSink.scala ---
    @@ -53,11 +53,14 @@ private[spark] class CsvSink(val property: Properties, val registry: MetricRegis
         case None => CSV_DEFAULT_DIR
       }
     
    +  val file= new File(pollDir + conf.get("spark.app.uniqueName"))
    --- End diff --
    
    @jerryshao Thanks for the feedback! I was not aware of the fact the SparkEnv provides access to SparkConf. Will follow up with the suggested modification.


---
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] spark pull request: SPARK-2127: Use application specific folders t...

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

    https://github.com/apache/spark/pull/1067#discussion_r13700626
  
    --- Diff: core/src/main/scala/org/apache/spark/metrics/sink/CsvSink.scala ---
    @@ -53,11 +53,14 @@ private[spark] class CsvSink(val property: Properties, val registry: MetricRegis
         case None => CSV_DEFAULT_DIR
       }
     
    +  val file= new File(pollDir + conf.get("spark.app.uniqueName"))
    --- End diff --
    
    Hi @rahulsinghaliitd , do we really need to use `SparkConf` to get this unique app name? I think metrics system is driven by its own configuration system, here you involved `SparkConf` as another configuration system just only for `CsvSink`, this will give people the chance to bypass the original way and lose its controllability. I think it would be nice to modify the way to get `appUniqueName` (eg. get it from SparkEnv).


---
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] spark pull request: SPARK-2127: Use application specific folders t...

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

    https://github.com/apache/spark/pull/1067#discussion_r13703371
  
    --- Diff: core/src/main/scala/org/apache/spark/metrics/sink/CsvSink.scala ---
    @@ -53,11 +53,14 @@ private[spark] class CsvSink(val property: Properties, val registry: MetricRegis
         case None => CSV_DEFAULT_DIR
       }
     
    +  val file= new File(pollDir + conf.get("spark.app.uniqueName"))
    --- End diff --
    
    Forgot to mention that several sinks like CsvSink will be started in master and worker for standalone mode if configured, in this situation you may not get unique app name or SparkEnv (something created only when app started). So maybe you should consider this situation when there's no app name available.


---
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] spark pull request: SPARK-2127: Use application specific folders t...

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

    https://github.com/apache/spark/pull/1067#issuecomment-54694669
  
    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-2127: Use application specific folders t...

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

    https://github.com/apache/spark/pull/1067#discussion_r13741193
  
    --- Diff: core/src/main/scala/org/apache/spark/metrics/sink/CsvSink.scala ---
    @@ -53,11 +53,14 @@ private[spark] class CsvSink(val property: Properties, val registry: MetricRegis
         case None => CSV_DEFAULT_DIR
       }
     
    +  val file= new File(pollDir + conf.get("spark.app.uniqueName"))
    --- End diff --
    
    Hi @jerryshao ,
    
    1. At the moment the Sinks are being created, SparkEnv has not been created. I may be able to modify the Properties being passed to this Sink or even get the SparkConf from SecurityManager. But neither of those approaches seems generic to me. For e.g. we will need hadoopConf if we wanted the csv directory to be on HDFS.
    
    2. Thanks for pointing out the problem with Master and Worker. I have for now added app names to these classes. Please let me know if you think adding null checks in CsvSink would also be useful.


---
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] spark pull request: SPARK-2127: Use application specific folders t...

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

    https://github.com/apache/spark/pull/1067#issuecomment-45878079
  
    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.
---

[GitHub] spark pull request: SPARK-2127: Use application specific folders t...

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

    https://github.com/apache/spark/pull/1067


---
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