[
https://issues.apache.org/jira/browse/PIG-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13175620#comment-13175620
]
Julien Le Dem commented on PIG-2326:
------------------------------------
Some more files refering to pigtest/conf:
./build/classes/docs/src/documentation/content/xdocs/pigunit.xml: The
default value is ~/pigtest/conf.
./build/classes/docs/src/documentation/content/xdocs/test.xml: The
default value is ~/pigtest/conf.
./build.xml: <property name="junit.hadoop.conf"
value="${user.home}/pigtest/conf/"/>
./CHANGES.txt:PIG-2219: Pig tests fail if ${user.home}/pigtest/conf does not
already exist (cwsteinbach via gates)
./contrib/penny/java/build.xml: <property name="junit.hadoop.conf"
value="${user.home}/pigtest/conf/"/>
./contrib/piggybank/java/build.xml: <property name="junit.hadoop.conf"
value="${user.home}/pigtest/conf/"/>
./contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestPathPartitioner.java:
File oldConf = new
File(System.getProperty("user.home")+"/pigtest/conf/hadoop-site.xml");
./contrib/piggybank/java/src/test/java/org/apache/pig/piggybank/test/storage/TestPathPartitionHelper.java:
File oldConf = new
File(System.getProperty("user.home")+"/pigtest/conf/hadoop-site.xml");
./src/docs/src/documentation/content/xdocs/pigunit.xml: The default
value is ~/pigtest/conf.
./src/docs/src/documentation/content/xdocs/test.xml: The default value
is ~/pigtest/conf.
./src/org/apache/pig/backend/hadoop/datastorage/ConfigurationUtil.java:
// so pigtest/conf/hadoop-site.xml contains such entry. This prevents some
tests from
./test/org/apache/pig/pigunit/MiniClusterRunner.java: *
System.getProperty("user.home"), "pigtest/conf/"</li>
./test/org/apache/pig/test/TestNativeMapReduce.java: // the presence of
~/pigtest/conf/hadoop-site.xml created by MiniCluster
I'm updating the patch accordingly. You'll notice that some tests delete the
file to avoid having it on the classpath.
The root problem is Pig checking for the existence of hadoop-site.xml on the
classpath in Map/Reduce mode ( in
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine)
This makes unit testing hard as we cannot just pass Properties to PigServer and
use the "Hadoop local" mode for tests. Tests step on each other through the
config file.
> Pig minicluster tests can not be run from eclipse
> -------------------------------------------------
>
> Key: PIG-2326
> URL: https://issues.apache.org/jira/browse/PIG-2326
> Project: Pig
> Issue Type: Bug
> Reporter: Julien Le Dem
> Assignee: Julien Le Dem
> Priority: Minor
> Attachments: PIG-2326.patch, PIG-2326_a.patch
>
>
> Some of the setup of the minicluster tests are in the ant config hence they
> don't run in eclipse.
> In particular:
> System.setProperty("hadoop.log.dir", "build/test/logs");
> hadoop-site.xml in the classpath
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira