All Downloads are FREE. Search and download functionalities are using the official Maven repository.

parquet.hadoop.api.DelegatingWriteSupport Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
package parquet.hadoop.api;

import org.apache.hadoop.conf.Configuration;

import parquet.io.api.RecordConsumer;

/**
 *
 * Helps composing write supports
 *
 * @author Julien Le Dem
 *
 * @param 
 */
public class DelegatingWriteSupport extends WriteSupport {

  private final WriteSupport delegate;

  public DelegatingWriteSupport(WriteSupport delegate) {
    super();
    this.delegate = delegate;
  }

  @Override
  public WriteSupport.WriteContext init(Configuration configuration) {
    return delegate.init(configuration);
  }

  @Override
  public void prepareForWrite(RecordConsumer recordConsumer) {
    delegate.prepareForWrite(recordConsumer);
  }

  @Override
  public void write(T record) {
    delegate.write(record);
  }

  @Override
  public WriteSupport.FinalizedWriteContext finalizeWrite() {
    return delegate.finalizeWrite();
  }

  @Override
  public String toString() {
    return getClass().getName() + "(" + delegate.toString() + ")";
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy