hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y_823...@tsmc.com
Subject How to get file name
Date Mon, 04 Oct 2010 07:39:07 GMT

Hi,
I am using hadoop0.20.1
Try to get the filename, but it didn't work by following codes.
Any suggestion?

FileSplit fileSplit = (FileSplit) context.getInputSplit();
String fileName = fileSplit.getPath().getName();

Error message
cannot be cast to org.apache.hadoop.mapred.FileSplit


Fleming Chiu(邱宏明)
TEL: 707-2260
Be Veg! Go Green! Save the planet!

 --------------------------------------------------------------------------- 
                                                         TSMC PROPERTY       
 This email communication (and any attachments) is proprietary information   
 for the sole use of its                                                     
 intended recipient. Any unauthorized review, use or distribution by anyone  
 other than the intended                                                     
 recipient is strictly prohibited.  If you are not the intended recipient,   
 please notify the sender by                                                 
 replying to this email, and then delete this email and any copies of it     
 immediately. Thank you.                                                     
 --------------------------------------------------------------------------- 




Mime
View raw message