@Override public URI getBlockURI() { return getBlockFile().toURI(); }
@Override public long getBlockDataLength() { return getBlockFile().length(); }
@Override public void setPinning(LocalFileSystem localFS) throws IOException { File f = getBlockFile(); Path p = new Path(f.getAbsolutePath()); setPinning(localFS, p); }
@Override public InputStream getDataInputStream(long seekOffset) throws IOException { return getDataInputStream(getBlockFile(), seekOffset); }
@Override public boolean renameData(URI destURI) throws IOException { return renameFile(getBlockFile(), new File(destURI)); }
@Override public boolean getPinning(LocalFileSystem localFS) throws IOException { return getPinning(localFS, new Path(getBlockFile().getAbsolutePath())); }
@Override public int compareWith(ScanInfo info) { return info.getBlockFile().compareTo(getBlockFile()); }
@Override public void copyBlockdata(URI destination) throws IOException { //for local replicas, we assume the destination URI is file getFileIoProvider().nativeCopyFileUnbuffered( getVolume(), getBlockFile(), new File(destination), true); }
@Override public OutputStream getDataOutputStream(boolean append) throws IOException { return getFileIoProvider().getFileOutputStream( getVolume(), getBlockFile(), append); }
@Override public boolean blockDataExists() { return getFileIoProvider().exists(getVolume(), getBlockFile()); }
@Override public boolean deleteBlockData() { return getFileIoProvider().fullyDelete(getVolume(), getBlockFile()); }
final File oldBlockFile = oldReplica.getBlockFile(); final File oldmeta = oldReplica.getMetaFile(); final File newmeta = getMetaFile(); " Unable to move block file " + oldReplica.getBlockFile() + " to rbw dir " + newBlkFile, e);
@Override public void truncateBlock(long newLength) throws IOException { truncateBlock(getVolume(), getBlockFile(), getMetaFile(), getNumBytes(), newLength, getFileIoProvider()); }
final File file = getBlockFile(); final FileIoProvider fileIoProvider = getFileIoProvider(); if (file == null || getVolume() == null) {