HDFS-3292. Remove the deprecated DiskStatus, getDiskStatus(), getRawCapacity() and getRawUsed() from DistributedFileSystem. Contributed by Arpit Gupta
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1327664 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8bda086d04
commit
2bf8be3c72
@ -65,6 +65,9 @@ Trunk (unreleased changes)
|
|||||||
HDFS-3273. Refactor BackupImage and FSEditLog, and rename
|
HDFS-3273. Refactor BackupImage and FSEditLog, and rename
|
||||||
JournalListener.rollLogs(..) to startLogSegment(..). (szetszwo)
|
JournalListener.rollLogs(..) to startLogSegment(..). (szetszwo)
|
||||||
|
|
||||||
|
HDFS-3292. Remove the deprecated DiskStatus, getDiskStatus(), getRawCapacity() and
|
||||||
|
getRawUsed() from DistributedFileSystem. (Arpit Gupta via szetszwo)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-2834. Add a ByteBuffer-based read API to DFSInputStream.
|
HDFS-2834. Add a ByteBuffer-based read API to DFSInputStream.
|
||||||
|
@ -499,56 +499,12 @@ public class DistributedFileSystem extends FileSystem {
|
|||||||
return dfs;
|
return dfs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated Use {@link org.apache.hadoop.fs.FsStatus} instead */
|
|
||||||
@InterfaceAudience.Private
|
|
||||||
@Deprecated
|
|
||||||
public static class DiskStatus extends FsStatus {
|
|
||||||
public DiskStatus(FsStatus stats) {
|
|
||||||
super(stats.getCapacity(), stats.getUsed(), stats.getRemaining());
|
|
||||||
}
|
|
||||||
|
|
||||||
public DiskStatus(long capacity, long dfsUsed, long remaining) {
|
|
||||||
super(capacity, dfsUsed, remaining);
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getDfsUsed() {
|
|
||||||
return super.getUsed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FsStatus getStatus(Path p) throws IOException {
|
public FsStatus getStatus(Path p) throws IOException {
|
||||||
statistics.incrementReadOps(1);
|
statistics.incrementReadOps(1);
|
||||||
return dfs.getDiskStatus();
|
return dfs.getDiskStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the disk usage of the filesystem, including total capacity,
|
|
||||||
* used space, and remaining space
|
|
||||||
* @deprecated Use {@link org.apache.hadoop.fs.FileSystem#getStatus()}
|
|
||||||
* instead */
|
|
||||||
@Deprecated
|
|
||||||
public DiskStatus getDiskStatus() throws IOException {
|
|
||||||
return new DiskStatus(dfs.getDiskStatus());
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Return the total raw capacity of the filesystem, disregarding
|
|
||||||
* replication.
|
|
||||||
* @deprecated Use {@link org.apache.hadoop.fs.FileSystem#getStatus()}
|
|
||||||
* instead */
|
|
||||||
@Deprecated
|
|
||||||
public long getRawCapacity() throws IOException{
|
|
||||||
return dfs.getDiskStatus().getCapacity();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Return the total raw used space in the filesystem, disregarding
|
|
||||||
* replication.
|
|
||||||
* @deprecated Use {@link org.apache.hadoop.fs.FileSystem#getStatus()}
|
|
||||||
* instead */
|
|
||||||
@Deprecated
|
|
||||||
public long getRawUsed() throws IOException{
|
|
||||||
return dfs.getDiskStatus().getUsed();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns count of blocks with no good replicas left. Normally should be
|
* Returns count of blocks with no good replicas left. Normally should be
|
||||||
* zero.
|
* zero.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user