Java 类org.apache.hadoop.fs.swift.snative.SwiftFileStatus 实例源码

项目:hadoop    文件:TestSwiftFileSystemDirectories.java   
/**
 * test that a dir off root has a listStatus() call that
 * works as expected. and that when a child is added. it changes
 *
 * @throws Exception on failures
 */
@Test(timeout = SWIFT_TEST_TIMEOUT)
public void testDirectoriesOffRootHaveMatchingFileStatus() throws Exception {
  Path test = path("/test");
  fs.delete(test, true);
  mkdirs(test);
  assertExists("created test directory", test);
  FileStatus[] statuses = fs.listStatus(test);
  String statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 0,
               statuses.length);

  Path src = path("/test/file");

  //create a zero byte file
  SwiftTestUtils.touch(fs, src);
  //stat it
  statuses = fs.listStatus(test);
  statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 1,
               statuses.length);
  SwiftFileStatus stat = (SwiftFileStatus) statuses[0];
  assertTrue("isDir(): Not a directory: " + stat, stat.isDir());
  extraStatusAssertions(stat);
}
项目:aliyun-oss-hadoop-fs    文件:TestSwiftFileSystemDirectories.java   
/**
 * test that a dir off root has a listStatus() call that
 * works as expected. and that when a child is added. it changes
 *
 * @throws Exception on failures
 */
@Test(timeout = SWIFT_TEST_TIMEOUT)
public void testDirectoriesOffRootHaveMatchingFileStatus() throws Exception {
  Path test = path("/test");
  fs.delete(test, true);
  mkdirs(test);
  assertExists("created test directory", test);
  FileStatus[] statuses = fs.listStatus(test);
  String statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 0,
               statuses.length);

  Path src = path("/test/file");

  //create a zero byte file
  SwiftTestUtils.touch(fs, src);
  //stat it
  statuses = fs.listStatus(test);
  statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 1,
               statuses.length);
  SwiftFileStatus stat = (SwiftFileStatus) statuses[0];
  assertTrue("isDir(): Not a directory: " + stat, stat.isDir());
  extraStatusAssertions(stat);
}
项目:big-c    文件:TestSwiftFileSystemDirectories.java   
/**
 * test that a dir off root has a listStatus() call that
 * works as expected. and that when a child is added. it changes
 *
 * @throws Exception on failures
 */
@Test(timeout = SWIFT_TEST_TIMEOUT)
public void testDirectoriesOffRootHaveMatchingFileStatus() throws Exception {
  Path test = path("/test");
  fs.delete(test, true);
  mkdirs(test);
  assertExists("created test directory", test);
  FileStatus[] statuses = fs.listStatus(test);
  String statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 0,
               statuses.length);

  Path src = path("/test/file");

  //create a zero byte file
  SwiftTestUtils.touch(fs, src);
  //stat it
  statuses = fs.listStatus(test);
  statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 1,
               statuses.length);
  SwiftFileStatus stat = (SwiftFileStatus) statuses[0];
  assertTrue("isDir(): Not a directory: " + stat, stat.isDir());
  extraStatusAssertions(stat);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSwiftFileSystemDirectories.java   
/**
 * test that a dir off root has a listStatus() call that
 * works as expected. and that when a child is added. it changes
 *
 * @throws Exception on failures
 */
@Test(timeout = SWIFT_TEST_TIMEOUT)
public void testDirectoriesOffRootHaveMatchingFileStatus() throws Exception {
  Path test = path("/test");
  fs.delete(test, true);
  mkdirs(test);
  assertExists("created test directory", test);
  FileStatus[] statuses = fs.listStatus(test);
  String statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 0,
               statuses.length);

  Path src = path("/test/file");

  //create a zero byte file
  SwiftTestUtils.touch(fs, src);
  //stat it
  statuses = fs.listStatus(test);
  statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 1,
               statuses.length);
  SwiftFileStatus stat = (SwiftFileStatus) statuses[0];
  assertTrue("isDir(): Not a directory: " + stat, stat.isDir());
  extraStatusAssertions(stat);
}
项目:hops    文件:TestSwiftFileSystemDirectories.java   
/**
 * test that a dir off root has a listStatus() call that
 * works as expected. and that when a child is added. it changes
 *
 * @throws Exception on failures
 */
@Test(timeout = SWIFT_TEST_TIMEOUT)
public void testDirectoriesOffRootHaveMatchingFileStatus() throws Exception {
  Path test = path("/test");
  fs.delete(test, true);
  mkdirs(test);
  assertExists("created test directory", test);
  FileStatus[] statuses = fs.listStatus(test);
  String statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 0,
               statuses.length);

  Path src = path("/test/file");

  //create a zero byte file
  SwiftTestUtils.touch(fs, src);
  //stat it
  statuses = fs.listStatus(test);
  statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 1,
               statuses.length);
  SwiftFileStatus stat = (SwiftFileStatus) statuses[0];
  assertTrue("isDir(): Not a directory: " + stat, stat.isDir());
  extraStatusAssertions(stat);
}
项目:hadoop-on-lustre2    文件:TestSwiftFileSystemDirectories.java   
/**
 * test that a dir off root has a listStatus() call that
 * works as expected. and that when a child is added. it changes
 *
 * @throws Exception on failures
 */
@Test(timeout = SWIFT_TEST_TIMEOUT)
public void testDirectoriesOffRootHaveMatchingFileStatus() throws Exception {
  Path test = path("/test");
  fs.delete(test, true);
  mkdirs(test);
  assertExists("created test directory", test);
  FileStatus[] statuses = fs.listStatus(test);
  String statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 0,
               statuses.length);

  Path src = path("/test/file");

  //create a zero byte file
  SwiftTestUtils.touch(fs, src);
  //stat it
  statuses = fs.listStatus(test);
  statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 1,
               statuses.length);
  SwiftFileStatus stat = (SwiftFileStatus) statuses[0];
  assertTrue("isDir(): Not a directory: " + stat, stat.isDir());
  extraStatusAssertions(stat);
}
项目:sahara-extra    文件:TestSwiftFileSystemDirectories.java   
/**
 * test that a dir off root has a listStatus() call that
 * works as expected. and that when a child is added. it changes
 *
 * @throws Exception on failures
 */
@Test(timeout = SWIFT_TEST_TIMEOUT)
public void testDirectoriesOffRootHaveMatchingFileStatus() throws Exception {
  Path test = path("/test");
  fs.delete(test, true);
  mkdirs(test);
  assertExists("created test directory", test);
  FileStatus[] statuses = fs.listStatus(test);
  String statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 0,
               statuses.length);

  Path src = path("/test/file");

  //create a directory
  fs.mkdirs(src);
  //stat it
  statuses = fs.listStatus(test);
  statusString = statusToString(test.toString(), statuses);
  assertEquals("Wrong number of elements in file status " + statusString, 1,
               statuses.length);
  SwiftFileStatus stat = (SwiftFileStatus) statuses[0];
  assertTrue("isDir(): Not a directory: " + stat, stat.isDir());
  extraStatusAssertions(stat);
}
项目:hadoop    文件:TestSwiftFileSystemDirectoriesHdfs2.java   
/**
 * make assertions about fields that only appear in
 * FileStatus in HDFS2
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {
  //HDFS2
  assertTrue("isDirectory(): Not a directory: " + stat, stat.isDirectory());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isFile());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isSymlink());
}
项目:aliyun-oss-hadoop-fs    文件:TestSwiftFileSystemDirectoriesHdfs2.java   
/**
 * make assertions about fields that only appear in
 * FileStatus in HDFS2
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {
  //HDFS2
  assertTrue("isDirectory(): Not a directory: " + stat, stat.isDirectory());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isFile());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isSymlink());
}
项目:big-c    文件:TestSwiftFileSystemDirectoriesHdfs2.java   
/**
 * make assertions about fields that only appear in
 * FileStatus in HDFS2
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {
  //HDFS2
  assertTrue("isDirectory(): Not a directory: " + stat, stat.isDirectory());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isFile());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isSymlink());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSwiftFileSystemDirectoriesHdfs2.java   
/**
 * make assertions about fields that only appear in
 * FileStatus in HDFS2
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {
  //HDFS2
  assertTrue("isDirectory(): Not a directory: " + stat, stat.isDirectory());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isFile());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isSymlink());
}
项目:hops    文件:TestSwiftFileSystemDirectoriesHdfs2.java   
/**
 * make assertions about fields that only appear in
 * FileStatus in HDFS2
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {
  //HDFS2
  assertTrue("isDirectory(): Not a directory: " + stat, stat.isDirectory());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isFile());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isSymlink());
}
项目:hadoop-on-lustre2    文件:TestSwiftFileSystemDirectoriesHdfs2.java   
/**
 * make assertions about fields that only appear in
 * FileStatus in HDFS2
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {
  //HDFS2
  assertTrue("isDirectory(): Not a directory: " + stat, stat.isDirectory());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isFile());
  assertFalse("isFile(): declares itself a file: " + stat, stat.isSymlink());
}
项目:hadoop    文件:TestSwiftFileSystemDirectories.java   
/**
 * method for subclasses to add extra assertions
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {

}
项目:aliyun-oss-hadoop-fs    文件:TestSwiftFileSystemDirectories.java   
/**
 * method for subclasses to add extra assertions
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {

}
项目:big-c    文件:TestSwiftFileSystemDirectories.java   
/**
 * method for subclasses to add extra assertions
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {

}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSwiftFileSystemDirectories.java   
/**
 * method for subclasses to add extra assertions
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {

}
项目:hops    文件:TestSwiftFileSystemDirectories.java   
/**
 * method for subclasses to add extra assertions
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {

}
项目:hadoop-on-lustre2    文件:TestSwiftFileSystemDirectories.java   
/**
 * method for subclasses to add extra assertions
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {

}
项目:sahara-extra    文件:TestSwiftFileSystemDirectories.java   
/**
 * method for subclasses to add extra assertions
 * @param stat status to look at
 */
protected void extraStatusAssertions(SwiftFileStatus stat) {

}