Skip to content

Conversation

@leesf
Copy link
Contributor

@leesf leesf commented Mar 29, 2019

What is the purpose of the change

Fix the error in HBaseConnectorITCase on Java 9.

Brief change log

Create a new URLClassLoader with directory.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not documented)

@leesf leesf changed the title [FLINK-12054] HBaseConnectorITCase fails on Java 9 [FLINK-12054][Tests] HBaseConnectorITCase fails on Java 9 Mar 29, 2019
@flinkbot
Copy link
Collaborator

flinkbot commented Mar 29, 2019

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Review Progress

  • ✅ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.

Details
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

Copy link
Contributor

@zentol zentol left a comment

Choose a reason for hiding this comment

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

@flinkbot approve description

private static void addDirectoryToClassPath(File directory) {
try {
// Get the classloader actually used by HBaseConfiguration
ClassLoader classLoader = HBaseConfiguration.create().getClassLoader();
Copy link
Contributor

Choose a reason for hiding this comment

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

The point of this method is to mutate the default classloader so that the hbase-site.xml is on the classpath later on.

By creating a new classloader that is immediately discarded once the method exists and never used to actually load anything this method becomes a no-op, which isn't acceptable.

@zentol zentol self-assigned this Apr 3, 2019
@zentol zentol closed this Apr 3, 2019
@leesf
Copy link
Contributor Author

leesf commented Apr 4, 2019

@zentol hi, Chesnay. Sorry to bother you, could you please tell me the reason you closed this PR.

@zentol
Copy link
Contributor

zentol commented Apr 26, 2019

@leesf Your solution at the time did not fix the problem as I out-lined in my comment and you didn't respond to it. I now see that you made another attempt, but it yet again does not work. This is especially concerning since the very same comment on your first solution still applies to your second one.

Pull requests are not a public WIP branch, they are to be used for providing, at the very least, working solutions.
I closed the PR since I considered it unlikely that you will provide such a solution anytime soon. Your attempts indicate that you neither verified your solutions, nor truly understand the code you're changing.

Please go back to the JIRA, thoroughly analyze the problem, provide&discuss solutions and verify them, before opening another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants