Examples of listStatus()


Examples of org.apache.hadoop.hdfs.web.WebHdfsFileSystem.listStatus()

      URI uri = new URI("webhdfs://localhost:" + String.valueOf(port));
      Configuration conf = new Configuration();
      WebHdfsFileSystem webhdfs = (WebHdfsFileSystem)FileSystem.get(uri, conf);

      // verify the number of directories
      FileStatus[] statuses = webhdfs.listStatus(new Path("/"));
      assertEquals(NUM_DIRS + 2, statuses.length); // contains empty and xattr directory

      // verify the number of files in the directory
      statuses = webhdfs.listStatus(new Path("/dir0"));
      assertEquals(FILES_PER_DIR, statuses.length);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.test.system.JTClient.listStatus()

          myCluster = MRCluster.createCluster(cluster.getConf());
          myCluster.connect();
          JTClient jt = myCluster.getJTClient();
          String dir = ".";
          checkFileStatus(jt.getFileStatus(dir, true));
          checkFileStatus(jt.listStatus(dir, false, true), dir);
          for (TTClient tt : myCluster.getTTClients()) {
            String[] localDirs = tt.getMapredLocalDirs();
            for (String localDir : localDirs) {
              checkFileStatus(tt.listStatus(localDir, true, false), localDir);
              checkFileStatus(tt.listStatus(localDir, true, true), localDir);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.test.system.TTClient.listStatus()

          Assert.assertTrue("Directory Permission is not 700",
            fsPermMapredLocalDirUserName.equals(new FsPermission("700")));

          //Get file status of all the directories
          //and files under that path.
          FileStatus[] fileStatuses = tClient.listStatus(localDir,
              true, true);
          for (FileStatus  fileStatus : fileStatuses) {
            Path path = fileStatus.getPath();
            LOG.info("path is :" + path.toString());
            //Checking if the received path ends with
View Full Code Here

Examples of org.apache.pig.piggybank.storage.partition.PathPartitionHelper.listStatus()

  partitionHelper.setPartitionFilterExpression("year < '2010'",
    PigStorage.class, "1");
  partitionHelper.setPartitionKeys(baseDir.getAbsolutePath(), conf,
    PigStorage.class, "1");

  List<FileStatus> files = partitionHelper.listStatus(jobContext,
    PigStorage.class, "1");

  assertEquals(0, files.size());

    }
View Full Code Here

Examples of tachyon.client.TachyonFS.listStatus()

      return new long[] {1L, 0L, tFile.length()};
    }

    long[] rtn = new long[] {0L, 1L, 0L};

    List<ClientFileInfo> files = tachyonClient.listStatus(path);
    Collections.sort(files);
    for (ClientFileInfo file : files) {
      long[] toAdd = countHelper(new TachyonURI(file.getPath()));
      rtn[0] += toAdd[0];
      rtn[1] += toAdd[1];
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.