dstPath = new Path(path + codec.getDefaultExtension());
hdfs = dstPath.getFileSystem(conf);
pathManager = new PathManager(hdfs, dstPath.getParent(), dstPath.getName());
writer = pathManager.open();
try {
writer = codec.createOutputStream(writer, cmp);
} catch (NullPointerException npe) {
// tries to find "native" version of codec, if that fails, then tries to
// find java version. If there is no java version, the createOutputStream
// exits via NPE. We capture this and convert it into a IOE with a more
// useful error message.