File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
parquet-common/src/main/java/org/apache/parquet/io Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 3030 */
3131public class LocalOutputFile implements OutputFile {
3232
33+ private static final int BUFFER_SIZE_DEFAULT = 4096 ;
34+
3335 private class LocalPositionOutputStream extends PositionOutputStream {
3436
3537 private final BufferedOutputStream stream ;
@@ -80,24 +82,24 @@ public LocalOutputFile(Path file) {
8082 }
8183
8284 @ Override
83- public PositionOutputStream create (long buffer ) throws IOException {
84- return new LocalPositionOutputStream (( int ) buffer , StandardOpenOption .CREATE_NEW );
85+ public PositionOutputStream create (long blockSize ) throws IOException {
86+ return new LocalPositionOutputStream (BUFFER_SIZE_DEFAULT , StandardOpenOption .CREATE_NEW );
8587 }
8688
8789 @ Override
88- public PositionOutputStream createOrOverwrite (long buffer ) throws IOException {
90+ public PositionOutputStream createOrOverwrite (long blockSize ) throws IOException {
8991 return new LocalPositionOutputStream (
90- ( int ) buffer , StandardOpenOption .CREATE , StandardOpenOption .TRUNCATE_EXISTING );
92+ BUFFER_SIZE_DEFAULT , StandardOpenOption .CREATE , StandardOpenOption .TRUNCATE_EXISTING );
9193 }
9294
9395 @ Override
9496 public boolean supportsBlockSize () {
95- return true ;
97+ return false ;
9698 }
9799
98100 @ Override
99101 public long defaultBlockSize () {
100- return 512 ;
102+ return - 1 ;
101103 }
102104
103105 @ Override
You can’t perform that action at this time.
0 commit comments