Java 类org.apache.hadoop.security.AccessControlException 实例源码

项目:hadoop    文件:DFSClient.java   
public void setAcl(String src, List<AclEntry> aclSpec) throws IOException {
  checkOpen();
  TraceScope scope = Trace.startSpan("setAcl", traceSampler);
  try {
    namenode.setAcl(src, aclSpec);
  } catch(RemoteException re) {
    throw re.unwrapRemoteException(AccessControlException.class,
                                   AclException.class,
                                   FileNotFoundException.class,
                                   NSQuotaExceededException.class,
                                   SafeModeException.class,
                                   SnapshotAccessControlException.class,
                                   UnresolvedPathException.class);
  } finally {
    scope.close();
  }
}
项目:hadoop    文件:WebHdfsFileSystem.java   
@Override
public Token<DelegationTokenIdentifier> getDelegationToken(
    final String renewer) throws IOException {
  final HttpOpParam.Op op = GetOpParam.Op.GETDELEGATIONTOKEN;
  Token<DelegationTokenIdentifier> token =
      new FsPathResponseRunner<Token<DelegationTokenIdentifier>>(
          op, null, new RenewerParam(renewer)) {
    @Override
    Token<DelegationTokenIdentifier> decodeResponse(Map<?,?> json)
        throws IOException {
      return JsonUtil.toDelegationToken(json);
    }
  }.run();
  if (token != null) {
    token.setService(tokenServiceName);
  } else {
    if (disallowFallbackToInsecureCluster) {
      throw new AccessControlException(CANT_FALLBACK_TO_INSECURE_MSG);
    }
  }
  return token;
}
项目:hadoop    文件:DataNode.java   
/** Check whether the current user is in the superuser group. */
private void checkSuperuserPrivilege() throws IOException, AccessControlException {
  if (!isPermissionEnabled) {
    return;
  }
  // Try to get the ugi in the RPC call.
  UserGroupInformation callerUgi = ipcServer.getRemoteUser();
  if (callerUgi == null) {
    // This is not from RPC.
    callerUgi = UserGroupInformation.getCurrentUser();
  }

  // Is this by the DN user itself?
  assert dnUserName != null;
  if (callerUgi.getShortUserName().equals(dnUserName)) {
    return;
  }

  // Is the user a member of the super group?
  List<String> groups = Arrays.asList(callerUgi.getGroupNames());
  if (groups.contains(supergroup)) {
    return;
  }
  // Not a superuser.
  throw new AccessControlException();
}
项目:hadoop    文件:FSNamesystem.java   
/**
 * Create a symbolic link.
 */
