Skip to content

Conversation

@jiangxb1987
Copy link
Contributor

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

How was this patch tested?

Add test of this case in PairRDDFunctionsSuite.

@jiangxb1987
Copy link
Contributor Author

cc @rxin @mridulm


protected def setupCommitter(context: TaskAttemptContext): OutputCommitter = {
context.getOutputFormatClass.newInstance().getOutputCommitter(context)
val format = context.getOutputFormatClass.newInstance
Copy link
Contributor

@rxin rxin Nov 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use newInstance() since it is not just a simple getter.

@rxin
Copy link
Contributor

rxin commented Nov 9, 2016

LGTM otherwise.

@SparkQA
Copy link

SparkQA commented Nov 9, 2016

Test build #68384 has finished for PR 15823 at commit 51d1fbe.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mridulm
Copy link
Contributor

mridulm commented Nov 9, 2016

LGTM. Not at my laptop, would be great if you can merge @rxin, thanks.

@SparkQA
Copy link

SparkQA commented Nov 9, 2016

Test build #68391 has finished for PR 15823 at commit 4e79c37.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Nov 9, 2016

Merging in master.

@asfgit asfgit closed this in 64fbdf1 Nov 9, 2016
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
…nfigurable`.

## 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 apache#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`.

Author: jiangxingbo <[email protected]>

Closes apache#15823 from jiangxb1987/config-format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants