Java 类org.apache.hadoop.fs.viewfs.InodeTree.INode 实例源码

项目:hadoop-oss    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-oss    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:aliyun-oss-hadoop-fs    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:aliyun-oss-hadoop-fs    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws FileNotFoundException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:aliyun-oss-hadoop-fs    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:big-c    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:big-c    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws FileNotFoundException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:big-c    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws FileNotFoundException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-plus    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_RRR,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_RRR,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-plus    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws FileNotFoundException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:hadoop-plus    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hops    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hops    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws IOException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(),
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(),
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:hops    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getShortUserName(), ugi.getPrimaryGroupName(),
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getShortUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-TCP    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_RRR,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_RRR,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-TCP    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws FileNotFoundException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:hadoop-TCP    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hardfs    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_RRR,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_RRR,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hardfs    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws FileNotFoundException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:hardfs    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-on-lustre2    文件:ViewFileSystem.java   
@Override
public FileStatus[] listStatus(Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<FileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<FileSystem> inode = iEntry.getValue();
    if (inode instanceof INodeLink ) {
      INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime, PERMISSION_555,
        ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}
项目:hadoop-on-lustre2    文件:ViewFs.java   
@Override
public FileStatus getFileLinkStatus(final Path f)
    throws FileNotFoundException {
  // look up i internalDirs children - ignore first Slash
  INode<AbstractFileSystem> inode =
    theInternalDir.children.get(f.toUri().toString().substring(1)); 
  if (inode == null) {
    throw new FileNotFoundException(
        "viewFs internal mount table - missing entry:" + f);
  }
  FileStatus result;
  if (inode instanceof INodeLink) {
    INodeLink<AbstractFileSystem> inodelink = 
      (INodeLink<AbstractFileSystem>) inode;
    result = new FileStatus(0, false, 0, 0, creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        inodelink.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
  } else {
    result = new FileStatus(0, true, 0, 0, creationTime, creationTime,
      PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
      new Path(inode.fullPath).makeQualified(
          myUri, null));
  }
  return result;
}
项目:hadoop-on-lustre2    文件:ViewFs.java   
@Override
public FileStatus[] listStatus(final Path f) throws AccessControlException,
    IOException {
  checkPathIsSlash(f);
  FileStatus[] result = new FileStatus[theInternalDir.children.size()];
  int i = 0;
  for (Entry<String, INode<AbstractFileSystem>> iEntry : 
                                      theInternalDir.children.entrySet()) {
    INode<AbstractFileSystem> inode = iEntry.getValue();


    if (inode instanceof INodeLink ) {
      INodeLink<AbstractFileSystem> link = 
        (INodeLink<AbstractFileSystem>) inode;

      result[i++] = new FileStatus(0, false, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        link.getTargetLink(),
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    } else {
      result[i++] = new FileStatus(0, true, 0, 0,
        creationTime, creationTime,
        PERMISSION_555, ugi.getUserName(), ugi.getGroupNames()[0],
        new Path(inode.fullPath).makeQualified(
            myUri, null));
    }
  }
  return result;
}