Example usage for org.apache.hadoop.hdfs.server.protocol NodeRegistration getVersion

List of usage examples for org.apache.hadoop.hdfs.server.protocol NodeRegistration getVersion

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.server.protocol NodeRegistration getVersion.

Prototype

public int getVersion();

Source Link

Document

Get layout version of the server node.

Usage

From source file:common.NameNode.java

License:Apache License

/** 
 * Verify request./*from  w  w w .j  av a2s.  c  o m*/
 * 
 * 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);
}