• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java INode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.fs.viewfs.InodeTree.INode的典型用法代码示例。如果您正苦于以下问题:Java INode类的具体用法?Java INode怎么用?Java INode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



INode类属于org.apache.hadoop.fs.viewfs.InodeTree包,在下文中一共展示了INode类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: listStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:29,代码来源:ViewFileSystem.java


示例2: listStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:32,代码来源:ViewFs.java


示例3: getFileLinkStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:28,代码来源:ViewFs.java


示例4: listStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:29,代码来源:ViewFileSystem.java


示例5: getFileLinkStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:28,代码来源:ViewFs.java


示例6: listStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:32,代码来源:ViewFs.java


示例7: getFileLinkStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:28,代码来源:ViewFs.java


示例8: listStatus

import org.apache.hadoop.fs.viewfs.InodeTree.INode; //导入依赖的package包/类
@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;
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:32,代码来源:ViewFs.java



注:本文中的org.apache.hadoop.fs.viewfs.InodeTree.INode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ProxyMethodInvocation类代码示例发布时间:2022-05-22
下一篇:
Java DynamicStub类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap