Package org.apache.parquet.io
Class LocalOutputFile
- java.lang.Object
-
- org.apache.parquet.io.LocalOutputFile
-
- All Implemented Interfaces:
OutputFile
public class LocalOutputFile extends Object implements OutputFile
LocalOutputFileis an implementation needed by Parquet to write to local data files usingPositionOutputStreaminstances.
-
-
Constructor Summary
Constructors Constructor Description LocalOutputFile(Path file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PositionOutputStreamcreate(long blockSize)Opens a newPositionOutputStreamfor the data file to create.PositionOutputStreamcreateOrOverwrite(long blockSize)Opens a newPositionOutputStreamfor the data file to create or overwrite.longdefaultBlockSize()StringgetPath()booleansupportsBlockSize()
-
-
-
Constructor Detail
-
LocalOutputFile
public LocalOutputFile(Path file)
-
-
Method Detail
-
create
public PositionOutputStream create(long blockSize) throws IOException
Description copied from interface:OutputFileOpens a newPositionOutputStreamfor the data file to create.- Specified by:
createin interfaceOutputFile- Returns:
- a new
PositionOutputStreamto write the file - Throws:
IOException- if the stream cannot be opened
-
createOrOverwrite
public PositionOutputStream createOrOverwrite(long blockSize) throws IOException
Description copied from interface:OutputFileOpens a newPositionOutputStreamfor the data file to create or overwrite.- Specified by:
createOrOverwritein interfaceOutputFile- Returns:
- a new
PositionOutputStreamto write the file - Throws:
IOException- if the stream cannot be opened
-
supportsBlockSize
public boolean supportsBlockSize()
- Specified by:
supportsBlockSizein interfaceOutputFile- Returns:
- a flag indicating if block size is supported.
-
defaultBlockSize
public long defaultBlockSize()
- Specified by:
defaultBlockSizein interfaceOutputFile- Returns:
- the default block size.
-
getPath
public String getPath()
- Specified by:
getPathin interfaceOutputFile- Returns:
- the path of the file, as a
String.
-
-