honor conf "mapreduce.outputcommitter.factory.class" with PathOutputCommitterFactory in ParquetOutputFormat.getOutputCommitter
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.6k
- 平均合并
- 3 天 12 小时
- 30 天内合并 PR
- 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 进行比较。审查 pull request #1243 和 #1244;完成标准是遵循 mapreduce.outputcommitter.factory.class 配置,同时不丢失 Parquet 的 output-commit 行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- distributed-systems
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100