Package com.cloudera.util

Examples of com.cloudera.util.PathManager


    CompressionCodec codec = getCodec(conf, codecName);

    if (codec == null) {
      dstPath = new Path(path);
      hdfs = dstPath.getFileSystem(conf);
      pathManager = new PathManager(hdfs, dstPath.getParent(), dstPath.getName());
      writer = pathManager.open();
      LOG.info("Creating HDFS file: " + pathManager.getOpenPath());
      return;
    }

    Compressor cmp = codec.createCompressor();
    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
View Full Code Here

TOP

Related Classes of com.cloudera.util.PathManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.