I am using hadoop 0.20.2 on CDH. I am trying to get the filename of the file currently being processed. I will extract some information from the filename which will determine the data processing to be performed. I want to do this because I need to process a large list of files and the processing to be done may depend on which file it is. I am extracting something analogous to file type and timestamp from the filename. I have seen all over the place in discussion forums that the correct way to get the filename using the 0.20.2 API is the following: Path path = ((FileSplit) context.getInputSplit()).getPath(); The problem is that context.getInputSplit() returns null. I am calling getInputSplit from within the map() method on the Context object which was passed to map(). Any pointers on why this method returns null and what I am doing wrong? --
Best regards, Vegar Hatlevik Product Manager Video Advertiser Architect Client-side Solutions ADSWIZZ S.A 94 Gulledelle 1200 T: +40 757 012 122 E: vegar.hatle...@adswizz.com Skype: vegarhatlevik ![]() http://www.adswizz.com
|