-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PARQUET-121: Allow Parquet to build with Java 8 #77
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed to add the scala.maven.test.skip property, or is this related to other fixes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's needed for skip.
|
I've tested this as Tom suggested and everything passes. Strangely, I didn't skip the scala tests or remove test classes from parquet-scrooge and everything still passed. I tested the build target=1.6 with tests targeting 1.6 (in java7) and 1.8 (in java8). Those work without modification. I also tested build target=1.8 with tests targeting 1.8 in java8 and all of the tests pass. I think this PR is safe to merge. |
There are test failures running with Java 8 due to http://openjdk.java.net/jeps/180 which changed retrieval order for HashMap. Here's how I tested this: ```bash use-java8 mvn clean install -DskipTests -Dmaven.javadoc.skip=true mvn test mvn test -P hadoop-2 ``` I also compiled the main code with Java 7 (target=1.6 bytecode), and compiled the tests with Java 8, and ran them with Java 8. The idea here is to simulate users who want to run Parquet with JRE 8. ```bash use-java7 mvn clean install -DskipTests -Dmaven.javadoc.skip=true use-java8 find . -name test-classes | grep target/test-classes | grep -v 'parquet-scrooge' | xargs rm -rf mvn test -DtargetJavaVersion=1.8 -Dmaven.main.skip=true -Dscala.maven.test.skip=true ``` A couple of notes about this: * The targetJavaVersion property is used since other Hadoop projects use the same name. * I couldn’t get parquet-scrooge to compile with target=1.8, which is why I introduced scala.maven.test.skip (and updated scala-maven-plugin to the latest version which supports the property). Compiling with target=1.8 should be fixed in another JIRA as it looks pretty involved. Author: Tom White <tom@cloudera.com> Closes apache#77 from tomwhite/PARQUET-121-java8 and squashes the following commits: 8717e13 [Tom White] Fix tests to run under Java 8. 35ea670 [Tom White] PARQUET-121. Allow Parquet to build with Java 8.
There are test failures running with Java 8 due to http://openjdk.java.net/jeps/180 which changed retrieval order for HashMap. Here's how I tested this: ```bash use-java8 mvn clean install -DskipTests -Dmaven.javadoc.skip=true mvn test mvn test -P hadoop-2 ``` I also compiled the main code with Java 7 (target=1.6 bytecode), and compiled the tests with Java 8, and ran them with Java 8. The idea here is to simulate users who want to run Parquet with JRE 8. ```bash use-java7 mvn clean install -DskipTests -Dmaven.javadoc.skip=true use-java8 find . -name test-classes | grep target/test-classes | grep -v 'parquet-scrooge' | xargs rm -rf mvn test -DtargetJavaVersion=1.8 -Dmaven.main.skip=true -Dscala.maven.test.skip=true ``` A couple of notes about this: * The targetJavaVersion property is used since other Hadoop projects use the same name. * I couldn’t get parquet-scrooge to compile with target=1.8, which is why I introduced scala.maven.test.skip (and updated scala-maven-plugin to the latest version which supports the property). Compiling with target=1.8 should be fixed in another JIRA as it looks pretty involved. Author: Tom White <tom@cloudera.com> Closes apache#77 from tomwhite/PARQUET-121-java8 and squashes the following commits: 8717e13 [Tom White] Fix tests to run under Java 8. 35ea670 [Tom White] PARQUET-121. Allow Parquet to build with Java 8.
fix plugin versions
There are test failures running with Java 8 due to http://openjdk.java.net/jeps/180 which changed retrieval order for HashMap.
Here's how I tested this:
I also compiled the main code with Java 7 (target=1.6 bytecode), and compiled the tests with Java 8, and ran them with Java 8. The idea here is to simulate users who want to run Parquet with JRE 8.
A couple of notes about this: