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

[GitHub] spark pull request #13795: [SPARK-13792][SQL] Limit logging of bad records i...

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

    https://github.com/apache/spark/pull/13795#discussion_r67797705
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVRelation.scala ---
    @@ -109,23 +125,21 @@ object CSVRelation extends Logging {
               Some(row)
             } catch {
               case NonFatal(e) if params.dropMalformed =>
    -            logWarning("Parse exception. " +
    -              s"Dropping malformed line: ${tokens.mkString(params.delimiter.toString)}")
    +            if (numMalformedRows < params.maxMalformedLogPerPartition) {
    +              logWarning("Parse exception. " +
    +                s"Dropping malformed line: ${tokens.mkString(params.delimiter.toString)}")
    +            }
    +            if (numMalformedRows == params.maxMalformedLogPerPartition - 1) {
    +              logWarning(
    +                s"More than ${params.maxMalformedLogPerPartition} malformed records have been " +
    +                "found on this partition. Malformed records from now on will not be logged.")
    +            }
                 None
             }
           }
         }
       }
     
    -  def parseCsv(
    --- End diff --
    
    this was dead 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