List of usage examples for org.apache.hadoop.hdfs.server.protocol DatanodeProtocol versionID
long versionID
To view the source code for org.apache.hadoop.hdfs.server.protocol DatanodeProtocol versionID.
Click Source Link
From source file:common.DataNode.java
License:Apache License
/** * Create the DataNode given a configuration and an array of dataDirs. * 'dataDirs' is where the blocks are stored. *//*w w w . j a v a2 s . c om*/ DataNode(final Configuration conf, final AbstractList<File> dataDirs) throws IOException { this(conf, dataDirs, (DatanodeProtocol) RPC.waitForProxy(DatanodeProtocol.class, DatanodeProtocol.versionID, NameNode.getAddress(conf), conf)); }
From source file:common.NameNode.java
License:Apache License
public long getProtocolVersion(String protocol, long clientVersion) throws IOException { if (protocol.equals(ClientProtocol.class.getName())) { return ClientProtocol.versionID; } else if (protocol.equals(DatanodeProtocol.class.getName())) { return DatanodeProtocol.versionID; } else if (protocol.equals(NamenodeProtocol.class.getName())) { return NamenodeProtocol.versionID; } else if (protocol.equals(RefreshAuthorizationPolicyProtocol.class.getName())) { return RefreshAuthorizationPolicyProtocol.versionID; } else if (protocol.equals(RefreshUserToGroupMappingsProtocol.class.getName())) { return RefreshUserToGroupMappingsProtocol.versionID; } else {/*from w w w. j a v a2 s . c o m*/ throw new IOException("Unknown protocol to name node: " + protocol); } }