[ 
https://issues.apache.org/jira/browse/PIG-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13541974#comment-13541974
 ] 

Cheolsoo Park commented on PIG-2769:
------------------------------------

Hi Alan,

The test failure that you're seeing may be because of a stale 
{{hadoop-site.xml}} in {{build/classes}} from a previous test. Any test that 
uses MiniCluster generates {{hadoop-site.xml}} in {{build/classes}}, and since 
{{build/classes}} is in the classpath of unit test, a stale {{hadoop-site.xml}} 
will be picked up by {{TestInputSizeReducerEstimator}} if exists.

I am able to reproduce the exactly same error by adding a {{hadoop-site.xml}} 
to {{build/classes}} as follows:
{code:title=hadoop-site.xml}
<configuration>
  <property>
    <name>fs.default.name</name>
    <value>hdfs://localhost:45399</value>
  </property>
</configuration>
{code}
With this {{hadoop-site.xml}} in classpath, the test tries to connect to a NN 
on port 45399, which it shouldn't.

Can you verify that running {{ant clean test}} instead of {{ant test}} lets the 
error go away? When I do {{ant clean test}}, the test always passes for me.
                
> a simple logic causes very long compiling time on pig 0.10.0
> ------------------------------------------------------------
>
>                 Key: PIG-2769
>                 URL: https://issues.apache.org/jira/browse/PIG-2769
>             Project: Pig
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.10.0
>         Environment: Apache Pig version 0.10.0-SNAPSHOT (rexported)
>            Reporter: Dan Li
>            Assignee: Nick White
>             Fix For: 0.12
>
>         Attachments: case1.tar, PIG-2769.0.patch, 
> TEST-org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.TestInputSizeReducerEstimator.txt
>
>
> We found the following simple logic will cause very long compiling time for 
> pig 0.10.0, while using pig 0.8.1, everything is fine.
> A = load 'A.txt' using PigStorage()  AS (m: int);
> B = FOREACH A {
>     days_str = (chararray)
>         (m == 1 ? 31: 
>         (m == 2 ? 28: 
>         (m == 3 ? 31: 
>         (m == 4 ? 30: 
>         (m == 5 ? 31: 
>         (m == 6 ? 30: 
>         (m == 7 ? 31: 
>         (m == 8 ? 31: 
>         (m == 9 ? 30: 
>         (m == 10 ? 31: 
>         (m == 11 ? 30:31)))))))))));
> GENERATE
>    days_str as days_str;
> }   
> store B into 'B';
> and here's a simple input file example: A.txt
> 1
> 2
> 3
> The pig version we used in the test
> Apache Pig version 0.10.0-SNAPSHOT (rexported)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to