Package org.apache.hadoop.hdfs.protocol.AvatarConstants

Examples of org.apache.hadoop.hdfs.protocol.AvatarConstants.InstanceId


  /**
   * Analyze the command line options
   */
  private static StartupInfo parseArguments(String args[]) {
    InstanceId instance = InstanceId.NODEZERO;
    StartupOption startOpt = StartupOption.REGULAR;
    boolean isStandby= false;
    String serviceName = null;
    int argsLen = (args == null) ? 0 : args.length;
    for (int i=0; i < argsLen; i++) {
View Full Code Here


      ToolRunner.printGenericCommandUsage(System.err);
    }
  }

  public static Configuration updateConf(String instance, Configuration conf) {
    InstanceId instanceId = InstanceId.NODEZERO;

    // Some instances might use fs.default.name0 and some might use
    // dfs.namenode.rpc-address.
    if (instance.equalsIgnoreCase(StartupOption.NODEONE.getName())) {
      if (conf.get(AvatarNode.DFS_NAMENODE_RPC_ADDRESS1_KEY) == null
View Full Code Here

    // Using RPC Address to determine which node is primary and using the rest
    // of them as a sanity check
    String zNodeClientProtocol = clientProtocolZnodeAddress.getAddress();
    String primaryClientProtocol = zkClient.getPrimaryAvatarAddress(
        zNodeClientProtocol, new Stat(), false, false);
    InstanceId instanceIdfromZookeeper = null;
    if (primaryClientProtocol == null) {
      // Fail-over in progress.
      instanceIdfromZookeeper = null;
    } else {
      InetSocketAddress clientProtAddress = NetUtils
View Full Code Here

    super.setPrimary(instanceIdfromZookeeper);
  }

  private static void verifyAddress(String address, InstanceId fromZk,
      InetSocketAddress zeroAddr, InetSocketAddress oneAddr) {
    InstanceId afterMatchingWithConfig = null;
    if (address == null) {
      afterMatchingWithConfig = null;
    } else {
      InetSocketAddress addressInIp = NetUtils.createSocketAddr(address);
      if (zeroAddr.equals(addressInIp)) {
View Full Code Here

  /**
   * Analyze the command line options
   */
  private static StartupInfo parseArguments(String args[]) {
    InstanceId instance = InstanceId.NODEZERO;
    StartupOption startOpt = StartupOption.REGULAR;
    boolean isStandby= false;
    String serviceName = null;
    boolean force = false;
    int argsLen = (args == null) ? 0 : args.length;
View Full Code Here

      ToolRunner.printGenericCommandUsage(System.err);
    }
  }

  public static Configuration updateConf(String instance, Configuration conf) {
    InstanceId instanceId = InstanceId.NODEZERO;

    // Some instances might use fs.default.name0 and some might use
    // dfs.namenode.rpc-address.
    if (instance.equalsIgnoreCase(StartupOption.NODEONE.getName())) {
      if (conf.get(AvatarNode.DFS_NAMENODE_RPC_ADDRESS1_KEY) == null
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.protocol.AvatarConstants.InstanceId

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.