Grokbase Groups Pig user April 2013
FAQ
I am using PigServer to run a pig script that communicates with a
psuedo-distributed hadoop installation on my localbox. I have included
*-site.xml in CLASSPATH.
While running the pig script i get the following exception
Exception in thread "main" java.lang.NoClassDefFoundError:
dk/brics/automaton/Automaton
at
org.apache.pig.impl.util.JarManager$DefaultPigPackages.(JarManager.java:136)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:517)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:294)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:177)


Code
====
PigServer pigServer = new PigServer(ExecType.MAPREDUCE);
Data data = Storage.resetData(pigServer);
Collection<Tuple> list = new ArrayList<Tuple>();
for (int i = 0; i < ROW_COUNT; i++) {
Tuple tuple = TupleFactory.getInstance().newTuple(COLUMN_COUNT);
for (int j = 0; j < COLUMN_COUNT; j++) {
tuple.set(j, "a" + i + "_" + j);
}
list.add(tuple);
}
pigServer.setBatchOn();
pigServer.registerQuery("A = LOAD 'in' USING mock.Storage();");
pigServer.deleteFile(out);
if (pigServer.executeBatch().get(0).getStatus() !=
JOB_STATUS.COMPLETED) {
throw new RuntimeException("Job failed",
pigServer.executeBatch().get(0).getException());
}

===

Does PigServer expect anyother resources in CLASSPATH.
Above pig script works fine with ExecType.LOCAL
--
Deepak

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedApr 25, '13 at 4:47a
activeApr 25, '13 at 4:47a
posts1
users1
websitepig.apache.org

1 user in discussion

ÐΞ€ρ@Ҝ (๏̯͡๏): 1 post

People

Translate

site design / logo © 2021 Grokbase