Skip to content

Allow compilation as Java8 source and target#3328

Merged
leventov merged 6 commits intoapache:masterfrom
metamx:java8Testing
Mar 15, 2017
Merged

Allow compilation as Java8 source and target#3328
leventov merged 6 commits intoapache:masterfrom
metamx:java8Testing

Conversation

@drcrallen
Copy link
Copy Markdown
Contributor

@drcrallen drcrallen commented Aug 5, 2016

This pull request changes the java source version to java 8.

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Aug 5, 2016

FYI https://github.com/gianm/druid/tree/je is the patch I've used for upgrading Jetty (see https://groups.google.com/forum/#!msg/druid-development/rQMk8C4cUfs/atGoF8XEBQAJ for motivation). Sorta related since the new Jetty requires Java 8.

@drcrallen drcrallen mentioned this pull request Dec 6, 2016
@drcrallen drcrallen added this to the 0.10.0 milestone Dec 6, 2016
@drcrallen drcrallen removed this from the 0.10.0 milestone Dec 6, 2016
@leventov leventov added this to the 0.10.1 milestone Mar 11, 2017
@leventov
Copy link
Copy Markdown
Member

leventov commented Mar 11, 2017

Required because of #3889 (comment)

@leventov
Copy link
Copy Markdown
Member

@gianm @drcrallen this PR passes CI now.

@drcrallen
Copy link
Copy Markdown
Contributor Author

haha, I can't approve my own pull request, thanks github

@drcrallen
Copy link
Copy Markdown
Contributor Author

👍

Comment thread api/pom.xml Outdated
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a need to still target 1.7 for druid-api?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discussed offline with @drcrallen and this is apparently due to an abundance of caution about working with existing extensions. Although, I think this abundance of caution is not abundant enough, since we have extension points like AggregatorFactory that are not in druid-api (see http://druid.io/docs/latest/development/modules.html).

@drcrallen @leventov do you know if it would be enough to do the following:

  1. Compile everything (including druid-api) for java 1.8 starting in 0.10.1
  2. Add to the release notes for 0.10.0 "extensions must target java 1.8 to be compatible with future 0.10.x versions"
  3. Expect that users that follow the above guideline will be able to build an extension for 0.10.0 and have it work with 0.10.1.

If so then this change LGTM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That sounds good to me. meaning we should change this PR to remove the druid-api special java version.

@leventov leventov changed the title Allow compilation as Java8 source and target for everything except API Allow compilation as Java8 source and target Mar 15, 2017
@leventov leventov merged commit 805d85a into apache:master Mar 15, 2017
@leventov leventov deleted the java8Testing branch March 15, 2017 04:23
@fjy
Copy link
Copy Markdown
Contributor

fjy commented Mar 15, 2017

Nevermind, this is all testing code, all good

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Mar 15, 2017

Actually I believe the rule is that outside of docs, we need 2 +1s, so someone else will need to approve this

@leventov
Copy link
Copy Markdown
Member

leventov commented Mar 15, 2017

@fjy this PR has commits from @drcrallen and me, and we approved each other's commits. The other +1 is from @gianm.

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Mar 15, 2017

@leventov my +1 was conditional on the question I had above, so I'm guessing the answer is "yes that should be fine"? Pursuant to that I added this to the release notes for 0.10.0:

Extensions targeting Druid 0.10.x must be compiled with JDK 8 to be compatible with future 0.10.x releases.

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Mar 15, 2017

Also: opinions on whether we should include this in 0.10.0 too? If we're going to build with jdk8 in 0.10.1 it seems "cleaner" to do it starting from 0.10.0.

@leventov
Copy link
Copy Markdown
Member

@gianm

my +1 was conditional on the question I had above, so I'm guessing the answer is "yes that should be fine"?

Yes, @drcrallen agreed with that, I also agree.

leventov pushed a commit to metamx/druid that referenced this pull request Mar 15, 2017
* Allow compilation as Java8 source and target for everything except API

* Remove conditions in tests which assume that we may run with Java 7

* Update easymock to 3.4

* Make Animal Sniffer to check Java 1.8 usage; remove redundant druid-caffeine-cache configuration

* Use try-with-resources in LargeColumnSupportedComplexColumnSerializerTest.testSanity()

* Remove java7 special for druid-api
gianm pushed a commit that referenced this pull request Mar 15, 2017
* Allow compilation as Java8 source and target for everything except API

* Remove conditions in tests which assume that we may run with Java 7

* Update easymock to 3.4

* Make Animal Sniffer to check Java 1.8 usage; remove redundant druid-caffeine-cache configuration

* Use try-with-resources in LargeColumnSupportedComplexColumnSerializerTest.testSanity()

* Remove java7 special for druid-api
@jon-wei jon-wei modified the milestones: 0.10.0, 0.10.1 Jun 6, 2017
seoeun25 pushed a commit to seoeun25/incubator-druid that referenced this pull request Feb 25, 2022
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.

5 participants