spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <...@git.apache.org>
Subject [GitHub] spark pull request #15580: [SPARK-18042][SQL] OutputWriter should expose fil...
Date Fri, 21 Oct 2016 08:53:19 GMT
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15580#discussion_r84442086
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetOutputWriter.scala
---
    @@ -140,16 +143,17 @@ private[parquet] class ParquetOutputWriter(
         context: TaskAttemptContext)
       extends OutputWriter {
     
    +  override val path: String = {
    +    val filename = fileNamePrefix + CodecConfig.from(context).getCodec.getExtension +
".parquet"
    +    new Path(stagingDir, filename).toString
    +  }
    +
       private val recordWriter: RecordWriter[Void, InternalRow] = {
    -    val outputFormat = {
    -      new ParquetOutputFormat[InternalRow]() {
    -        override def getDefaultWorkFile(context: TaskAttemptContext, extension: String):
Path = {
    -          new Path(stagingDir, fileNamePrefix + extension)
    -        }
    +    new ParquetOutputFormat[InternalRow]() {
    +      override def getDefaultWorkFile(context: TaskAttemptContext, extension: String):
Path = {
    --- End diff --
    
    now we never use the `context` and `extension` parameters?


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


Mime
View raw message