[GitHub] spark pull request #15823: [SPARK-18191][CORE][FOLLOWUP] Call `setConf` if `...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/15823 --- 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
[GitHub] spark pull request #15823: [SPARK-18191][CORE][FOLLOWUP] Call `setConf` if `...
Github user rxin commented on a diff in the pull request: https://github.com/apache/spark/pull/15823#discussion_r87134013 --- Diff: core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala --- @@ -42,7 +43,13 @@ class HadoopMapReduceCommitProtocol(jobId: String, path: String) @transient private var committer: OutputCommitter = _ protected def setupCommitter(context: TaskAttemptContext): OutputCommitter = { -context.getOutputFormatClass.newInstance().getOutputCommitter(context) +val format = context.getOutputFormatClass.newInstance --- End diff -- use `newInstance()` since it clearly has side effects. --- 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
[GitHub] spark pull request #15823: [SPARK-18191][CORE][FOLLOWUP] Call `setConf` if `...
GitHub user jiangxb1987 opened a pull request: https://github.com/apache/spark/pull/15823 [SPARK-18191][CORE][FOLLOWUP] Call `setConf` if `OutputFormat` is `Configurable`. ## What changes were proposed in this pull request? We should call `setConf` if `OutputFormat` is `Configurable`, this should be done before we create `OutputCommitter` and `RecordWriter`. This is follow up of #15769, see discussion [here](https://github.com/apache/spark/pull/15769/files#r87064229) ## How was this patch tested? Add test of this case in `PairRDDFunctionsSuite`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jiangxb1987/spark config-format Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/15823.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #15823 commit 51d1fbe464fa49f4503435f0f10790d8f1ec35ad Author: jiangxingbo Date: 2016-11-09T03:15:38Z If outputFormat is Configurable, we should call setConf to it. --- 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