Package org.apache.iceberg.parquet
Class ParquetWriteAdapter<D>
- java.lang.Object
-
- org.apache.iceberg.parquet.ParquetWriteAdapter<D>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,FileAppender<D>
public class ParquetWriteAdapter<D> extends java.lang.Object implements FileAppender<D>
-
-
Constructor Summary
Constructors Constructor Description ParquetWriteAdapter(org.apache.parquet.hadoop.ParquetWriter<D> writer, MetricsConfig metricsConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(D datum)
void
close()
long
length()
Metrics
metrics()
java.util.List<java.lang.Long>
splitOffsets()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.io.FileAppender
addAll, addAll
-
-
-
-
Constructor Detail
-
ParquetWriteAdapter
public ParquetWriteAdapter(org.apache.parquet.hadoop.ParquetWriter<D> writer, MetricsConfig metricsConfig)
-
-
Method Detail
-
add
public void add(D datum)
- Specified by:
add
in interfaceFileAppender<D>
-
metrics
public Metrics metrics()
- Specified by:
metrics
in interfaceFileAppender<D>
- Returns:
Metrics
for this file. Only valid after the file is closed.
-
length
public long length()
- Specified by:
length
in interfaceFileAppender<D>
- Returns:
- the length of this file.
-
splitOffsets
public java.util.List<java.lang.Long> splitOffsets()
- Specified by:
splitOffsets
in interfaceFileAppender<D>
- Returns:
- a list of recommended split locations, if applicable, null otherwise. When available, this information is used for planning scan tasks whose boundaries are determined by these offsets. The returned list must be sorted in ascending order. Only valid after the file is closed.
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-