hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhijit Sarkar <abhijit.sar...@gmail.com>
Subject How to compress MapFile programmatically
Date Sat, 10 Aug 2013 20:16:02 GMT
Hi,
I'm a Hadoop newbie. This is my first question to this mailing list, hoping
for a good start :)

MapFile is a directory so when I try to open an InputStream to it, it fails
with FileNotFoundException. How do I compress MapFile programmatically?

Code snippet:
final FileSystem fs = FileSystem.get(conf);
final InputStream inputStream = fs.open(new Path(uncompressedStr));

Exception:
java.io.FileNotFoundException: /some/directory (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at
org.apache.hadoop.fs.RawLocalFileSystem$TrackingFileInputStream.<init>(RawLocalFileSystem.java:71)
at
org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileInputStream.<init>(RawLocalFileSystem.java:107)
at org.apache.hadoop.fs.RawLocalFileSystem.open(RawLocalFileSystem.java:177)
at
org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSInputChecker.<init>(ChecksumFileSystem.java:126)
at org.apache.hadoop.fs.ChecksumFileSystem.open(ChecksumFileSystem.java:283)
at org.apache.hadoop.fs.FileSystem.open(FileSystem.java:427)
at name.abhijitsarkar.learning.hadoop.io.IOUtils.compress(IOUtils.java:104)

Regards,
Abhijit

Mime
View raw message