HADOOP-11595. Add default implementation for AbstractFileSystem#truncate. (yliu)
This commit is contained in:
parent
32d215dc89
commit
000b9e6c24
|
@ -562,6 +562,9 @@ Release 2.7.0 - UNRELEASED
|
|||
HADOOP-11545. ArrayIndexOutOfBoundsException is thrown with "hadoop
|
||||
credential list -provider". (Brahma Reddy Battula via aajisaka)
|
||||
|
||||
HADOOP-11595. Add default implementation for AbstractFileSystem#truncate.
|
||||
(yliu)
|
||||
|
||||
Release 2.6.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -642,9 +642,12 @@ public abstract class AbstractFileSystem {
|
|||
* {@link FileContext#truncate(Path, long)} except that Path f must be for
|
||||
* this file system.
|
||||
*/
|
||||
public abstract boolean truncate(Path f, long newLength)
|
||||
public boolean truncate(Path f, long newLength)
|
||||
throws AccessControlException, FileNotFoundException,
|
||||
UnresolvedLinkException, IOException;
|
||||
UnresolvedLinkException, IOException {
|
||||
throw new UnsupportedOperationException(getClass().getSimpleName()
|
||||
+ " doesn't support truncate");
|
||||
}
|
||||
|
||||
/**
|
||||
* The specification of this method matches that of
|
||||
|
|
|
@ -140,12 +140,6 @@ public class TestAfsCheckPath {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean truncate(Path f, long newLength) throws IOException {
|
||||
// deliberately empty
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renameInternal(Path src, Path dst) throws IOException {
|
||||
// deliberately empty
|
||||
|
|
Loading…
Reference in New Issue