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:
parent
b503b6a07d
commit
5694c34040
@ -251,6 +251,9 @@ Release 2.1.0-beta - UNRELEASED
|
|||||||
HDFS-2802. Add HDFS Snapshot feature. (See breakdown of tasks below for
|
HDFS-2802. Add HDFS Snapshot feature. (See breakdown of tasks below for
|
||||||
subtasks and contributors)
|
subtasks and contributors)
|
||||||
|
|
||||||
|
HDFS-4866. Protocol buffer support cannot compile under C. (Arpit Agarwal via
|
||||||
|
cnauroth)
|
||||||
|
|
||||||
NEW FEATURES
|
NEW FEATURES
|
||||||
|
|
||||||
HDFS-1804. Add a new block-volume device choosing policy that looks at
|
HDFS-1804. Add a new block-volume device choosing policy that looks at
|
||||||
|
@ -157,11 +157,13 @@ public ErrorReportResponseProto errorReport(RpcController unused,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RegisterResponseProto register(RpcController unused,
|
public RegisterResponseProto registerSubordinateNamenode(
|
||||||
RegisterRequestProto request) throws ServiceException {
|
RpcController unused, RegisterRequestProto request)
|
||||||
|
throws ServiceException {
|
||||||
NamenodeRegistration reg;
|
NamenodeRegistration reg;
|
||||||
try {
|
try {
|
||||||
reg = impl.register(PBHelper.convert(request.getRegistration()));
|
reg = impl.registerSubordinateNamenode(
|
||||||
|
PBHelper.convert(request.getRegistration()));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
}
|
}
|
||||||
|
@ -167,12 +167,13 @@ public void errorReport(NamenodeRegistration registration, int errorCode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NamenodeRegistration register(NamenodeRegistration registration)
|
public NamenodeRegistration registerSubordinateNamenode(
|
||||||
throws IOException {
|
NamenodeRegistration registration) throws IOException {
|
||||||
RegisterRequestProto req = RegisterRequestProto.newBuilder()
|
RegisterRequestProto req = RegisterRequestProto.newBuilder()
|
||||||
.setRegistration(PBHelper.convert(registration)).build();
|
.setRegistration(PBHelper.convert(registration)).build();
|
||||||
try {
|
try {
|
||||||
return PBHelper.convert(rpcProxy.register(NULL_CONTROLLER, req)
|
return PBHelper.convert(
|
||||||
|
rpcProxy.registerSubordinateNamenode(NULL_CONTROLLER, req)
|
||||||
.getRegistration());
|
.getRegistration());
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
throw ProtobufHelper.getRemoteException(e);
|
throw ProtobufHelper.getRemoteException(e);
|
||||||
|
@ -371,7 +371,7 @@ private void registerWith(NamespaceInfo nsInfo) throws IOException {
|
|||||||
NamenodeRegistration nnReg = null;
|
NamenodeRegistration nnReg = null;
|
||||||
while(!isStopRequested()) {
|
while(!isStopRequested()) {
|
||||||
try {
|
try {
|
||||||
nnReg = namenode.register(getRegistration());
|
nnReg = namenode.registerSubordinateNamenode(getRegistration());
|
||||||
break;
|
break;
|
||||||
} catch(SocketTimeoutException e) { // name-node is busy
|
} catch(SocketTimeoutException e) { // name-node is busy
|
||||||
LOG.info("Problem connecting to name-node: " + nnRpcAddress);
|
LOG.info("Problem connecting to name-node: " + nnRpcAddress);
|
||||||
|
@ -383,8 +383,8 @@ public void errorReport(NamenodeRegistration registration,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override // NamenodeProtocol
|
@Override // NamenodeProtocol
|
||||||
public NamenodeRegistration register(NamenodeRegistration registration)
|
public NamenodeRegistration registerSubordinateNamenode(
|
||||||
throws IOException {
|
NamenodeRegistration registration) throws IOException {
|
||||||
namesystem.checkSuperuserPrivilege();
|
namesystem.checkSuperuserPrivilege();
|
||||||
verifyLayoutVersion(registration.getVersion());
|
verifyLayoutVersion(registration.getVersion());
|
||||||
NamenodeRegistration myRegistration = nn.setRegistration();
|
NamenodeRegistration myRegistration = nn.setRegistration();
|
||||||
|
@ -134,8 +134,8 @@ public void errorReport(NamenodeRegistration registration,
|
|||||||
* @return {@link NamenodeRegistration} of the node,
|
* @return {@link NamenodeRegistration} of the node,
|
||||||
* which this node has just registered with.
|
* which this node has just registered with.
|
||||||
*/
|
*/
|
||||||
public NamenodeRegistration register(NamenodeRegistration registration)
|
public NamenodeRegistration registerSubordinateNamenode(
|
||||||
throws IOException;
|
NamenodeRegistration registration) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A request to the active name-node to start a checkpoint.
|
* A request to the active name-node to start a checkpoint.
|
||||||
|
@ -225,7 +225,7 @@ service NamenodeProtocolService {
|
|||||||
/**
|
/**
|
||||||
* Request to register a sub-ordinate namenode
|
* Request to register a sub-ordinate namenode
|
||||||
*/
|
*/
|
||||||
rpc register(RegisterRequestProto) returns(RegisterResponseProto);
|
rpc registerSubordinateNamenode(RegisterRequestProto) returns(RegisterResponseProto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request to start a checkpoint.
|
* Request to start a checkpoint.
|
||||||
|
Loading…
Reference in New Issue
Block a user