@SuppressWarnings("deprecation")
void createSymlink(String target, String link,
    PermissionStatus dirPerms, boolean createParent, boolean logRetryCache)
    throws IOException {
  if (!FileSystem.areSymlinksEnabled()) {
    throw new UnsupportedOperationException("Symlinks not supported");
  }
  HdfsFileStatus auditStat = null;
  checkOperation(OperationCategory.WRITE);
  writeLock();
  try {
    checkOperation(OperationCategory.WRITE);
    checkNameNodeSafeMode("Cannot create symlink " + link);
    auditStat = FSDirSymlinkOp.createSymlinkInt(this, target, link, dirPerms,
                                                createParent, logRetryCache);
  } catch (AccessControlException e) {
    logAuditEvent(false, "createSymlink", link, target, null);
    throw e;
  } finally {
    writeUnlock();
  }
  getEditLog().logSync();
  logAuditEvent(true, "createSymlink", link, target, auditStat);
}
项目:hadoop-oss    文件:ViewFs.java   
@Override
public FileStatus getFileStatus(final Path f) throws AccessControlException,
    FileNotFoundException, UnresolvedLinkException, IOException {
  InodeTree.ResolveResult<AbstractFileSystem> res = 
    fsState.resolve(getUriPath(f), true);

  //  FileStatus#getPath is a fully qualified path relative to the root of 
  // target file system.
  // We need to change it to viewfs URI - relative to root of mount table.

  // The implementors of RawLocalFileSystem were trying to be very smart.
  // They implement FileStatus#getOwener lazily -- the object
  // returned is really a RawLocalFileSystem that expect the
  // FileStatus#getPath to be unchanged so that it can get owner when needed.
  // Hence we need to interpose a new ViewFsFileStatus that works around.


  FileStatus status =  res.targetFileSystem.getFileStatus(res.remainingPath);
  return new ViewFsFileStatus(status, this.makeQualified(f));
}
项目:hadoop    文件:DFSClient.java   
public List<String> listXAttrs(String src)
        throws IOException {
  checkOpen();
  TraceScope scope = getPathTraceScope("listXAttrs", src);
  try {
    final Map<String, byte[]> xattrs =
      XAttrHelper.buildXAttrMap(namenode.listXAttrs(src));
    return Lists.newArrayList(xattrs.keySet());
  } catch(RemoteException re) {
    throw re.unwrapRemoteException(AccessControlException.class,
                                   FileNotFoundException.class,
                                   UnresolvedPathException.class);
  } finally {
    scope.close();
  }
}
项目:hadoop    文件:ViewFileSystem.java   
@Override
public FileStatus getFileStatus(final Path f) throws AccessControlException,
    FileNotFoundException, IOException {
  InodeTree.ResolveResult<FileSystem> res = 
    fsState.resolve(getUriPath(f), true);

  // FileStatus#getPath is a fully qualified path relative to the root of 
  // target file system.
  // We need to change it to viewfs URI - relative to root of mount table.

  // The implementors of RawLocalFileSystem were trying to be very smart.
  // They implement FileStatus#getOwener lazily -- the object
  // returned is really a RawLocalFileSystem that expect the
  // FileStatus#getPath to be unchanged so that it can get owner when needed.
  // Hence we need to interpose a new ViewFileSystemFileStatus that 
  // works around.
  FileStatus status =  res.targetFileSystem.getFileStatus(res.remainingPath);
  return new ViewFsFileStatus(status, this.makeQualified(f));
}
项目:hadoop    文件:FSAclBaseTest.java   
@Test
public void testRemoveAclEntriesMustBeOwnerOrSuper() throws Exception {
  Path bruceDir = new Path(path, "bruce");
  Path bruceFile = new Path(bruceDir, "file");
  fs.mkdirs(bruceDir);
  fs.setOwner(bruceDir, "bruce", null);
  fsAsBruce.create(bruceFile).close();
  List<AclEntry> aclSpec = Lists.newArrayList(
    aclEntry(ACCESS, USER, "diana"));
  fsAsBruce.removeAclEntries(bruceFile, aclSpec);
  fs.removeAclEntries(bruceFile, aclSpec);
  fsAsSupergroupMember.removeAclEntries(bruceFile, aclSpec);
  exception.expect(AccessControlException.class);
  fsAsDiana.removeAclEntries(bruceFile, aclSpec);
}
项目:hadoop-oss    文件:FileSystemTestWrapper.java   
@Override
public void createSymlink(Path target, Path link, boolean createParent)
    throws AccessControlException, FileAlreadyExistsException,
    FileNotFoundException, ParentNotDirectoryException,
    UnsupportedFileSystemException, IOException {
  fs.createSymlink(target, link, createParent);
}
项目:hadoop    文件:TestClientReportBadBlock.java   
/**
 * Verify the number of corrupted block replicas by fetching the block
 * location from name node.
 */
