hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akhil1988 <akhilan...@gmail.com>
Subject FileInputStream for HDFS
Date Sat, 15 May 2010 11:40:22 GMT

I have a file that contains java serialized objects like "Vector". I have
stored this file over Hadoop Distributed File System(HDFS). Now I intend to
read this file (using method readObject) in one of the map task. I suppose

FileInputStream in = new FileInputStream("hdfs/path/to/file");

wont' work as the file is stored over HDFS. So I thought of using
org.apache.hadoop.fs.FileSystem class. But Unfortunately it does not have
any method that returns FileInputStream. All it has is a method that returns
FSDataInputStream but I want a inputstream that can read serialized java
objects like vector from a file rather than just primitive data types that
FSDataInputStream would do
View this message in context: http://old.nabble.com/FileInputStream-for-HDFS-tp28567783p28567783.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.

View raw message