Skip to content

Commit

Permalink
[SPARK-24228][SQL] Fix Java lint errors
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?
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.
```

## How was this patch tested?

Existing UTs. Also manually run checkstyles against these two files.

Author: Kazuaki Ishizaki <[email protected]>

Closes #21301 from kiszk/SPARK-24228.
  • Loading branch information
kiszk authored and HyukjinKwon committed May 14, 2018
1 parent 7a2d489 commit b6c50d7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package org.apache.spark.sql.execution.datasources.parquet;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import org.apache.parquet.column.values.ValuesReader;
import org.apache.parquet.io.api.Binary;
import org.apache.spark.unsafe.Platform;

/**
* An implementation of the Parquet PLAIN decoder that supports the vectorized interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

/**
* An interface to represent data distribution requirement, which specifies how the records should
* be distributed among the data partitions(one {@link InputPartitionReader} outputs data for one partition).
* be distributed among the data partitions (one {@link InputPartitionReader} outputs data for one
* partition).
* Note that this interface has nothing to do with the data ordering inside one
* partition(the output records of a single {@link InputPartitionReader}).
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
@InterfaceStability.Evolving
public interface ContinuousReader extends BaseStreamingSource, DataSourceReader {
/**
* Merge partitioned offsets coming from {@link ContinuousInputPartitionReader} instances for each
* partition to a single global offset.
* Merge partitioned offsets coming from {@link ContinuousInputPartitionReader} instances
* for each partition to a single global offset.
*/
Offset mergeOffsets(PartitionOffset[] offsets);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public List<InputPartition<Row>> planInputPartitions() {
}
}

static class JavaAdvancedInputPartition implements InputPartition<Row>, InputPartitionReader<Row> {
static class JavaAdvancedInputPartition implements InputPartition<Row>,
InputPartitionReader<Row> {
private int start;
private int end;
private StructType requiredSchema;
Expand Down

0 comments on commit b6c50d7

Please sign in to comment.