Java 类org.apache.hadoop.hdfs.server.namenode.FSImageFormatPBINode 实例源码

项目:hadoop    文件:FSImageLoader.java   
private List<AclEntry> getAclEntryList(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          f.getAcl(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          d.getAcl(), stringTable);
    }
    default: {
      return new ArrayList<AclEntry>();
    }
  }
}
项目:hadoop    文件:FSImageLoader.java   
private PermissionStatus getPermissionStatus(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadPermission(
          f.getPermission(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadPermission(
          d.getPermission(), stringTable);
    }
    case SYMLINK: {
      FsImageProto.INodeSection.INodeSymlink s = inode.getSymlink();
      return FSImageFormatPBINode.Loader.loadPermission(
          s.getPermission(), stringTable);
    }
    default: {
      return null;
    }
  }
}
项目:aliyun-oss-hadoop-fs    文件:FSImageLoader.java   
private List<AclEntry> getAclEntryList(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          f.getAcl(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          d.getAcl(), stringTable);
    }
    default: {
      return new ArrayList<AclEntry>();
    }
  }
}
项目:aliyun-oss-hadoop-fs    文件:FSImageLoader.java   
private PermissionStatus getPermissionStatus(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadPermission(
          f.getPermission(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadPermission(
          d.getPermission(), stringTable);
    }
    case SYMLINK: {
      FsImageProto.INodeSection.INodeSymlink s = inode.getSymlink();
      return FSImageFormatPBINode.Loader.loadPermission(
          s.getPermission(), stringTable);
    }
    default: {
      return null;
    }
  }
}
项目:big-c    文件:FSImageLoader.java   
private List<AclEntry> getAclEntryList(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          f.getAcl(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          d.getAcl(), stringTable);
    }
    default: {
      return new ArrayList<AclEntry>();
    }
  }
}
项目:big-c    文件:FSImageLoader.java   
private PermissionStatus getPermissionStatus(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadPermission(
          f.getPermission(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadPermission(
          d.getPermission(), stringTable);
    }
    case SYMLINK: {
      FsImageProto.INodeSection.INodeSymlink s = inode.getSymlink();
      return FSImageFormatPBINode.Loader.loadPermission(
          s.getPermission(), stringTable);
    }
    default: {
      return null;
    }
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSImageLoader.java   
private List<AclEntry> getAclEntryList(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          f.getAcl(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          d.getAcl(), stringTable);
    }
    default: {
      return new ArrayList<AclEntry>();
    }
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSImageLoader.java   
private PermissionStatus getPermissionStatus(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadPermission(
          f.getPermission(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadPermission(
          d.getPermission(), stringTable);
    }
    case SYMLINK: {
      FsImageProto.INodeSection.INodeSymlink s = inode.getSymlink();
      return FSImageFormatPBINode.Loader.loadPermission(
          s.getPermission(), stringTable);
    }
    default: {
      return null;
    }
  }
}
项目:FlexMap    文件:FSImageLoader.java   
private List<AclEntry> getAclEntryList(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          f.getAcl(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadAclEntries(
          d.getAcl(), stringTable);
    }
    default: {
      return new ArrayList<AclEntry>();
    }
  }
}
项目:FlexMap    文件:FSImageLoader.java   
private PermissionStatus getPermissionStatus(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE: {
      FsImageProto.INodeSection.INodeFile f = inode.getFile();
      return FSImageFormatPBINode.Loader.loadPermission(
          f.getPermission(), stringTable);
    }
    case DIRECTORY: {
      FsImageProto.INodeSection.INodeDirectory d = inode.getDirectory();
      return FSImageFormatPBINode.Loader.loadPermission(
          d.getPermission(), stringTable);
    }
    case SYMLINK: {
      FsImageProto.INodeSection.INodeSymlink s = inode.getSymlink();
      return FSImageFormatPBINode.Loader.loadPermission(
          s.getPermission(), stringTable);
    }
    default: {
      return null;
    }
  }
}
项目:hadoop    文件:FSImageLoader.java   
private List<XAttr> getXAttrList(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
    case FILE:
      return FSImageFormatPBINode.Loader.loadXAttrs(
              inode.getFile().getXAttrs(), stringTable);
    case DIRECTORY:
      return FSImageFormatPBINode.Loader.loadXAttrs(inode.getDirectory()
              .getXAttrs(), stringTable);
    default:
      return null;
  }
}
项目:aliyun-oss-hadoop-fs    文件:PBImageXmlWriter.java   
private void dumpAcls(AclFeatureProto aclFeatureProto) {
  ImmutableList<AclEntry> aclEntryList = FSImageFormatPBINode.Loader
      .loadAclEntries(aclFeatureProto, stringTable);
  if (aclEntryList.size() > 0) {
    out.print("<acls>");
    for (AclEntry aclEntry : aclEntryList) {
      o("acl", aclEntry.toString());
    }
    out.print("</acls>");
  }
}
项目:aliyun-oss-hadoop-fs    文件:FSImageLoader.java   
private List<XAttr> getXAttrList(String path) throws IOException {
  long id = lookup(path);
  FsImageProto.INodeSection.INode inode = fromINodeId(id);
  switch (inode.getType()) {
  case FILE:
    return FSImageFormatPBINode.Loader.loadXAttrs(
        inode.getFile().getXAttrs(), stringTable);
  case DIRECTORY:
    return FSImageFormatPBINode.Loader.loadXAttrs(inode.getDirectory()
        .getXAttrs(), stringTable);
  default:
    return null;
  }
}
项目:hadoop    文件:PBImageTextWriter.java   
protected PermissionStatus getPermission(long perm) {
  return FSImageFormatPBINode.Loader.loadPermission(perm, stringTable);
}
项目:hadoop    文件:PBImageXmlWriter.java   
private String dumpPermission(long permission) {
  return FSImageFormatPBINode.Loader.loadPermission(permission, stringTable)
      .toString();
}
项目:aliyun-oss-hadoop-fs    文件:PBImageTextWriter.java   
protected PermissionStatus getPermission(long perm) {
  return FSImageFormatPBINode.Loader.loadPermission(perm, stringTable);
}
项目:aliyun-oss-hadoop-fs    文件:PBImageXmlWriter.java   
private String dumpPermission(long permission) {
  return FSImageFormatPBINode.Loader.loadPermission(permission, stringTable)
      .toString();
}
项目:big-c    文件:PBImageTextWriter.java   
protected PermissionStatus getPermission(long perm) {
  return FSImageFormatPBINode.Loader.loadPermission(perm, stringTable);
}
项目:big-c    文件:PBImageXmlWriter.java   
private String dumpPermission(long permission) {
  return FSImageFormatPBINode.Loader.loadPermission(permission, stringTable)
      .toString();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBImageTextWriter.java   
protected PermissionStatus getPermission(long perm) {
  return FSImageFormatPBINode.Loader.loadPermission(perm, stringTable);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBImageXmlWriter.java   
private String dumpPermission(long permission) {
  return FSImageFormatPBINode.Loader.loadPermission(permission, stringTable)
      .toString();
}
项目:FlexMap    文件:PBImageXmlWriter.java   
private String dumpPermission(long permission) {
  return FSImageFormatPBINode.Loader.loadPermission(permission, stringTable)
      .toString();
}
项目:hadoop-on-lustre2    文件:PBImageXmlWriter.java   
private String dumpPermission(long permission) {
  return FSImageFormatPBINode.Loader.loadPermission(permission, stringTable)
      .toString();
}