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

PARQUET-2289: Avoid using hasCapability #1075

Closed
wants to merge 1 commit into from

Conversation

Fokko
Copy link
Contributor

@Fokko Fokko commented Apr 19, 2023

We should avoid using hasCapability to maintain compatibility with Hadoop 2. I think we can remove the whole check since Hadoop 1 isn't supported anymore.

This allows us to use Hadoop 2. Relates to #951

cc @steveloughran

Make sure you have checked all steps below.

Jira

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does

We should avoid using `hasCapability` to maintain
compatibility with Hadoop 2. I think we can remove
the whole check since Hadoop 1 isn't supported anymore.

This allows us to use Hadoop 2.
@steveloughran
Copy link
Contributor

StreamCapabilities was added to hadoop branch 2 six years ago in https://issues.apache.org/jira/browse/HDFS-11644 and shipped in hadoop-2.9.0

anyone complaining about it not being there is trying to run a version of hadoop which predates this, and is not the version of hadoop-2 parquet compiles with. There is no guarantee anything works with that older version: method signatures, dependencies. etc.

oh, and if you really want to claim hadoop 2.8.x support, you have to compile with java7 too, as hadoop 2.9 is the first java8 compatible release

If you really want to support it, you need to modify the build to

  • compile with java lang == 7
  • require a java7 jdk
  • build against hadoop 2.8

or you tell the user complaining to upgrade to a release of hadoop which has shipped recently.

@Fokko
Copy link
Contributor Author

Fokko commented Apr 19, 2023

@steveloughran thanks for the insight. I thought this would be rather trivial, but this clearly isn't the case. Adding support for Java 7 is something that doesn't make any sense. Let me close this for now.

@Fokko Fokko closed this Apr 19, 2023
@steveloughran
Copy link
Contributor

aah, no worries. i just despair when people ask for things backported to 5+ year old releases because they don't want the hassle of upgrading their own installation, e.g HADOOP-18600. My PoV there is "you are free to fork your own versions of things and maintain them" -the maintenance being what is expected.

Whoever doesn't upgrade also gets to maintain their CVE fix process, both from hadoop and all the dependencies, so I would use the latest hadoop 2.9.x release, as at least there we fix all the hadoop source fixes we can, even though transitive JAR updates are out of scope. A six year old release has 6 years worth of security related JAR updates to worry about.

@Fokko Fokko deleted the fd-remove-check branch April 25, 2023 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants