Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORC-909: Remove commons-io v2.1 dependency #815

Merged
merged 1 commit into from Aug 4, 2021
Merged

ORC-909: Remove commons-io v2.1 dependency #815

merged 1 commit into from Aug 4, 2021

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Aug 4, 2021

What changes were proposed in this pull request?

This PR aims to remove commons-io v2.1 dependency which comes from Hadoop 2.2.0.

Why are the changes needed?

This is a hidden dependency due to four lines using a single function IOUtils.skipFully. We had better cut this.

$ git grep org.apache.commons.io
core/src/java/org/apache/orc/impl/RunLengthByteReader.java:import org.apache.commons.io.IOUtils;
core/src/java/org/apache/orc/impl/SerializationUtils.java:import org.apache.commons.io.IOUtils;
$ git grep IOUtils | grep -v import
core/src/java/org/apache/orc/impl/RunLengthByteReader.java:        IOUtils.skipFully(input,1);
core/src/java/org/apache/orc/impl/RunLengthByteReader.java:        IOUtils.skipFully(input, numSkipRows);
core/src/java/org/apache/orc/impl/SerializationUtils.java:    IOUtils.skipFully(in, numOfFloats * 4L);
core/src/java/org/apache/orc/impl/SerializationUtils.java:    IOUtils.skipFully(in, numOfDoubles * 8L);

How was this patch tested?

Pass the CIs.

@github-actions github-actions bot added the JAVA label Aug 4, 2021

/**
* This is copied from commons-io project to cut the dependency
* from old Hadoop.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dongjoon-hyun
Copy link
Member Author

cc @pgaref and @williamhyun

Copy link
Contributor

@pgaref pgaref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for copying to our own class

@dongjoon-hyun
Copy link
Member Author

Thank you so much, @pgaref !

@dongjoon-hyun dongjoon-hyun merged commit a9a5286 into apache:main Aug 4, 2021
@dongjoon-hyun dongjoon-hyun deleted the ORC-909 branch August 4, 2021 09:11
dongjoon-hyun added a commit that referenced this pull request Aug 4, 2021
### What changes were proposed in this pull request?

This PR aims to remove `commons-io` v2.1 dependency which comes from `Hadoop 2.2.0`.
- https://mvnrepository.com/artifact/org.apache.orc/orc-core/1.6.9

### Why are the changes needed?

This is a hidden dependency due to four lines using a single function `IOUtils.skipFully`. We had better cut this.
```
$ git grep org.apache.commons.io
core/src/java/org/apache/orc/impl/RunLengthByteReader.java:import org.apache.commons.io.IOUtils;
core/src/java/org/apache/orc/impl/SerializationUtils.java:import org.apache.commons.io.IOUtils;
```

```
$ git grep IOUtils | grep -v import
core/src/java/org/apache/orc/impl/RunLengthByteReader.java:        IOUtils.skipFully(input,1);
core/src/java/org/apache/orc/impl/RunLengthByteReader.java:        IOUtils.skipFully(input, numSkipRows);
core/src/java/org/apache/orc/impl/SerializationUtils.java:    IOUtils.skipFully(in, numOfFloats * 4L);
core/src/java/org/apache/orc/impl/SerializationUtils.java:    IOUtils.skipFully(in, numOfDoubles * 8L);
```

### How was this patch tested?

Pass the CIs.

(cherry picked from commit a9a5286)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants