Skip to content

Commit 8fcaac7

Browse files
committed
Checkstyle violations fixes
1 parent 97414b3 commit 8fcaac7

File tree

6 files changed

+42
-51
lines changed

6 files changed

+42
-51
lines changed

parquet-cli/src/main/java/org/apache/parquet/cli/commands/ConvertCommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import java.io.Closeable;
3333
import java.io.IOException;
3434
import java.util.List;
35-
3635
import org.apache.avro.Schema;
3736
import org.apache.avro.generic.GenericData;
3837
import org.apache.hadoop.fs.FileSystem;

parquet-cli/src/main/java/org/apache/parquet/cli/commands/RewriteCommand.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ public RewriteCommand(Logger console) {
9292
}
9393

9494
private RewriteOptions buildOptionsOrFail() throws IOException {
95-
Preconditions.checkArgument(
96-
inputs != null && !inputs.isEmpty(),
97-
"Input parquet file paths are required.");
95+
Preconditions.checkArgument(inputs != null && !inputs.isEmpty(), "Input parquet file paths are required.");
9896

9997
// The builder below takes the job to validate all input parameters.
10098
RewriteOptions.Builder builder = createBuilder();

parquet-cli/src/test/java/org/apache/parquet/cli/commands/ConvertCommandTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@ public void testConvertCommandToStdOut() throws IOException {
5151
Assert.assertEquals(0, command.run());
5252
Assert.assertTrue(baos.size() > 0);
5353
}
54-
5554
}

parquet-cli/src/test/java/org/apache/parquet/cli/commands/RewriteCommandTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,4 @@ public void testRewriteCommandToStdOut() throws IOException {
111111
Assert.assertEquals(0, command.run());
112112
Assert.assertTrue(baos.size() > 0);
113113
}
114-
115114
}

parquet-common/src/main/java/org/apache/parquet/io/StandardOutputFile.java

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -26,61 +26,59 @@
2626
*/
2727
public class StandardOutputFile implements OutputFile {
2828

29-
/**
30-
* @implNote we don't want to close the standard output (it's up to the process lifecycle to handle that)
31-
*/
32-
public class RawPositionOutputStream extends PositionOutputStream {
29+
/**
30+
* @implNote we don't want to close the standard output (it's up to the process lifecycle to handle that)
31+
*/
32+
public class RawPositionOutputStream extends PositionOutputStream {
3333

34-
private long pos = 0;
35-
36-
@Override
37-
public long getPos() throws IOException {
38-
return this.pos;
39-
}
40-
41-
@Override
42-
public void write(int b) throws IOException {
43-
this.pos++;
44-
System.out.write(b);
45-
}
46-
47-
@Override
48-
public void write(byte[] b) throws IOException {
49-
this.pos += b.length;
50-
System.out.write(b);
51-
}
52-
53-
@Override
54-
public void write(byte[] b, int off, int len) throws IOException {
55-
this.pos += len;
56-
System.out.write(b, off, len);
57-
}
58-
59-
@Override
60-
public void flush() throws IOException {
61-
System.out.flush();
62-
}
34+
private long pos = 0;
6335

36+
@Override
37+
public long getPos() throws IOException {
38+
return this.pos;
6439
}
6540

6641
@Override
67-
public PositionOutputStream create(long blockSizeHint) throws IOException {
68-
return new RawPositionOutputStream();
42+
public void write(int b) throws IOException {
43+
this.pos++;
44+
System.out.write(b);
6945
}
7046

7147
@Override
72-
public PositionOutputStream createOrOverwrite(long blockSizeHint) throws IOException {
73-
return new RawPositionOutputStream();
48+
public void write(byte[] b) throws IOException {
49+
this.pos += b.length;
50+
System.out.write(b);
7451
}
7552

7653
@Override
77-
public boolean supportsBlockSize() {
78-
return false;
54+
public void write(byte[] b, int off, int len) throws IOException {
55+
this.pos += len;
56+
System.out.write(b, off, len);
7957
}
8058

8159
@Override
82-
public long defaultBlockSize() {
83-
return -1;
60+
public void flush() throws IOException {
61+
System.out.flush();
8462
}
85-
63+
}
64+
65+
@Override
66+
public PositionOutputStream create(long blockSizeHint) throws IOException {
67+
return new RawPositionOutputStream();
68+
}
69+
70+
@Override
71+
public PositionOutputStream createOrOverwrite(long blockSizeHint) throws IOException {
72+
return new RawPositionOutputStream();
73+
}
74+
75+
@Override
76+
public boolean supportsBlockSize() {
77+
return false;
78+
}
79+
80+
@Override
81+
public long defaultBlockSize() {
82+
return -1;
83+
}
8684
}

parquet-common/src/test/java/org/apache/parquet/io/TestStandardOutputFile.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020

2121
import static org.junit.Assert.assertEquals;
2222

23-
import org.junit.Test;
24-
2523
import java.io.ByteArrayOutputStream;
2624
import java.io.IOException;
2725
import java.io.PrintStream;
26+
import org.junit.Test;
2827

2928
public class TestStandardOutputFile {
3029

@@ -65,5 +64,4 @@ public void outputFileWriteArrayOffsetToStdOut() throws IOException, Interrupted
6564
assertEquals(4, baos.toByteArray().length);
6665
assertEquals(TEST.substring(1, 5), new String(baos.toByteArray()));
6766
}
68-
6967
}

0 commit comments

Comments
 (0)