Skip to content

Commit

Permalink
Branch 1.0.2.2 (#1231)
Browse files Browse the repository at this point in the history
* Fix for JDBC driver Jar running with Spark 2.3 + versions. ( java.lang.NoSuchFieldError: MAX_ROUNDED_ARRAY_LENGTH )
The Snappy JDBC driver jar contains a class org.apache.spark.unsafe.array.ByteArrayMethods which has been changed in Spark 2.3.1. When Snappy JDBC driver jar dependency is used, this class is loaded from the JDBC jar instead of Spark 2.3.1 jars  (or later Spark version) and the program errors out as it expects a newer version of the class.

We fixed it by relocating the org.apache.spark.unsafe to io.snappydata.org.apache.spark.unsafe in the build.gradle for the JDBC module.
  • Loading branch information
PradeepSurale committed Feb 13, 2019
1 parent da79990 commit 568b7e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ allprojects {
apply plugin: "build-time-tracker"

group = 'io.snappydata'
version = '1.0.2.1'
version = '1.0.2.2'

// apply compiler options
tasks.withType(JavaCompile) {
Expand Down
5 changes: 3 additions & 2 deletions jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ dependencies {
}

if (new File(rootDir, 'store/build.gradle').exists()) {
compile project(':snappy-store:snappydata-store-client')
compile project(':snappy-store:snappydata-store-client')
} else {
compile group: 'io.snappydata', name: 'snappydata-store-client', version: snappyStoreVersion
compile group: 'io.snappydata', name: 'snappydata-store-client', version: snappyStoreVersion
}
}

Expand Down Expand Up @@ -80,6 +80,7 @@ shadowJar {

// avoid conflict with the 0.9.2 version in stock Spark
relocate 'org.apache.thrift', 'io.snappydata.org.apache.thrift'
relocate 'org.apache.spark.unsafe', 'io.snappydata.org.apache.spark.unsafe'

mergeServiceFiles()
exclude 'log4j.properties'
Expand Down

0 comments on commit 568b7e1

Please sign in to comment.