private void verifyCorruptedBlockCount(Path filePath, int expectedReplicas)
    throws AccessControlException, FileNotFoundException,
    UnresolvedLinkException, IOException {
  final LocatedBlocks lBlocks = dfs.dfs.getNamenode().getBlockLocations(
      filePath.toUri().getPath(), 0, Long.MAX_VALUE);
  // we expect only the first block of the file is used for this test
  LocatedBlock firstLocatedBlock = lBlocks.get(0);
  Assert.assertEquals(expectedReplicas,
      firstLocatedBlock.getLocations().length);
}
项目:hadoop-oss    文件:FileSystemTestWrapper.java   
@SuppressWarnings("deprecation")
@Override
public void rename(Path src, Path dst, Rename... options)
    throws AccessControlException, FileAlreadyExistsException,
    FileNotFoundException, ParentNotDirectoryException,
    UnsupportedFileSystemException, IOException {
  fs.rename(src, dst, options);
}
项目:hadoop    文件:FileSystemTestWrapper.java   
@SuppressWarnings("deprecation")
@Override
public void rename(Path src, Path dst, Rename... options)
    throws AccessControlException, FileAlreadyExistsException,
    FileNotFoundException, ParentNotDirectoryException,
    UnsupportedFileSystemException, IOException {
  fs.rename(src, dst, options);
}
项目:hadoop-oss    文件:DummyHAService.java   
@Override
public void transitionToStandby(StateChangeRequestInfo req) throws ServiceFailedException,
    AccessControlException, IOException {
  checkUnreachable();
  if (failToBecomeStandby) {
    throw new ServiceFailedException("injected failure");
  }
  if (sharedResource != null) {
    sharedResource.release(DummyHAService.this);
  }
  state = HAServiceState.STANDBY;
}
项目:hadoop-oss    文件:FilterFs.java   
@Override
public RemoteIterator<LocatedFileStatus> listLocatedStatus(final Path f)
    throws AccessControlException, FileNotFoundException,
           UnresolvedLinkException, IOException {
  checkPath(f);
  return myFs.listLocatedStatus(f);
}
项目:hadoop    文件:ZKFailoverController.java   
private void doCedeActive(int millisToCede) 
    throws AccessControlException, ServiceFailedException, IOException {
  int timeout = FailoverController.getGracefulFenceTimeout(conf);

  // Lock elector to maintain lock ordering of elector -> ZKFC
  synchronized (elector) {
    synchronized (this) {
      if (millisToCede <= 0) {
        delayJoiningUntilNanotime = 0;
        recheckElectability();
        return;
      }

      LOG.info("Requested by " + UserGroupInformation.getCurrentUser() +
          " at " + Server.getRemoteAddress() + " to cede active role.");
      boolean needFence = false;
      try {
        localTarget.getProxy(conf, timeout).transitionToStandby(createReqInfo());
        LOG.info("Successfully ensured local node is in standby mode");
      } catch (IOException ioe) {
        LOG.warn("Unable to transition local node to standby: " +
            ioe.getLocalizedMessage());
        LOG.warn("Quitting election but indicating that fencing is " +
            "necessary");
        needFence = true;
      }
      delayJoiningUntilNanotime = System.nanoTime() +
          TimeUnit.MILLISECONDS.toNanos(millisToCede);
      elector.quitElection(needFence);
      serviceState = HAServiceState.INITIALIZING;
    }
  }
  recheckElectability();
}
项目:hadoop-oss    文件:ViewFileSystem.java   
@Override
public void access(Path path, FsAction mode) throws AccessControlException,
    FileNotFoundException, IOException {
  InodeTree.ResolveResult<FileSystem> res =
    fsState.resolve(getUriPath(path), true);
  res.targetFileSystem.access(res.remainingPath, mode);
}
项目: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    文件:DFSClient.java   
/**
 * Resolve the *first* symlink, if any, in the path.
 * 
 * @see ClientProtocol#getLinkTarget(String)
 */
