Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
0.8.0
-
None
-
None
-
None
Description
Hi
We've been using the Hadoop MiniCluster to do unit testing of our pig scripts in the following way.
MiniCluster minicluster = MiniCluster.buildCluster(2,2);
pigServer = new PigServer(ExecType.MAPREDUCE, minicluster.getProperties());
This has been working fine for 0.6 and 0.7.
However in the trunk (0.8) looks like there is change due to which an exception is thrown if hadoop-site.xml or core-site.xml is not found in the classpath.
org.apache.pig.backend.executionengine.ExecException: ERROR 4010: Cannot find hadoop configurations in classpath (neither hadoop-site.xml nor core-site.xml was found in the classpath).If you plan to use local mode, please put -x local option in command line
at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.init(HExecutionEngine.java:149)
at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.init(HExecutionEngine.java:114)
at org.apache.pig.impl.PigContext.connect(PigContext.java:177)
at org.apache.pig.PigServer.<init>(PigServer.java:215)
at org.apache.pig.PigServer.<init>(PigServer.java:204)
at org.apache.pig.PigServer.<init>(PigServer.java:200)
The problem seems to be org.apache.pig.backend.hadoop.executionengine.HExecutionEngine: 148
if( hadoop_site == null && core_site == null )
We would like to use the mapreduce mode but with the minicluster and have a lot of unit test with that setup.
Can this check be removed from this level ?
Thanks
Sameer