|
@@ -700,7 +700,7 @@ class NameNodeRpcServer implements NamenodeProtocols {
|
|
|
@Override // ClientProtocol
|
|
|
public DatanodeInfo[] getDatanodeReport(DatanodeReportType type)
|
|
|
throws IOException {
|
|
|
- namesystem.checkOperation(OperationCategory.READ);
|
|
|
+ // TODO(HA): decide on OperationCategory for this
|
|
|
DatanodeInfo results[] = namesystem.datanodeReport(type);
|
|
|
if (results == null ) {
|
|
|
throw new IOException("Cannot find datanode report");
|
|
@@ -710,32 +710,32 @@ class NameNodeRpcServer implements NamenodeProtocols {
|
|
|
|
|
|
@Override // ClientProtocol
|
|
|
public boolean setSafeMode(SafeModeAction action) throws IOException {
|
|
|
- // NB: not checking OperationCategory so this works on a standby
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
return namesystem.setSafeMode(action);
|
|
|
}
|
|
|
@Override // ClientProtocol
|
|
|
public boolean restoreFailedStorage(String arg)
|
|
|
throws AccessControlException {
|
|
|
- // NB: not checking OperationCategory so this works on a standby
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
return namesystem.restoreFailedStorage(arg);
|
|
|
}
|
|
|
|
|
|
@Override // ClientProtocol
|
|
|
public void saveNamespace() throws IOException {
|
|
|
- // NB: not checking OperationCategory so this works on a standby
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
namesystem.saveNamespace();
|
|
|
}
|
|
|
|
|
|
@Override // ClientProtocol
|
|
|
public void refreshNodes() throws IOException {
|
|
|
- // NB: not checking OperationCategory so this works on a standby
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
namesystem.getBlockManager().getDatanodeManager().refreshNodes(
|
|
|
new HdfsConfiguration());
|
|
|
}
|
|
|
|
|
|
@Override // NamenodeProtocol
|
|
|
- public long getTransactionID() throws IOException {
|
|
|
- namesystem.checkOperation(OperationCategory.READ);
|
|
|
+ public long getTransactionID() {
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
return namesystem.getEditLog().getSyncTxId();
|
|
|
}
|
|
|
|
|
@@ -747,26 +747,26 @@ class NameNodeRpcServer implements NamenodeProtocols {
|
|
|
@Override // NamenodeProtocol
|
|
|
public RemoteEditLogManifest getEditLogManifest(long sinceTxId)
|
|
|
throws IOException {
|
|
|
- namesystem.checkOperation(OperationCategory.READ);
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
return namesystem.getEditLog().getEditLogManifest(sinceTxId);
|
|
|
}
|
|
|
|
|
|
@Override // ClientProtocol
|
|
|
public void finalizeUpgrade() throws IOException {
|
|
|
- namesystem.checkOperation(OperationCategory.WRITE);
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
namesystem.finalizeUpgrade();
|
|
|
}
|
|
|
|
|
|
@Override // ClientProtocol
|
|
|
public UpgradeStatusReport distributedUpgradeProgress(UpgradeAction action)
|
|
|
throws IOException {
|
|
|
- namesystem.checkOperation(OperationCategory.READ);
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
return namesystem.distributedUpgradeProgress(action);
|
|
|
}
|
|
|
|
|
|
@Override // ClientProtocol
|
|
|
public void metaSave(String filename) throws IOException {
|
|
|
- // NB: not checking OperationCategory so this works on a standby
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
namesystem.metaSave(filename);
|
|
|
}
|
|
|
@Override // ClientProtocol
|
|
@@ -787,12 +787,12 @@ class NameNodeRpcServer implements NamenodeProtocols {
|
|
|
/**
|
|
|
* Tell all datanodes to use a new, non-persistent bandwidth value for
|
|
|
* dfs.datanode.balance.bandwidthPerSec.
|
|
|
- * @param bandwidth Balancer bandwidth in bytes per second for all datanodes.
|
|
|
+ * @param bandwidth Blanacer bandwidth in bytes per second for all datanodes.
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Override // ClientProtocol
|
|
|
public void setBalancerBandwidth(long bandwidth) throws IOException {
|
|
|
- // NB: not checking OperationCategory so this works on a standby
|
|
|
+ // TODO:HA decide on OperationCategory for this
|
|
|
namesystem.getBlockManager().getDatanodeManager().setBalancerBandwidth(bandwidth);
|
|
|
}
|
|
|
|