HDFS-4866. Protocol buffer support cannot compile under C. Contributed by Arpit Agarwal.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1493300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2013-06-15 03:52:40 +00:00
parent b503b6a07d
commit 5694c34040
7 changed files with 18 additions and 12 deletions

View File

@ -251,6 +251,9 @@ Release 2.1.0-beta - UNRELEASED
HDFS-2802. Add HDFS Snapshot feature. (See breakdown of tasks below for
subtasks and contributors)
HDFS-4866. Protocol buffer support cannot compile under C. (Arpit Agarwal via
cnauroth)
NEW FEATURES
HDFS-1804. Add a new block-volume device choosing policy that looks at

View File

@ -157,11 +157,13 @@ public ErrorReportResponseProto errorReport(RpcController unused,
}
@Override
public RegisterResponseProto register(RpcController unused,
RegisterRequestProto request) throws ServiceException {
public RegisterResponseProto registerSubordinateNamenode(
RpcController unused, RegisterRequestProto request)
throws ServiceException {
NamenodeRegistration reg;
try {
reg = impl.register(PBHelper.convert(request.getRegistration()));
reg = impl.registerSubordinateNamenode(
PBHelper.convert(request.getRegistration()));
} catch (IOException e) {
throw new ServiceException(e);
}

View File

@ -167,12 +167,13 @@ public void errorReport(NamenodeRegistration registration, int errorCode,
}
@Override
public NamenodeRegistration register(NamenodeRegistration registration)
throws IOException {
public NamenodeRegistration registerSubordinateNamenode(
NamenodeRegistration registration) throws IOException {
RegisterRequestProto req = RegisterRequestProto.newBuilder()
.setRegistration(PBHelper.convert(registration)).build();
try {
return PBHelper.convert(rpcProxy.register(NULL_CONTROLLER, req)
return PBHelper.convert(
rpcProxy.registerSubordinateNamenode(NULL_CONTROLLER, req)
.getRegistration());
} catch (ServiceException e) {
throw ProtobufHelper.getRemoteException(e);

View File

@ -371,7 +371,7 @@ private void registerWith(NamespaceInfo nsInfo) throws IOException {
NamenodeRegistration nnReg = null;
while(!isStopRequested()) {
try {
nnReg = namenode.register(getRegistration());
nnReg = namenode.registerSubordinateNamenode(getRegistration());
break;
} catch(SocketTimeoutException e) { // name-node is busy
LOG.info("Problem connecting to name-node: " + nnRpcAddress);

View File

@ -383,8 +383,8 @@ public void errorReport(NamenodeRegistration registration,
}
@Override // NamenodeProtocol
public NamenodeRegistration register(NamenodeRegistration registration)
throws IOException {
public NamenodeRegistration registerSubordinateNamenode(
NamenodeRegistration registration) throws IOException {
namesystem.checkSuperuserPrivilege();
verifyLayoutVersion(registration.getVersion());
NamenodeRegistration myRegistration = nn.setRegistration();

View File

@ -134,8 +134,8 @@ public void errorReport(NamenodeRegistration registration,
* @return {@link NamenodeRegistration} of the node,
* which this node has just registered with.
*/
public NamenodeRegistration register(NamenodeRegistration registration)
throws IOException;
public NamenodeRegistration registerSubordinateNamenode(
NamenodeRegistration registration) throws IOException;
/**
* A request to the active name-node to start a checkpoint.

View File

@ -225,7 +225,7 @@ service NamenodeProtocolService {
/**
* Request to register a sub-ordinate namenode
*/
rpc register(RegisterRequestProto) returns(RegisterResponseProto);
rpc registerSubordinateNamenode(RegisterRequestProto) returns(RegisterResponseProto);
/**
* Request to start a checkpoint.