public String getLinkTarget(String path) throws IOException { 
  checkOpen();
  TraceScope scope = getPathTraceScope("getLinkTarget", path);
  try {
    return namenode.getLinkTarget(path);
  } catch (RemoteException re) {
    throw re.unwrapRemoteException(AccessControlException.class,
                                   FileNotFoundException.class);
  } finally {
    scope.close();
  }
}
项目: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;
}
项目:hadoop    文件:ViewFs.java   
@Override
public Path resolvePath(final Path f) throws FileNotFoundException,
        AccessControlException, UnresolvedLinkException, IOException {
  final InodeTree.ResolveResult<AbstractFileSystem> res;
    res = fsState.resolve(getUriPath(f), true);
  if (res.isInternalDir()) {
    return f;
  }
  return res.targetFileSystem.resolvePath(res.remainingPath);

}
项目:hadoop    文件:TestMRAppMaster.java   
@BeforeClass
public static void setup() throws AccessControlException,
    FileNotFoundException, IllegalArgumentException, IOException {
  //Do not error out if metrics are inited multiple times
  DefaultMetricsSystem.setMiniClusterMode(true);
  File dir = new File(stagingDir);
  stagingDir = dir.getAbsolutePath();
  localFS = FileContext.getLocalFSFileContext();
  localFS.delete(new Path(testDir.getAbsolutePath()), true);
  testDir.mkdir();
}
项目:hadoop    文件:ViewFs.java   
@Override
public boolean setReplication(final Path f, final short replication)
    throws AccessControlException, FileNotFoundException,
    UnresolvedLinkException, IOException {
  InodeTree.ResolveResult<AbstractFileSystem> res = 
    fsState.resolve(getUriPath(f), true);
  return res.targetFileSystem.setReplication(res.remainingPath, replication);
}
项目:hadoop    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public void fsync(String src, long fileId, String client,
                  long lastBlockLength)
    throws AccessControlException, FileNotFoundException,
    UnresolvedLinkException, IOException {
  FsyncRequestProto req = FsyncRequestProto.newBuilder().setSrc(src)
      .setClient(client).setLastBlockLength(lastBlockLength)
          .setFileId(fileId).build();
  try {
    rpcProxy.fsync(null, req);
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop    文件:ViewFileSystem.java   
@Override
public FSDataOutputStream create(final Path f,
    final FsPermission permission, final boolean overwrite,
    final int bufferSize, final short replication, final long blockSize,
    final Progressable progress) throws AccessControlException {
  throw readOnlyMountTable("create", f);
}
项目:hadoop-oss    文件:ViewFs.java   
@Override
public boolean truncate(final Path f, final long newLength)
    throws AccessControlException, FileNotFoundException,
    UnresolvedLinkException, IOException {
  InodeTree.ResolveResult<AbstractFileSystem> res =
      fsState.resolve(getUriPath(f), true);
  return res.targetFileSystem.truncate(res.remainingPath, newLength);
}
项目:hadoop    文件:DFSClient.java   
public void checkAccess(String src, FsAction mode) throws IOException {
  checkOpen();
  TraceScope scope = getPathTraceScope("checkAccess", src);
  try {
    namenode.checkAccess(src, mode);
  } catch (RemoteException re) {
    throw re.unwrapRemoteException(AccessControlException.class,
        FileNotFoundException.class,
        UnresolvedPathException.class);
  } finally {
    scope.close();
  }
}
项目:hadoop    文件:ViewFileSystem.java   
@Override
public void setOwner(final Path f, final String username,
    final String groupname) throws AccessControlException,
    FileNotFoundException,
    IOException {
  InodeTree.ResolveResult<FileSystem> res = 
    fsState.resolve(getUriPath(f), true);
  res.targetFileSystem.setOwner(res.remainingPath, username, groupname); 
}
项目:hadoop-oss    文件:AbstractFileSystem.java   
/**
 * The specification of this method matches that of
 * {@link #create(Path, EnumSet, Options.CreateOpts...)} except that the opts
 * have been declared explicitly.
 */
public abstract FSDataOutputStream createInternal(Path f,
    EnumSet<CreateFlag> flag, FsPermission absolutePermission,
    int bufferSize, short replication, long blockSize, Progressable progress,
    ChecksumOpt checksumOpt, boolean createParent)
    throws AccessControlException, FileAlreadyExistsException,
    FileNotFoundException, ParentNotDirectoryException,
    UnsupportedFileSystemException, UnresolvedLinkException, IOException;
项目:dremio-oss    文件:TestPseudoDistributedFileSystem.java   
@Test
public void testOpenRoot() throws IOException {
  Path root = new Path("/");
  try {
    fs.open(root);
    fail("Expected open call to throw an exception");
  } catch (AccessControlException e) {
    // ok
  }
}
项目:hadoop    文件:FileContext.java   
/**
 * Resolves all symbolic links in the specified path.
 * Returns the new path object.
 */
protected Path resolve(final Path f) throws FileNotFoundException,
    UnresolvedLinkException, AccessControlException, IOException {
  return new FSLinkResolver<Path>() {
    @Override
    public Path next(final AbstractFileSystem fs, final Path p) 
      throws IOException, UnresolvedLinkException {
      return fs.resolvePath(p);
    }
  }.resolve(this, f);
}
项目:hadoop    文件:TestFsck.java   
public void removeBlocks(MiniDFSCluster cluster)
    throws AccessControlException, FileNotFoundException,
    UnresolvedLinkException, IOException {
  for (int corruptIdx : blocksToCorrupt) {
    // Corrupt a block by deleting it
    ExtendedBlock block = dfsClient.getNamenode().getBlockLocations(
        name, blockSize * corruptIdx, Long.MAX_VALUE).get(0).getBlock();
    for (int i = 0; i < numDataNodes; i++) {
      File blockFile = cluster.getBlockFile(i, block);
      if(blockFile != null && blockFile.exists()) {
        assertTrue(blockFile.delete());
      }
    }
  }
}
项目:hadoop    文件:DFSClient.java   
/**
 * Sets or resets quotas for a directory.
 * @see ClientProtocol#setQuota(String, long, long, StorageType)
 */
void setQuota(String src, long namespaceQuota, long storagespaceQuota)
    throws IOException {
  // sanity check
  if ((namespaceQuota <= 0 && namespaceQuota != HdfsConstants.QUOTA_DONT_SET &&
       namespaceQuota != HdfsConstants.QUOTA_RESET) ||
      (storagespaceQuota <= 0 && storagespaceQuota != HdfsConstants.QUOTA_DONT_SET &&
       storagespaceQuota != HdfsConstants.QUOTA_RESET)) {
    throw new IllegalArgumentException("Invalid values for quota : " +
                                       namespaceQuota + " and " +
                                       storagespaceQuota);

  }
  TraceScope scope = getPathTraceScope("setQuota", src);
  try {
    // Pass null as storage type for traditional namespace/storagespace quota.
    namenode.setQuota(src, namespaceQuota, storagespaceQuota, null);
  } catch(RemoteException re) {
    throw re.unwrapRemoteException(AccessControlException.class,
                                   FileNotFoundException.class,
                                   NSQuotaExceededException.class,
                                   DSQuotaExceededException.class,
                                   UnresolvedPathException.class,
                                   SnapshotAccessControlException.class);
  } finally {
    scope.close();
  }
}
项目:hadoop    文件:FSWrapper.java   
abstract public void mkdir(final Path dir, final FsPermission permission,
final boolean createParent) throws AccessControlException,
FileAlreadyExistsException, FileNotFoundException,
ParentNotDirectoryException, UnsupportedFileSystemException, IOException;
项目:hadoop-oss    文件:FileContextTestWrapper.java   
@Override
public BlockLocation[] getFileBlockLocations(Path f, long start, long len)
    throws AccessControlException, FileNotFoundException,
    UnsupportedFileSystemException, IOException {
  return fc.getFileBlockLocations(f, start, len);
}
项目:hadoop    文件:FSPermissionChecker.java   
/** Guarded by {@link FSNamesystem#readLock()} */
private void check(INodeAttributes[] inodes, String path, int i, FsAction access
    ) throws AccessControlException {
  check(i >= 0 ? inodes[i] : null, path, access);
}
项目:hadoop-oss    文件:ZKFCRpcServer.java   
@Override
public void cedeActive(int millisToCede) throws IOException,
    AccessControlException {
  zkfc.checkRpcAdminAccess();
  zkfc.cedeActive(millisToCede);
}
项目:hadoop    文件:ViewFileSystemBaseTest.java   
@Test(expected=AccessControlException.class)
public void testInternalRemoveXAttr() throws IOException {
  fsView.removeXAttr(new Path("/internalDir"), "xattrName");
}
项目:hadoop    文件:TestAMAuthorization.java   
@Test
public void testUnauthorizedAccess() throws Exception {
  MyContainerManager containerManager = new MyContainerManager();
  rm = new MockRMWithAMS(conf, containerManager);
  rm.start();

  MockNM nm1 = rm.registerNode("localhost:1234", 5120);

  RMApp app = rm.submitApp(1024);

  nm1.nodeHeartbeat(true);

  int waitCount = 0;
  while (containerManager.containerTokens == null && waitCount++ < 40) {
    LOG.info("Waiting for AM Launch to happen..");
    Thread.sleep(1000);
  }
  Assert.assertNotNull(containerManager.containerTokens);

  RMAppAttempt attempt = app.getCurrentAppAttempt();
  ApplicationAttemptId applicationAttemptId = attempt.getAppAttemptId();
  waitForLaunchedState(attempt);

  final Configuration conf = rm.getConfig();
  final YarnRPC rpc = YarnRPC.create(conf);
  final InetSocketAddress serviceAddr = conf.getSocketAddr(
      YarnConfiguration.RM_SCHEDULER_ADDRESS,
      YarnConfiguration.DEFAULT_RM_SCHEDULER_ADDRESS,
      YarnConfiguration.DEFAULT_RM_SCHEDULER_PORT);

  UserGroupInformation currentUser = UserGroupInformation
      .createRemoteUser(applicationAttemptId.toString());

  // First try contacting NM without tokens
  ApplicationMasterProtocol client = currentUser
      .doAs(new PrivilegedAction<ApplicationMasterProtocol>() {
        @Override
        public ApplicationMasterProtocol run() {
          return (ApplicationMasterProtocol) rpc.getProxy(ApplicationMasterProtocol.class,
              serviceAddr, conf);
        }
      });

  RegisterApplicationMasterRequest request = Records
      .newRecord(RegisterApplicationMasterRequest.class);
  try {
    client.registerApplicationMaster(request);
    Assert.fail("Should fail with authorization error");
  } catch (Exception e) {
    if (isCause(AccessControlException.class, e)) {
      // Because there are no tokens, the request should be rejected as the
      // server side will assume we are trying simple auth.
      String expectedMessage = "";
      if (UserGroupInformation.isSecurityEnabled()) {
        expectedMessage = "Client cannot authenticate via:[TOKEN]";
      } else {
        expectedMessage =
            "SIMPLE authentication is not enabled.  Available:[TOKEN]";
      }
      Assert.assertTrue(e.getCause().getMessage().contains(expectedMessage)); 
    } else {
      throw e;
    }
  }

  // TODO: Add validation of invalid authorization when there's more data in
  // the AMRMToken
}
项目:hadoop    文件:ViewFsBaseTest.java   
@Test(expected=AccessControlException.class) 
public void testInternalCreateMissingDir() throws IOException {
  fileContextTestHelper.createFile(fcView, "/missingDir/foo");
}
项目:hadoop-oss    文件:FileSystemTestWrapper.java   
@Override
public FSDataInputStream open(Path f) throws AccessControlException,
    FileNotFoundException, UnsupportedFileSystemException, IOException {
  return fs.open(f);
}