Hello Again!

I'm running into a NullPointerException from the following code (taken from
a recordreader). None of the other variables are returning null, I've check
them all. I've checked the documentation, and I still don't know why the
compressionCodecFactory would return a null result. Any ideas?

Thank you!
Kylie

    public ServiceRecordReader(Configuration job, FileSplit split)
        throws java.io.IOException {

            final Path file = split.getPath();
            compressionCodecs = new CompressionCodecFactory(job);
            final CompressionCodec codec = compressionCodecs.getCodec(file);

            //since we're not concerned with splits, we'll just open the
objects
            FileSystem fs = file.getFileSystem(job);
            FSDataInputStream fileIn = fs.open(split.getPath());


            if(codec != null) {

                in = new ServiceReader(codec.createInputStream(fileIn));

            } else {

                throw new java.io.IOException("codec is null, curses... ");

            }

Reply via email to