[GitHub] spark pull request #20860: [SPARK-23743][SQL] Changed a comparison logic fro...

2018-03-29 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/20860


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20860: [SPARK-23743][SQL] Changed a comparison logic fro...

2018-03-23 Thread jongyoul
Github user jongyoul commented on a diff in the pull request:

https://github.com/apache/spark/pull/20860#discussion_r176654007
  
--- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala
 ---
@@ -179,7 +179,7 @@ private[hive] class IsolatedClientLoader(
 val isHadoopClass =
   name.startsWith("org.apache.hadoop.") && 
!name.startsWith("org.apache.hadoop.hive.")
 
-name.contains("slf4j") ||
+name.startsWith("org.slf4j") ||
 name.contains("log4j") ||
--- End diff --

Fixed


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20860: [SPARK-23743][SQL] Changed a comparison logic fro...

2018-03-23 Thread jongyoul
Github user jongyoul commented on a diff in the pull request:

https://github.com/apache/spark/pull/20860#discussion_r176652812
  
--- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala
 ---
@@ -179,7 +179,7 @@ private[hive] class IsolatedClientLoader(
 val isHadoopClass =
   name.startsWith("org.apache.hadoop.") && 
!name.startsWith("org.apache.hadoop.hive.")
 
-name.contains("slf4j") ||
+name.startsWith("org.slf4j") ||
 name.contains("log4j") ||
--- End diff --

Yes, It looks like a similar issue. I'll add it.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20860: [SPARK-23743][SQL] Changed a comparison logic fro...

2018-03-22 Thread felixcheung
Github user felixcheung commented on a diff in the pull request:

https://github.com/apache/spark/pull/20860#discussion_r176646535
  
--- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala
 ---
@@ -179,7 +179,7 @@ private[hive] class IsolatedClientLoader(
 val isHadoopClass =
   name.startsWith("org.apache.hadoop.") && 
!name.startsWith("org.apache.hadoop.hive.")
 
-name.contains("slf4j") ||
+name.startsWith("org.slf4j") ||
 name.contains("log4j") ||
--- End diff --

do we need the same for "log4j"?


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20860: [SPARK-23743][SQL] Changed a comparison logic fro...

2018-03-19 Thread jongyoul
GitHub user jongyoul opened a pull request:

https://github.com/apache/spark/pull/20860

[SPARK-23743][SQL] Changed a comparison logic from containing 'slf4j' to 
starting with 'org.slf4j'

## What changes were proposed in this pull request?
isSharedClass returns if some classes can/should be shared or not. It 
checks if the classes names have some keywords or start with some names. 
Following the logic, it can occur unintended behaviors when a custom package 
has `slf4j` inside the package or class name. As I guess, the first intention 
seems to figure out the class containing `org.slf4j`. It would be better to 
change the comparison logic to `name.startsWith("org.slf4j")`

## How was this patch tested?
This patch should pass all of the current tests and keep all of the current 
behaviors. In my case, I'm using ProtobufDeserializer to get a table schema 
from hive tables. Thus some Protobuf packages and names have `slf4j` inside. 
Without this patch, it cannot be resolved because of ClassCastException from 
different classloaders.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jongyoul/spark SPARK-23743

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/20860.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #20860


commit 192ce305f05d4280c5c35b94a3666d313dab2733
Author: Jongyoul Lee 
Date:   2018-03-20T01:45:44Z

Changed a comparison logic from containing 'slf4j' to starting with 
'org.slf4j'




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org