Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.LocalFileSystem.listStatus()


    LocalFileSystem localFs = FileSystem.getLocal(conf);
    int count = 0;

    final FileStatus itemStatus = localFs.getFileStatus(itemToZip);
    if(itemStatus.isDir()) {
      final FileStatus[] statai = localFs.listStatus(itemToZip);

      // Add a directory entry to the zip file
      final String zipDirName = relativePathForZipEntry(itemToZip.toUri().getPath(), baseName, root);
      final ZipEntry dirZipEntry = new ZipEntry(zipDirName + Path.SEPARATOR_CHAR);
      LOG.info(String.format("Adding directory %s to zip", zipDirName));
View Full Code Here


    LocalFileSystem localFs = FileSystem.getLocal(conf);
    int count = 0;

    final FileStatus itemStatus = localFs.getFileStatus(itemToZip);
    if(itemStatus.isDir()) {
      final FileStatus[] statai = localFs.listStatus(itemToZip);

      // Add a directory entry to the zip file
      final String zipDirName = relativePathForZipEntry(itemToZip.toUri().getPath(), baseName, root);
      final ZipEntry dirZipEntry = new ZipEntry(zipDirName + Path.SEPARATOR_CHAR);
      LOG.info(String.format("Adding directory %s to zip", zipDirName));
View Full Code Here

    LocalFileSystem localFs = FileSystem.getLocal(conf);
    int count = 0;

    final FileStatus itemStatus = localFs.getFileStatus(itemToZip);
    if(itemStatus.isDir()) {
      final FileStatus[] statai = localFs.listStatus(itemToZip);

      // Add a directory entry to the zip file
      final String zipDirName = relativePathForZipEntry(itemToZip.toUri().getPath(), baseName, root);
      final ZipEntry dirZipEntry = new ZipEntry(zipDirName + Path.SEPARATOR_CHAR);
      LOG.info(String.format("Adding directory %s to zip", zipDirName));
View Full Code Here

    LocalFileSystem localFs = FileSystem.getLocal(conf);
    int count = 0;

    final FileStatus itemStatus = localFs.getFileStatus(itemToZip);
    if(itemStatus.isDir()) {
      final FileStatus[] statai = localFs.listStatus(itemToZip);

      // Add a directory entry to the zip file
      final String zipDirName = relativePathForZipEntry(itemToZip.toUri().getPath(), baseName, root);
      final ZipEntry dirZipEntry = new ZipEntry(zipDirName + Path.SEPARATOR_CHAR);
      LOG.info(String.format("Adding directory %s to zip", zipDirName));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.