You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/07/26 04:56:11 UTC
[orc] branch branch-1.7 updated: ORC-866: Reduce LineLength from
125 to 120 (#772)
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-1.7 by this push:
new 7825849 ORC-866: Reduce LineLength from 125 to 120 (#772)
7825849 is described below
commit 7825849f17b35cefeabcb96f3bc0b5c31cb2e8f6
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Sun Jul 25 21:19:29 2021 -0700
ORC-866: Reduce LineLength from 125 to 120 (#772)
### What changes were proposed in this pull request?
This PR aims to enforce the maximum line length in Java file from 125 to 120.
### Why are the changes needed?
ORC-795 started LineLength rule with 125 maximum at Apache ORC 1.6.8.
This issue aims to enforce it with 120 at Apache ORC 1.7.0.
### How was this patch tested?
Pass the CIs with the new 120 limit.
(cherry picked from commit fa28744fb421baaa6ff362981e0bfec348230f43)
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../apache/orc/bench/hive/rowfilter/TimestampRowFilterBenchmark.java | 3 ++-
java/core/src/java/org/apache/orc/impl/Dictionary.java | 3 ++-
java/core/src/java/org/apache/orc/impl/DictionaryUtils.java | 3 ++-
java/core/src/java/org/apache/orc/impl/ReaderImpl.java | 3 ++-
java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java | 3 ++-
java/core/src/java/org/apache/orc/impl/SerializationUtils.java | 3 ++-
java/core/src/java/org/threeten/extra/chrono/HybridDate.java | 3 ++-
java/pom.xml | 2 +-
java/shims/src/java/org/apache/orc/impl/ZeroCopyShims.java | 4 ++--
9 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/java/bench/hive/src/java/org/apache/orc/bench/hive/rowfilter/TimestampRowFilterBenchmark.java b/java/bench/hive/src/java/org/apache/orc/bench/hive/rowfilter/TimestampRowFilterBenchmark.java
index dceab21..c4994eb 100644
--- a/java/bench/hive/src/java/org/apache/orc/bench/hive/rowfilter/TimestampRowFilterBenchmark.java
+++ b/java/bench/hive/src/java/org/apache/orc/bench/hive/rowfilter/TimestampRowFilterBenchmark.java
@@ -162,7 +162,8 @@ public class TimestampRowFilterBenchmark extends org.openjdk.jmh.Main {
/*
* Run this test:
- * java -cp hive/target/orc-benchmarks-hive-*-uber.jar org.apache.orc.bench.hive.rowfilter.TimestampRowFilterBenchmark
+ * java -cp hive/target/orc-benchmarks-hive-*-uber.jar \
+ * org.apache.orc.bench.hive.rowfilter.TimestampRowFilterBenchmark
*/
public static void main(String[] args) throws RunnerException {
new Runner(new OptionsBuilder()
diff --git a/java/core/src/java/org/apache/orc/impl/Dictionary.java b/java/core/src/java/org/apache/orc/impl/Dictionary.java
index 2b8f45a..3d15774 100644
--- a/java/core/src/java/org/apache/orc/impl/Dictionary.java
+++ b/java/core/src/java/org/apache/orc/impl/Dictionary.java
@@ -25,7 +25,8 @@ import org.apache.hadoop.io.Text;
/**
- * Interface to define the dictionary used for encoding value in columns of specific types like string, char, varchar, etc.
+ * Interface to define the dictionary used for encoding value in columns
+ * of specific types like string, char, varchar, etc.
*/
public interface Dictionary {
enum IMPL {
diff --git a/java/core/src/java/org/apache/orc/impl/DictionaryUtils.java b/java/core/src/java/org/apache/orc/impl/DictionaryUtils.java
index 91a397a..4d23e0c 100644
--- a/java/core/src/java/org/apache/orc/impl/DictionaryUtils.java
+++ b/java/core/src/java/org/apache/orc/impl/DictionaryUtils.java
@@ -32,7 +32,8 @@ public class DictionaryUtils {
* @param keyOffsets starting offset of the key (in byte) in the byte array.
* @param byteArray storing raw bytes of all key seen in dictionary
*/
- public static void getTextInternal(Text result, int position, DynamicIntArray keyOffsets, DynamicByteArray byteArray) {
+ public static void getTextInternal(Text result, int position,
+ DynamicIntArray keyOffsets, DynamicByteArray byteArray) {
int offset = keyOffsets.get(position);
int length;
if (position + 1 == keyOffsets.size()) {
diff --git a/java/core/src/java/org/apache/orc/impl/ReaderImpl.java b/java/core/src/java/org/apache/orc/impl/ReaderImpl.java
index 829115c..2f28618 100644
--- a/java/core/src/java/org/apache/orc/impl/ReaderImpl.java
+++ b/java/core/src/java/org/apache/orc/impl/ReaderImpl.java
@@ -735,7 +735,8 @@ public class ReaderImpl implements Reader {
OrcProto.Footer footer =
OrcProto.Footer.parseFrom(
InStream.createCodedInputStream(
- InStream.create("footer", new BufferChunk(buffer, 0), psOffset - footerSize, footerSize, compression)));
+ InStream.create("footer", new BufferChunk(buffer, 0),
+ psOffset - footerSize, footerSize, compression)));
fileTailBuilder.setPostscriptLength(psLen).setFooter(footer);
}
// clear does not clear the contents but sets position to 0 and limit = capacity
diff --git a/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java b/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java
index aaed5db..11f6f8d 100644
--- a/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java
+++ b/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java
@@ -51,7 +51,8 @@ public class RunLengthIntegerReaderV2 implements IntegerReader {
this.utils = new SerializationUtils();
}
- private final static RunLengthIntegerWriterV2.EncodingType[] encodings = RunLengthIntegerWriterV2.EncodingType.values();
+ private final static RunLengthIntegerWriterV2.EncodingType[] encodings =
+ RunLengthIntegerWriterV2.EncodingType.values();
private void readValues(boolean ignoreEof) throws IOException {
// read the first 2 bits and determine the encoding type
isRepeating = false;
diff --git a/java/core/src/java/org/apache/orc/impl/SerializationUtils.java b/java/core/src/java/org/apache/orc/impl/SerializationUtils.java
index 522e20c..fbf6dc0 100644
--- a/java/core/src/java/org/apache/orc/impl/SerializationUtils.java
+++ b/java/core/src/java/org/apache/orc/impl/SerializationUtils.java
@@ -750,7 +750,8 @@ public final class SerializationUtils {
output.write(writeBuffer, 0, toWrite);
}
- private void writeLongBE(OutputStream output, long[] input, int offset, int numHops, int numBytes) throws IOException {
+ private void writeLongBE(OutputStream output, long[] input, int offset,
+ int numHops, int numBytes) throws IOException {
switch (numBytes) {
case 1:
diff --git a/java/core/src/java/org/threeten/extra/chrono/HybridDate.java b/java/core/src/java/org/threeten/extra/chrono/HybridDate.java
index 9670f5c..14e4528 100644
--- a/java/core/src/java/org/threeten/extra/chrono/HybridDate.java
+++ b/java/core/src/java/org/threeten/extra/chrono/HybridDate.java
@@ -264,7 +264,8 @@ public final class HybridDate
}
private boolean isCutoverMonth() {
- return isoDate.getYear() == CUTOVER_YEAR && isoDate.getMonthValue() == 9 && isoDate.getDayOfMonth() > CUTOVER_DAYS;
+ return isoDate.getYear() == CUTOVER_YEAR &&
+ isoDate.getMonthValue() == 9 && isoDate.getDayOfMonth() > CUTOVER_DAYS;
}
//-------------------------------------------------------------------------
diff --git a/java/pom.xml b/java/pom.xml
index 046d842..74c5019 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -279,7 +279,7 @@
<module name="NewlineAtEndOfFile">
</module>
<module name="LineLength">
- <property name="max" value="125"/>
+ <property name="max" value="120"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
diff --git a/java/shims/src/java/org/apache/orc/impl/ZeroCopyShims.java b/java/shims/src/java/org/apache/orc/impl/ZeroCopyShims.java
index 7c49b97..1115eb1 100644
--- a/java/shims/src/java/org/apache/orc/impl/ZeroCopyShims.java
+++ b/java/shims/src/java/org/apache/orc/impl/ZeroCopyShims.java
@@ -83,8 +83,8 @@ class ZeroCopyShims {
}
}
- public static HadoopShims.ZeroCopyReaderShim getZeroCopyReader(FSDataInputStream in,
- HadoopShims.ByteBufferPoolShim pool) throws IOException {
+ public static HadoopShims.ZeroCopyReaderShim getZeroCopyReader(
+ FSDataInputStream in, HadoopShims.ByteBufferPoolShim pool) throws IOException {
return new ZeroCopyAdapter(in, pool);
}