Compilation error in UIMAMapReduceBase.java with older version of hadoop

14 views
Skip to first unread message

Samudra Banerjee

unread,
Apr 9, 2014, 6:56:50 PM4/9/14
to dkpro-big...@googlegroups.com
Hi all,

I have a cluster with an older version of hadoop deployed. It is 1.0.3. When I change the hadoop.version parameter in pom.xml to 1.0.3, I get the following compilation error during build

/home/sabanerjee/dkpro-bigdata/dkpro-bigdata/de.tudarmstadt.ukp.dkpro.bigdata/de.tudarmstadt.ukp.dkpro.bigdata.hadoop/src/main/java/de/tudarmstadt/ukp/dkpro/bigdata/hadoop/UIMAMapReduceBase.java:[190,16] error: cannot find symbol
[ERROR] -> [Help 1]

On digging further, I find that in line 190, the listFiles method is accessed. Looks like this is not present in version 1.0.3 of hadoop-client and hence the error.

Is there any workaround for this?

Thanks and Regards,
Samudra

Hans-Peter Zorn

unread,
Apr 14, 2014, 4:23:41 AM4/14/14
to dkpro-big...@googlegroups.com
Hi Samudra,
sorry for not replying earlier. I have looked at it and it seems that I used an API that was introduced with hadoop2 in this class. I've looked at it
but did not have the time to test and fix it.
I think it should work if you modify the method copyRecursively to use 

if (this.localFS.exists(results_dir) && this.localFS.listStatus(results_dir).length > 0)

instead of listFiles. This should also work in Hadoop2. It would be great if you could give feedback if that worked.

Best,

-hp

Samudra Banerjee

unread,
Apr 17, 2014, 12:09:49 AM4/17/14
to dkpro-big...@googlegroups.com
Hi Hans,

Thanks a lot for the info! That actually worked! :)

Regards,
Samudra 
Reply all
Reply to author
Forward
0 new messages