apache / apache/parquet-java

implicitly defining DEBUG mode in MessageColumnIO causes 80% performance overhead

Aperta
#1,622 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Component: Parquet Priority: Critical Type: bug
Lingua principale
Java
Stelle
3.1k
Fork
1.6k
Merge medio
3g 12h
PR unite (30g)
33

Descrizione

**parquet-column** jar leverages slf4j and log4j as default logger, neglecting to define a log4j configuration, defaults to **DEBUG** log level.

 
```java

public class MessageColumnIO extends GroupColumnIO {
private static final Logger LOG = LoggerFactory.getLogger(MessageColumnIO.class);

private static final boolean DEBUG = LOG.isDebugEnabled(); // <------
}
```
 

this "magic behavior" defaults parquet library to be in DEBUG mode, without any notification or warnings. Unfortunately, the **RecordConsumerLoggingWrapper** implementation generates 5x performance overhead in comparison to the **MessageColumnIORecordConsumer** implementation, causing a massive hit in performance and wasteful server utilization.

 

IMHO there are two things that could prevent such issue:
- printing a message to STDOUT notifying about DEBUG mode being set to active.
- defaulting to **MessageColumnIORecordConsumer** implementation, and waiting for explicit configuration to define DEBUG mode, and use **RecordConsumerLoggingWrapper**.

 

In the past 2 years, this issue probably cost my company 50,000$ in excessive cloud costs!

**Reporter**: [Elad Yosifon](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=elad_yosifon)

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia da MessageColumnIO e verifica come LOG.isDebugEnabled() seleziona tra MessageColumnIORecordConsumer e RecordConsumerLoggingWrapper. Traccia la configurazione del logger e gli eventuali test delle prestazioni o benchmark esistenti; il lavoro è completo quando DEBUG non è abilitato implicitamente e il consumer normale evita l’overhead segnalato, a meno che non sia configurato esplicitamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
data-engineering, performance
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.