Skip to content

Commit

Permalink
Fix HiveContext classloading for GCS connector.
Browse files Browse the repository at this point in the history
IsolatedClientLoader.isSharedClass includes all of com.google.*, presumably
for Guava, protobuf, and/or other shared Google libraries, but needs to
count com.google.cloud.* as "hive classes" when determining which ClassLoader
to use. Otherwise, things like HiveContext.parquetFile will throw a
ClassCastException when fs.defaultFS is set to a Google Cloud Storage (gs://)
path. On StackOverflow: http://stackoverflow.com/questions/31478955
  • Loading branch information
dennishuo committed Jul 20, 2015
1 parent 9f913c4 commit 1f8db07
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private[hive] class IsolatedClientLoader(
name.contains("log4j") ||
name.startsWith("org.apache.spark.") ||
name.startsWith("scala.") ||
name.startsWith("com.google") ||
(name.startsWith("com.google") && !name.startsWith("com.google.cloud")) ||
name.startsWith("java.lang.") ||
name.startsWith("java.net") ||
sharedPrefixes.exists(name.startsWith)
Expand Down

0 comments on commit 1f8db07

Please sign in to comment.