spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JoshRosen <>
Subject [GitHub] spark pull request: [SPARK-4961] [CORE] Put HadoopRDD.getPartition...
Date Mon, 29 Dec 2014 19:48:42 GMT
Github user JoshRosen commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala ---
    @@ -203,9 +204,27 @@ class HadoopRDD[K, V](
         for (i <- 0 until inputSplits.size) {
           array(i) = new HadoopPartition(id, i, inputSplits(i))
    +    logDebug("Get these partitions took %f s".format((System.nanoTime - start) / 1e9))
    +  @transient private var thesePartitions_ : Array[Partition] = {
    +    try {
    +      getThesePartitions()
    +    } catch {
    +      case e: Exception => 
    +        logDebug("Error initializing HadoopRDD's partitions", e)
    +        null
    --- End diff --
    (This comment is kind of moot since I proposed a more general fix in a top-level comment,
but I'll still post it anyways:)
    I don't think that logging an exception at debug level then returning `null` is a good
error-handling strategy; this is likely to cause a confusing NPE somewhere else with no obvious
cause since most users won't have debug-level logging enabled.

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message