Skip to content

Commit

Permalink
[BUILD][MINOR] Fix java style check issues
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

This patch fixes a few recently introduced java style check errors in master and release branch.

As an aside, given that [java linting currently fails](#10763
) on machines with a clean maven cache, it'd be great to find another workaround to [re-enable the java style checks](https://github.com/apache/spark/blob/3a07eff5af601511e97a05e6fea0e3d48f74c4f0/dev/run-tests.py#L577) as part of Spark PRB.

/cc zsxwing JoshRosen srowen for any suggestions

## How was this patch tested?

Manual Check

Author: Sameer Agarwal <[email protected]>

Closes #20323 from sameeragarwal/java.

(cherry picked from commit 9c4b998)
Signed-off-by: Sameer Agarwal <[email protected]>
  • Loading branch information
sameeragarwal committed Jan 19, 2018
1 parent 541dbc0 commit 54c1fae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
/**
* A data source writer that is returned by
* {@link WriteSupport#createWriter(String, StructType, SaveMode, DataSourceV2Options)}/
* {@link org.apache.spark.sql.sources.v2.streaming.MicroBatchWriteSupport#createMicroBatchWriter(String, long, StructType, OutputMode, DataSourceV2Options)}/
* {@link org.apache.spark.sql.sources.v2.streaming.ContinuousWriteSupport#createContinuousWriter(String, StructType, OutputMode, DataSourceV2Options)}.
* {@link org.apache.spark.sql.sources.v2.streaming.MicroBatchWriteSupport#createMicroBatchWriter(
* String, long, StructType, OutputMode, DataSourceV2Options)}/
* {@link org.apache.spark.sql.sources.v2.streaming.ContinuousWriteSupport#createContinuousWriter(
* String, StructType, OutputMode, DataSourceV2Options)}.
* It can mix in various writing optimization interfaces to speed up the data saving. The actual
* writing logic is delegated to {@link DataWriter}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,9 @@ final int getArrayOffset(int rowId) {
/**
* Any call to "get" method will throw UnsupportedOperationException.
*
* Access struct values in a ArrowColumnVector doesn't use this accessor. Instead, it uses getStruct() method defined
* in the parent class. Any call to "get" method in this class is a bug in the code.
* Access struct values in a ArrowColumnVector doesn't use this accessor. Instead, it uses
* getStruct() method defined in the parent class. Any call to "get" method in this class is a
* bug in the code.
*
*/
private static class StructAccessor extends ArrowVectorAccessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public DataReader<ColumnarBatch> createDataReader() {
ColumnVector[] vectors = new ColumnVector[2];
vectors[0] = i;
vectors[1] = j;
this.batch = new ColumnarBatch(new StructType().add("i", "int").add("j", "int"), vectors, BATCH_SIZE);
this.batch =
new ColumnarBatch(new StructType().add("i", "int").add("j", "int"), vectors, BATCH_SIZE);
return this;
}

Expand Down

0 comments on commit 54c1fae

Please sign in to comment.