Skip to content

[SPARK-18191][CORE][FOLLOWUP] Call setConf if OutputFormat is Configurable.#15823

Closed
jiangxb1987 wants to merge 2 commits into
apache:masterfrom
jiangxb1987:config-format
Closed

[SPARK-18191][CORE][FOLLOWUP] Call setConf if OutputFormat is Configurable.#15823
jiangxb1987 wants to merge 2 commits into
apache:masterfrom
jiangxb1987:config-format

Conversation

@jiangxb1987

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

cc @rxin @mridulm


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

@rxin rxin Nov 9, 2016

Copy link
Copy Markdown
Contributor

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

rxin commented Nov 9, 2016

Copy link
Copy Markdown
Contributor

LGTM otherwise.

@SparkQA

SparkQA commented Nov 9, 2016

Copy link
Copy Markdown

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

mridulm commented Nov 9, 2016

Copy link
Copy Markdown
Contributor

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

@SparkQA

SparkQA commented Nov 9, 2016

Copy link
Copy Markdown

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

rxin commented Nov 9, 2016

Copy link
Copy Markdown
Contributor

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 <jiangxb1987@gmail.com>

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