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

    https://github.com/apache/spark/pull/10835#discussion_r50742799
  
    --- Diff: core/src/main/scala/org/apache/spark/InternalAccumulator.scala ---
    @@ -17,42 +17,193 @@
     
     package org.apache.spark
     
    +import org.apache.spark.storage.{BlockId, BlockStatus}
     
    -// This is moved to its own file because many more things will be added to 
it in SPARK-10620.
    +
    +/**
    + * A collection of fields and methods concerned with internal accumulators 
that represent
    + * task level metrics.
    + */
     private[spark] object InternalAccumulator {
    -  val PEAK_EXECUTION_MEMORY = "peakExecutionMemory"
    -  val TEST_ACCUMULATOR = "testAccumulator"
    -
    -  // For testing only.
    -  // This needs to be a def since we don't want to reuse the same 
accumulator across stages.
    -  private def maybeTestAccumulator: Option[Accumulator[Long]] = {
    -    if (sys.props.contains("spark.testing")) {
    -      Some(new Accumulator(
    -        0L, AccumulatorParam.LongAccumulatorParam, Some(TEST_ACCUMULATOR), 
internal = true))
    -    } else {
    -      None
    +
    +  import AccumulatorParam._
    +
    +  // Prefixes used in names of internal task level metrics
    +  val METRICS_PREFIX = "internal.metrics."
    +  val SHUFFLE_READ_METRICS_PREFIX = METRICS_PREFIX + "shuffle.read."
    +  val SHUFFLE_WRITE_METRICS_PREFIX = METRICS_PREFIX + "shuffle.write."
    +  val OUTPUT_METRICS_PREFIX = METRICS_PREFIX + "output."
    +  val INPUT_METRICS_PREFIX = METRICS_PREFIX + "input."
    +
    +  // Names of internal task level metrics
    +  val EXECUTOR_DESERIALIZE_TIME = METRICS_PREFIX + 
"executorDeserializeTime"
    +  val EXECUTOR_RUN_TIME = METRICS_PREFIX + "executorRunTime"
    +  val RESULT_SIZE = METRICS_PREFIX + "resultSize"
    +  val JVM_GC_TIME = METRICS_PREFIX + "jvmGCTime"
    +  val RESULT_SERIALIZATION_TIME = METRICS_PREFIX + 
"resultSerializationTime"
    +  val MEMORY_BYTES_SPILLED = METRICS_PREFIX + "memoryBytesSpilled"
    +  val DISK_BYTES_SPILLED = METRICS_PREFIX + "diskBytesSpilled"
    +  val PEAK_EXECUTION_MEMORY = METRICS_PREFIX + "peakExecutionMemory"
    +  val UPDATED_BLOCK_STATUSES = METRICS_PREFIX + "updatedBlockStatuses"
    +  val TEST_ACCUM = METRICS_PREFIX + "testAccumulator"
    +
    +  // scalastyle:off
    --- End diff --
    
    what do you mean? The style it's complaining about is objects must begin 
with upper case, but I don't want that 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to