apache / apache/parquet-java

honor conf "mapreduce.outputcommitter.factory.class" with PathOutputCommitterFactory in ParquetOutputFormat.getOutputCommitter

オープン
#1,685 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
Component: Parquet Priority: Minor Type: bug
主要言語
Java
スター
3.1k
フォーク
1.6k
平均マージ
3日 12時間
マージ済み PR(30日)
33

説明

The class ParquetOutputFormat extends org.apache.hadoop.mapreduce.lib.output.FileOutputFormat and override method getOutputCommitter(TaskAttemptContext), but unfortunatly, it replaces by a hard-coded new class instead of configurable factory PathOutputCommitterFactory that use configuration property "mapreduce.outputcommitter.factory.class"

See bugged overriding code :

```java

package org.apache.parquet.hadoop;

import org.apache.hadoop.mapreduce.OutputCommitter;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.PathOutputCommitter;

public class ParquetOutputFormat extends FileOutputFormat {

public synchronized OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException {
if (this.committer == null) {
Path output = getOutputPath(context);
committer = new ParquetOutputCommitter(output, context); // <== BUG: hard coded class, ignore propoerty "mapreduce.outputcommitter.factory.class"
}
return this.committer;
}

```

See overriden code:

```java

package org.apache.hadoop.mapreduce.lib.output;

public abstract class FileOutputFormat extends OutputFormat {

@Override
public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException {
if (committer == null) {
Path output = getOutputPath(context);
committer = PathOutputCommitterFactory.getCommitterFactory(output, context.getConfiguration()).createOutputCommitter(output, context); // <== OK: configurable factory, accept property "mapreduce.outputcommitter.factory.class"
}
return committer;
}
```

**Reporter**: [Arnaud Nauwynck](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=arnaud.nauwynck)
#### Related issues:
- [performance problem in FileOutputCommitter for big list processed by single thread](https://issues.apache.org/jira/browse/MAPREDUCE-7465) (is related to)
#### PRs and other links:
- [GitHub Pull Request #1243](https://github.com/apache/parquet-mr/pull/1243)
- [GitHub Pull Request #1244](https://github.com/apache/parquet-mr/pull/1244)

**Note**: *This issue was originally created as [PARQUET-2416](https://issues.apache.org/jira/browse/PARQUET-2416). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

org.apache.parquet.hadoop.ParquetOutputFormat.getOutputCommitter から始め、ハードコードされた ParquetOutputCommitter の構築と FileOutputFormat.getOutputCommitter および PathOutputCommitterFactory を比較します。プルリクエスト #1243 と #1244 を確認してください。mapreduce.outputcommitter.factory.class の設定が尊重され、Parquet の output-commit 動作が失われなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
distributed-systems
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。