Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
it shows that in https://builds.apache.org/job/Pig-spark/236/#showFailuresLink following two unit tests fail:
TestCubeOperator.testIllustrate and TestMultiQueryLocal.testMultiQueryWithIllustrate
This because current we don't support illustrate in spark mode(see PIG-4621).
why after PIG-4614_1.patch was merged to branch, these two unit test fail?
in PIG-4614_1.patch, we edit SparkExecutionEngine #instantiateScriptState. When running following script with "illustrate".
illustrate.pig
a = load 'test/org/apache/pig/test/data/passwd' using PigStorage(':') as (uname:chararray, passwd:chararray, uid:int,gid:int); b = filter a by uid >5; illustrate b; store b into './testMultiQueryWithIllustrate.out';
the exception is thrown out at MRScriptState.get:java.lang.ClassCastException: org.apache.pig.tools.pigstats.spark.SparkScriptState cannot be cast to org.apache.pig.tools.pigstats.mapreduce.MRScriptState.
stacktrace:
java.lang.ClassCastException: org.apache.pig.tools.pigstats.spark.SparkScriptState cannot be cast to org.apache.pig.tools.pigstats.mapreduce.MRScriptState
at org.apache.pig.tools.pigstats.mapreduce.MRScriptState.get(MRScriptState.java:67)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:512)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:327)
at org.apache.pig.pen.LocalMapReduceSimulator.launchPig(LocalMapReduceSimulator.java:110)
at org.apache.pig.pen.ExampleGenerator.getData(ExampleGenerator.java:259)
at org.apache.pig.pen.ExampleGenerator.readBaseData(ExampleGenerator.java:223)
at org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:155)
at org.apache.pig.PigServer.getExamples(PigServer.java:1305)
at org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:812)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.java:818)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:385)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:230)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:205)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:81)
at org.apache.pig.Main.run(Main.java:624)
at org.apache.pig.Main.main(Main.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)