-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-6392][SQL]Minor fix ClassNotFound exception when use spark cli to add jar #5079
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
|
Can one of the admins verify this patch? |
|
ok to test |
|
Would it be possible to add a test case in the CLI suite? /cc @liancheng |
|
Test build #28764 has started for PR 5079 at commit
|
|
Test build #28764 has finished for PR 5079 at commit
|
|
Test PASSed. |
|
@marmbrus We can merge this PR first, I'm trying to write a test case for this PR. |
|
Test build #28792 has started for PR 5079 at commit
|
|
Updated, @liancheng @marmbrus I had tried to add a test for this patch,could you take a look for the test?Thanks! |
|
Test build #28792 has finished for PR 5079 at commit
|
|
Test PASSed. |
|
Hm, the problem is that we should also add the source code of In Hive, there is separate Maven module |
|
Thanks @liancheng for explain.You are right,it need consider more about it.So,should i remove the test? |
|
Your test case itself makes sense. Let's wait for more comments first :) |
|
Ok. |
|
Will it be better if we put the jar in |
|
Test build #28849 has started for PR 5079 at commit
|
|
@yhuai ,There is a simple function public String evaluate(String str) {
try {
return "hello " + str;
} catch (Exception e) {
return null;
}
} |
|
Same issue with #4586 ? Actually we are quite headache with the class loading/unloading problem. @adrian-wang can you review this also? |
|
@chenghao-intel I am not clear what problem #4586 try to fix.If #4586 try to fix the problem as I mentioned.I think we can reuse the |
|
Actually I tried this method before and it would work in unit test but not ok with shell. |
|
Test build #28849 has finished for PR 5079 at commit
|
|
Test PASSed. |
|
@adrian-wang You mean not work in |
|
@jeanlyn have you tried clean assembly and run it in |
|
I double checked your code with latest master, the problem still persists. Thanks! |
|
@adrian-wang ,I had tested in |
|
@jeanlyn you can just try execute |
|
@chenghao-intel my full code is import org.apache.hadoop.hive.ql.exec.UDF;
public class hello extends UDF {
public String evaluate(String str) {
try {
return "hello " + str;
} catch (Exception e) {
return null;
}
}
}@adrian-wang ,I also test the But it seems that not the load jar problem.Because when i not run the I got the follow exception when i create table |
|
@jeanlyn we are not getting same thing. Even our .q file differs. I don't have CHAR in my .q file. |
|
I also don't have CHAR in set hive.auto.convert.join=true;
set hive.auto.convert.join.use.nonstaged=false;
add jar ${system:maven.local.repository}/org/apache/hive/hcatalog/hive-hcatalog-core/${system:hive.version}/hive-hcatalog-core-${system:hive.version}.jar;
CREATE TABLE t1 (a string, b string)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
;
LOAD DATA LOCAL INPATH "../../data/files/sample.json" INTO TABLE t1;
select * from src join t1 on src.key =t1.a;
drop table t1;
set hive.auto.convert.join=false;
May be we can discuss this offline? |
|
After communicated with @adrian-wang offline. I realized this PR still leave some class loader problem.So i close this one. |
When we use spark cli to add jar dynamic,we will get the
java.lang.ClassNotFoundExceptionwhen we use the class of jar to create udf.For example:we can use the spark physical plan to fix this problem