Package org.apache.flink.core.fs.local

Examples of org.apache.flink.core.fs.local.LocalFileSystem.listStatus()


      // check that lfs recognizes directory..
      assertTrue(localstatus1.isDir());

      // get status for files in this (empty) directory..
      final FileStatus[] statusforfiles = lfs.listStatus(pathtotmpdir);

      // no files in there.. hence, must be zero
      assertTrue(statusforfiles.length == 0);

      // check that lfs can delete directory..
View Full Code Here


      // does lfs see the correct file length?
      assertEquals(lfs.getFileStatus(pathtotestfile1).getLen(), testfile1.length());

      // as well, when we call the listStatus (that is intended for directories?)
      assertEquals(lfs.listStatus(pathtotestfile1)[0].getLen(), testfile1.length());

      // test that lfs can read files properly
      final FileOutputStream fosfile2 = new FileOutputStream(testfile2);
      fosfile2.write(testbytes);
      fosfile2.close();
View Full Code Here

      assertEquals(lfsinput2.read(testbytestest), 5);
      lfsinput2.close();
      assertTrue(Arrays.equals(testbytes, testbytestest));

      // does lfs see two files?
      assertEquals(lfs.listStatus(pathtotmpdir).length, 2);

      // do we get exactly one blocklocation per file? no matter what start and len we provide
      assertEquals(lfs.getFileBlockLocations(lfs.getFileStatus(pathtotestfile1), 0, 0).length, 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.