/** * Verifies the given registration. * * @param nodeReg node registration * @throws UnregisteredNodeException if the registration is invalid */ private void verifyRequest(NodeRegistration nodeReg) throws IOException { // verify registration ID final String id = nodeReg.getRegistrationID(); final String expectedID = namesystem.getRegistrationID(); if (!expectedID.equals(id)) { LOG.warn("Registration IDs mismatched: the " + nodeReg.getClass().getSimpleName() + " ID is " + id + " but the expected ID is " + expectedID); throw new UnregisteredNodeException(nodeReg); } }
/** * Verifies the given registration. * * @param nodeReg node registration * @throws UnregisteredNodeException if the registration is invalid */ void verifyRequest(NodeRegistration nodeReg) throws IOException { verifyLayoutVersion(nodeReg.getVersion()); if (!namesystem.getRegistrationID().equals(nodeReg.getRegistrationID())) { LOG.warn("Invalid registrationID - expected: " + namesystem.getRegistrationID() + " received: " + nodeReg.getRegistrationID()); throw new UnregisteredNodeException(nodeReg); } }
/** * Verifies the given registration. * * @param nodeReg * node registration * @throws UnregisteredNodeException * if the registration is invalid */ void verifyRequest(NodeRegistration nodeReg) throws IOException { verifyLayoutVersion(nodeReg.getVersion()); if (!namesystem.getRegistrationID().equals(nodeReg.getRegistrationID())) { LOG.warn("Invalid registrationID - expected: " + namesystem.getRegistrationID() + " received: " + nodeReg.getRegistrationID()); throw new UnregisteredNodeException(nodeReg); } }
public UnregisteredNodeException(NodeRegistration nodeReg) { super("Unregistered server: " + nodeReg.toString()); }
/** * Verify request. * * Verifies correctness of the datanode version, registration ID, and * if the datanode does not need to be shutdown. * * @param nodeReg data node registration * @throws IOException */ public void verifyRequest(NodeRegistration nodeReg) throws IOException { verifyVersion(nodeReg.getVersion()); if (!namesystem.getRegistrationID().equals(nodeReg.getRegistrationID())) throw new UnregisteredNodeException(nodeReg); }