@Test public void testEOF() throws IOException { Directory fsDir = FSDirectory.open(new File(file, "normal")); String name = "test.eof"; createFile(name, fsDir, directory); long fsLength = fsDir.fileLength(name); long hdfsLength = directory.fileLength(name); assertEquals(fsLength, hdfsLength); testEof(name, fsDir, fsLength); testEof(name, directory, hdfsLength); }
@Override public long fileLength(String name) throws IOException { return _directory.fileLength(name); }
BlockDirectory extends Directory implements DirectoryDecorator { @Override public long fileLength(String name) throws IOException { return _directory.fileLength(name); } }
BlockDirectory extends Directory implements DirectoryDecorator { @Override public long fileLength(String name) throws IOException { return _directory.fileLength(name); } BlockDirectory(String dirName, Directory directory);  BlockDirectory(String dirName, Directory directory, Cache cache);  BlockDirectory(String dirName, Directory directory, Cache cache, Set<String> blockCacheFileTypes); }
BlockDirectory extends Directory implements DirectoryDecorator { @Override public long fileLength(String name) throws IOException { return _directory.fileLength(name); } BlockDirectory(String dirName, Directory directory);  BlockDirectory(String dirName, Directory directory, Cache cache);  BlockDirectory(String dirName, Directory directory, Cache cache, Set<String> blockCacheFileTypes); static long getBlock(long pos); static long getPosition(long pos); static long getRealPosition(long block, long positionInBlock); @Override IndexInput openInput(final String name, IOContext context); @Override void close(); void clearLock(String name); @Override void copy(Directory to, String src, String dest, IOContext context); @Override LockFactory getLockFactory(); @Override String getLockID(); @Override Lock makeLock(String name); @Override void setLockFactory(LockFactory lockFactory); @Override void sync(Collection<String> names); String toString(); @Override IndexOutput createOutput(String name, IOContext context); @Override void deleteFile(String name); @Override boolean fileExists(String name); @Override long fileLength(String name); @Override String[] listAll(); Directory getDirectory(); @Override Directory getOriginalDirectory(); }
BlockDirectory extends Directory implements DirectoryDecorator { @Override public long fileLength(String name) throws IOException { return _directory.fileLength(name); } BlockDirectory(String dirName, Directory directory);  BlockDirectory(String dirName, Directory directory, Cache cache);  BlockDirectory(String dirName, Directory directory, Cache cache, Set<String> blockCacheFileTypes); static long getBlock(long pos); static long getPosition(long pos); static long getRealPosition(long block, long positionInBlock); @Override IndexInput openInput(final String name, IOContext context); @Override void close(); void clearLock(String name); @Override void copy(Directory to, String src, String dest, IOContext context); @Override LockFactory getLockFactory(); @Override String getLockID(); @Override Lock makeLock(String name); @Override void setLockFactory(LockFactory lockFactory); @Override void sync(Collection<String> names); String toString(); @Override IndexOutput createOutput(String name, IOContext context); @Override void deleteFile(String name); @Override boolean fileExists(String name); @Override long fileLength(String name); @Override String[] listAll(); Directory getDirectory(); @Override Directory getOriginalDirectory(); static final long BLOCK_SHIFT; static final long BLOCK_MOD; static final int BLOCK_SIZE; static Cache NO_CACHE; }