Uh oh!
There was an error while loading. Please reload this page.
[SPARK-6392][SQL]Minor fix ClassNotFound exception when use spark cli to add jar - #5079
[SPARK-6392][SQL]Minor fix ClassNotFound exception when use spark cli to add jar #5079jeanlyn wants to merge 3 commits into
Conversation
AmplabJenkins
commented
Mar 18, 2015
Can one of the admins verify this patch? |
marmbrus
commented
Mar 18, 2015
ok to test |
marmbrus
commented
Mar 18, 2015
Would it be possible to add a test case in the CLI suite? /cc @liancheng |
SparkQA
commented
Mar 18, 2015
Test build #28764 has started for PR 5079 at commit
|
SparkQA
commented
Mar 18, 2015
Test build #28764 has finished for PR 5079 at commit
|
AmplabJenkins
commented
Mar 18, 2015
Test PASSed. |
liancheng
commented
Mar 18, 2015
@marmbrus We can merge this PR first, I'm trying to write a test case for this PR. |
SparkQA
commented
Mar 18, 2015
Test build #28792 has started for PR 5079 at commit
|
jeanlyn
commented
Mar 18, 2015
Updated, @liancheng@marmbrus I had tried to add a test for this patch,could you take a look for the test?Thanks! |
SparkQA
commented
Mar 18, 2015
Test build #28792 has finished for PR 5079 at commit
|
AmplabJenkins
commented
Mar 18, 2015
Test PASSed. |
liancheng
commented
Mar 18, 2015
Hm, the problem is that we should also add the source code of In Hive, there is separate Maven module |
jeanlyn
commented
Mar 18, 2015
Thanks @liancheng for explain.You are right,it need consider more about it.So,should i remove the test? |
liancheng
commented
Mar 18, 2015
Your test case itself makes sense. Let's wait for more comments first :) |
jeanlyn
commented
Mar 18, 2015
Ok. |
yhuai
commented
Mar 18, 2015
Will it be better if we put the jar in |
SparkQA
commented
Mar 19, 2015
Test build #28849 has started for PR 5079 at commit
|
jeanlyn
commented
Mar 19, 2015
@yhuai ,There is a simple function publicStringevaluate(Stringstr) {
try {
return"hello " + str;
} catch (Exceptione) {
returnnull;
}
} |
chenghao-intel
commented
Mar 19, 2015
Same issue with #4586 ? Actually we are quite headache with the class loading/unloading problem. @adrian-wang can you review this also? |
jeanlyn
commented
Mar 19, 2015
@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 |
adrian-wang
commented
Mar 19, 2015
Actually I tried this method before and it would work in unit test but not ok with shell. |
SparkQA
commented
Mar 19, 2015
Test build #28849 has finished for PR 5079 at commit
|
AmplabJenkins
commented
Mar 19, 2015
Test PASSed. |
jeanlyn
commented
Mar 19, 2015
@adrian-wang You mean not work in |
adrian-wang
commented
Mar 19, 2015
@jeanlyn have you tried clean assembly and run it in |
adrian-wang
commented
Mar 19, 2015
I double checked your code with latest master, the problem still persists. Thanks! |
jeanlyn
commented
Mar 19, 2015
@adrian-wang ,I had tested in |
adrian-wang
commented
Mar 19, 2015
@jeanlyn you can just try execute |
chenghao-intel
commented
Mar 19, 2015
jeanlyn
commented
Mar 19, 2015
@chenghao-intel my full code is importorg.apache.hadoop.hive.ql.exec.UDF;
publicclasshelloextendsUDF {
publicStringevaluate(Stringstr) {
try {
return"hello " + str;
} catch (Exceptione) {
returnnull;
}
}
}@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 |
adrian-wang
commented
Mar 19, 2015
@jeanlyn we are not getting same thing. Even our .q file differs. I don't have CHAR in my .q file. |
jeanlyn
commented
Mar 19, 2015
I also don't have CHAR in sethive.auto.convert.join=true;
sethive.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;
CREATETABLEt1 (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 onsrc.key=t1.a;
droptable t1;
sethive.auto.convert.join=false;
May be we can discuss this offline? |
jeanlyn
commented
Mar 23, 2015
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