apache / apache/parquet-java

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

Offen
#1,685 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Component: Parquet Priority: Minor Type: bug
Vorherrschende Sprache
Java
Sterne
3.1k
Forks
1.6k
Ø Merge
3 T. 12 Std.
Gemergte PRs (30 T.)
33

Beschreibung

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.*

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginnen Sie bei org.apache.parquet.hadoop.ParquetOutputFormat.getOutputCommitter und vergleichen Sie dessen fest codierte Konstruktion von ParquetOutputCommitter mit FileOutputFormat.getOutputCommitter und PathOutputCommitterFactory. Prüfen Sie die Pull Requests #1243 und #1244; als erledigt gilt die Aufgabe, wenn die Konfiguration mapreduce.outputcommitter.factory.class berücksichtigt wird, ohne das Parquet-Output-Commit-Verhalten zu verlieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
distributed-systems
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.