@Test public void testServerDefaultsInternalDir() throws Exception { FsServerDefaults localDefs = LocalConfigKeys.getServerDefaults(); FsServerDefaults viewDefs = fcView .getDefaultFileSystem().getServerDefaults(new Path("/internalDir")); assertEquals(localDefs.getReplication(), viewDefs.getReplication()); assertEquals(localDefs.getBlockSize(), viewDefs.getBlockSize()); assertEquals(localDefs.getBytesPerChecksum(), viewDefs.getBytesPerChecksum()); assertEquals(localDefs.getFileBufferSize(), viewDefs.getFileBufferSize()); assertEquals(localDefs.getWritePacketSize(), viewDefs.getWritePacketSize()); assertEquals(localDefs.getEncryptDataTransfer(), viewDefs.getEncryptDataTransfer()); assertEquals(localDefs.getTrashInterval(), viewDefs.getTrashInterval()); assertEquals(localDefs.getChecksumType(), viewDefs.getChecksumType()); }
@Override public FsServerDefaults getServerDefaults(final Path f) throws IOException { InodeTree.ResolveResult<AbstractFileSystem> res; try { res = fsState.resolve(getUriPath(f), true); } catch (FileNotFoundException fnfe) { return LocalConfigKeys.getServerDefaults(); } return res.targetFileSystem.getServerDefaults(res.remainingPath); }
@Override public FsServerDefaults getServerDefaults() throws IOException { return LocalConfigKeys.getServerDefaults(); }
/** {@inheritDoc} */ @Override public FsServerDefaults getServerDefaults() throws IOException { return LocalConfigKeys.getServerDefaults(); }
@Override @Deprecated public FsServerDefaults getServerDefaults() throws IOException { return LocalConfigKeys.getServerDefaults(); }
@Override public FsServerDefaults getServerDefaults(final Path f) throws IOException { return LocalConfigKeys.getServerDefaults(); }