Github user markgrover commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14270#discussion_r72307684
  
    --- Diff: 
core/src/main/scala/org/apache/spark/internal/config/package.scala ---
    @@ -103,4 +103,9 @@ package object config {
         .stringConf
         .checkValues(Set("hive", "in-memory"))
         .createWithDefault("in-memory")
    +
    +  // This property sets the root namespace for metrics reporting
    +  private[spark] val METRICS_NAMESPACE = 
ConfigBuilder("spark.metrics.namespace")
    +    .stringConf
    +    .createOptional
    --- End diff --
    
    Thanks, but I think that changes the semantics in cases where 
`spark.app.id` is not defined.
    Currently, the code [in this 
PR](https://github.com/apache/spark/pull/14270/files#diff-7ea2624e832b166ca27cd4baca8691d9R129)
 creates an Option with value `None` if `spark.app.id` is not defined. With the 
proposed change, it will create an Option with value literal `${spark.app.id}` 
if `spark.app.id` not defined. And, that changes the existing behavior. Even 
though in practice, I believe, `spark.app.id` is always defined, there are some 
tests in MetrisSystemSuite.scala that test the scenario when `spark.app.id` is 
not defined. And, I am hesitant to change that behavior.
    
    I suppose I could use `createWithDefault()` in package.scala for 
`METRICS_NAMESPACE` but then I'd have to check if there are any unresolved 
`spark.app.id` references in the value, but that'd be too big of a pain for not 
much benefit. So, I'd prefer to keep this the way it is.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to