HDFS-2407. getServerDefaults and getStats don't check operation category (atm)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-1623@1179685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Aaron Myers 2011-10-06 16:14:50 +00:00
parent 60dcc5f237
commit 90727b82e0
2 changed files with 6 additions and 2 deletions

View File

@ -7,3 +7,5 @@ branch is merged.
HDFS-2179. Add fencing framework and mechanisms for NameNode HA. (todd)
HDFS-1974. Introduce active and standy states to the namenode. (suresh)
HDFS-2407. getServerDefaults and getStats don't check operation category (atm)

View File

@ -319,6 +319,7 @@ class NameNodeRpcServer implements NamenodeProtocols {
@Override // ClientProtocol
public FsServerDefaults getServerDefaults() throws IOException {
nn.checkOperation(OperationCategory.READ);
return namesystem.getServerDefaults();
}
@ -634,8 +635,9 @@ class NameNodeRpcServer implements NamenodeProtocols {
return namesystem.getFileInfo(src, false);
}
@Override
public long[] getStats() {
@Override // ClientProtocol
public long[] getStats() throws IOException {
nn.checkOperation(OperationCategory.READ);
return namesystem.getStats();
}