Package org.apache.hadoop.hdfs.storageservice.protocol

Examples of org.apache.hadoop.hdfs.storageservice.protocol.NameNodeRoutingException


  public NameNodeHandler resolve(RequestMetaInfo metaInfo) throws NameNodeRoutingException {
    final int clusterId = metaInfo.getClusterId();
    if (clusterId == RequestMetaInfo.NO_CLUSTER_ID) {
      String msg = "ClusterId not specified";
      LOG.error(msg);
      throw new NameNodeRoutingException(msg);
    }
    if (clusterId != this.clusterId) {
      String msg = "ClusterId: " + clusterId + " does NOT match " + "expected: " + this.clusterId;
      LOG.error(msg);
      throw new NameNodeRoutingException(msg);
    }
    final String resourceId = metaInfo.getResourceId();
    NameNodeHandler handler = handlers.get(resourceId);
    if (handler == null) {
      throw new NameNodeRoutingException("Not recognized resourceId: " + resourceId);
    }
    return handler;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.storageservice.protocol.NameNodeRoutingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.