Skip to content

Commit 69b9e3d

Browse files
kiszkRobert Kruszewski
authored andcommitted
[SPARK-24228][SQL] Fix Java lint errors
This PR fixes the following Java lint errors due to importing unimport classes ``` $ dev/lint-java Using `mvn` from path: /usr/bin/mvn Checkstyle checks failed at following occurrences: [ERROR] src/main/java/org/apache/spark/sql/sources/v2/reader/partitioning/Distribution.java:[25] (sizes) LineLength: Line is longer than 100 characters (found 109). [ERROR] src/main/java/org/apache/spark/sql/sources/v2/reader/streaming/ContinuousReader.java:[38] (sizes) LineLength: Line is longer than 100 characters (found 102). [ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[21,8] (imports) UnusedImports: Unused import - java.io.ByteArrayInputStream. [ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java:[29,8] (imports) UnusedImports: Unused import - org.apache.spark.unsafe.Platform. [ERROR] src/test/java/test/org/apache/spark/sql/sources/v2/JavaAdvancedDataSourceV2.java:[110] (sizes) LineLength: Line is longer than 100 characters (found 101). ``` With this PR ``` $ dev/lint-java Using `mvn` from path: /usr/bin/mvn Checkstyle checks passed. ``` Existing UTs. Also manually run checkstyles against these two files. Author: Kazuaki Ishizaki <[email protected]> Closes apache#21301 from kiszk/SPARK-24228.
1 parent 371ac5f commit 69b9e3d

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import org.apache.parquet.column.values.ValuesReader;
2828
import org.apache.parquet.io.api.Binary;
29-
import org.apache.spark.unsafe.Platform;
3029

3130
/**
3231
* An implementation of the Parquet PLAIN decoder that supports the vectorized interface.

sql/core/src/main/java/org/apache/spark/sql/sources/v2/reader/partitioning/Distribution.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
/**
2424
* An interface to represent data distribution requirement, which specifies how the records should
25-
* be distributed among the data partitions(one {@link InputPartitionReader} outputs data for one partition).
25+
* be distributed among the data partitions (one {@link InputPartitionReader} outputs data for one
26+
* partition).
2627
* Note that this interface has nothing to do with the data ordering inside one
2728
* partition(the output records of a single {@link InputPartitionReader}).
2829
*

sql/core/src/main/java/org/apache/spark/sql/sources/v2/reader/streaming/ContinuousReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
@InterfaceStability.Evolving
3636
public interface ContinuousReader extends BaseStreamingSource, DataSourceReader {
3737
/**
38-
* Merge partitioned offsets coming from {@link ContinuousInputPartitionReader} instances for each
39-
* partition to a single global offset.
38+
* Merge partitioned offsets coming from {@link ContinuousInputPartitionReader} instances
39+
* for each partition to a single global offset.
4040
*/
4141
Offset mergeOffsets(PartitionOffset[] offsets);
4242

sql/core/src/test/java/test/org/apache/spark/sql/sources/v2/JavaAdvancedDataSourceV2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ public List<InputPartition<Row>> planInputPartitions() {
107107
}
108108
}
109109

110-
static class JavaAdvancedInputPartition implements InputPartition<Row>, InputPartitionReader<Row> {
110+
static class JavaAdvancedInputPartition implements InputPartition<Row>,
111+
InputPartitionReader<Row> {
111112
private int start;
112113
private int end;
113114
private StructType requiredSchema;

0 commit comments

Comments
 (0)