Package org.apache.hadoop.hdfs.server.namenode.HostFileManager

Examples of org.apache.hadoop.hdfs.server.namenode.HostFileManager.MutableEntrySet


                            type == DatanodeReportType.LIVE;
    boolean listDeadNodes = type == DatanodeReportType.ALL ||
                            type == DatanodeReportType.DEAD;

    ArrayList<DatanodeDescriptor> nodes = null;
    final MutableEntrySet foundNodes = new MutableEntrySet();
    synchronized(datanodeMap) {
      nodes = new ArrayList<DatanodeDescriptor>(datanodeMap.size());
      Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
      while (it.hasNext()) {
        DatanodeDescriptor dn = it.next();
        final boolean isDead = isDatanodeDead(dn);
        if ( (isDead && listDeadNodes) || (!isDead && listLiveNodes) ) {
          nodes.add(dn);
        }
        foundNodes.add(dn);
      }
    }

    if (listDeadNodes) {
      final EntrySet includedNodes = hostFileManager.getIncludes();
      final EntrySet excludedNodes = hostFileManager.getExcludes();
      for (Entry entry : includedNodes) {
        if ((foundNodes.find(entry) == null) &&
            (excludedNodes.find(entry) == null)) {
          // The remaining nodes are ones that are referenced by the hosts
          // files but that we do not know about, ie that we have never
          // head from. Eg. an entry that is no longer part of the cluster
          // or a bogus entry was given in the hosts files
View Full Code Here


                            type == DatanodeReportType.LIVE;
    boolean listDeadNodes = type == DatanodeReportType.ALL ||
                            type == DatanodeReportType.DEAD;

    ArrayList<DatanodeDescriptor> nodes = null;
    final MutableEntrySet foundNodes = new MutableEntrySet();
    synchronized(datanodeMap) {
      nodes = new ArrayList<DatanodeDescriptor>(datanodeMap.size());
      Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
      while (it.hasNext()) {
        DatanodeDescriptor dn = it.next();
        final boolean isDead = isDatanodeDead(dn);
        if ( (isDead && listDeadNodes) || (!isDead && listLiveNodes) ) {
          nodes.add(dn);
        }
        foundNodes.add(dn);
      }
    }

    if (listDeadNodes) {
      final EntrySet includedNodes = hostFileManager.getIncludes();
      final EntrySet excludedNodes = hostFileManager.getExcludes();
      for (Entry entry : includedNodes) {
        if ((foundNodes.find(entry) == null) &&
            (excludedNodes.find(entry) == null)) {
          // The remaining nodes are ones that are referenced by the hosts
          // files but that we do not know about, ie that we have never
          // head from. Eg. an entry that is no longer part of the cluster
          // or a bogus entry was given in the hosts files
View Full Code Here

                            type == DatanodeReportType.LIVE;
    boolean listDeadNodes = type == DatanodeReportType.ALL ||
                            type == DatanodeReportType.DEAD;

    ArrayList<DatanodeDescriptor> nodes = null;
    final MutableEntrySet foundNodes = new MutableEntrySet();
    synchronized(datanodeMap) {
      nodes = new ArrayList<DatanodeDescriptor>(datanodeMap.size());
      Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
      while (it.hasNext()) {
        DatanodeDescriptor dn = it.next();
        final boolean isDead = isDatanodeDead(dn);
        if ( (isDead && listDeadNodes) || (!isDead && listLiveNodes) ) {
          nodes.add(dn);
        }
        foundNodes.add(dn);
      }
    }

    if (listDeadNodes) {
      final EntrySet includedNodes = hostFileManager.getIncludes();
      final EntrySet excludedNodes = hostFileManager.getExcludes();
      for (Entry entry : includedNodes) {
        if ((foundNodes.find(entry) == null) &&
            (excludedNodes.find(entry) == null)) {
          // The remaining nodes are ones that are referenced by the hosts
          // files but that we do not know about, ie that we have never
          // head from. Eg. an entry that is no longer part of the cluster
          // or a bogus entry was given in the hosts files
View Full Code Here

                            type == DatanodeReportType.LIVE;
    boolean listDeadNodes = type == DatanodeReportType.ALL ||
                            type == DatanodeReportType.DEAD;

    ArrayList<DatanodeDescriptor> nodes = null;
    final MutableEntrySet foundNodes = new MutableEntrySet();
    synchronized(datanodeMap) {
      nodes = new ArrayList<DatanodeDescriptor>(datanodeMap.size());
      Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
      while (it.hasNext()) {
        DatanodeDescriptor dn = it.next();
        final boolean isDead = isDatanodeDead(dn);
        if ( (isDead && listDeadNodes) || (!isDead && listLiveNodes) ) {
          nodes.add(dn);
        }
        foundNodes.add(dn);
      }
    }

    if (listDeadNodes) {
      final EntrySet includedNodes = hostFileManager.getIncludes();
      final EntrySet excludedNodes = hostFileManager.getExcludes();
      for (Entry entry : includedNodes) {
        if ((foundNodes.find(entry) == null) &&
            (excludedNodes.find(entry) == null)) {
          // The remaining nodes are ones that are referenced by the hosts
          // files but that we do not know about, ie that we have never
          // head from. Eg. an entry that is no longer part of the cluster
          // or a bogus entry was given in the hosts files
View Full Code Here

                            type == DatanodeReportType.LIVE;
    boolean listDeadNodes = type == DatanodeReportType.ALL ||
                            type == DatanodeReportType.DEAD;

    ArrayList<DatanodeDescriptor> nodes = null;
    final MutableEntrySet foundNodes = new MutableEntrySet();
    synchronized(datanodeMap) {
      nodes = new ArrayList<DatanodeDescriptor>(datanodeMap.size());
      Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
      while (it.hasNext()) {
        DatanodeDescriptor dn = it.next();
        final boolean isDead = isDatanodeDead(dn);
        if ( (isDead && listDeadNodes) || (!isDead && listLiveNodes) ) {
          nodes.add(dn);
        }
        foundNodes.add(dn);
      }
    }

    if (listDeadNodes) {
      final EntrySet includedNodes = hostFileManager.getIncludes();
      final EntrySet excludedNodes = hostFileManager.getExcludes();
      for (Entry entry : includedNodes) {
        if ((foundNodes.find(entry) == null) &&
            (excludedNodes.find(entry) == null)) {
          // The remaining nodes are ones that are referenced by the hosts
          // files but that we do not know about, ie that we have never
          // head from. Eg. an entry that is no longer part of the cluster
          // or a bogus entry was given in the hosts files
View Full Code Here

                            type == DatanodeReportType.LIVE;
    boolean listDeadNodes = type == DatanodeReportType.ALL ||
                            type == DatanodeReportType.DEAD;

    ArrayList<DatanodeDescriptor> nodes = null;
    final MutableEntrySet foundNodes = new MutableEntrySet();
    synchronized(datanodeMap) {
      nodes = new ArrayList<DatanodeDescriptor>(datanodeMap.size());
      Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
      while (it.hasNext()) {
        DatanodeDescriptor dn = it.next();
        final boolean isDead = isDatanodeDead(dn);
        if ( (isDead && listDeadNodes) || (!isDead && listLiveNodes) ) {
          nodes.add(dn);
        }
        foundNodes.add(dn);
      }
    }

    if (listDeadNodes) {
      final EntrySet includedNodes = hostFileManager.getIncludes();
      final EntrySet excludedNodes = hostFileManager.getExcludes();
      for (Entry entry : includedNodes) {
        if ((foundNodes.find(entry) == null) &&
            (excludedNodes.find(entry) == null)) {
          // The remaining nodes are ones that are referenced by the hosts
          // files but that we do not know about, ie that we have never
          // head from. Eg. an entry that is no longer part of the cluster
          // or a bogus entry was given in the hosts files
View Full Code Here

                            type == DatanodeReportType.LIVE;
    boolean listDeadNodes = type == DatanodeReportType.ALL ||
                            type == DatanodeReportType.DEAD;

    ArrayList<DatanodeDescriptor> nodes = null;
    final MutableEntrySet foundNodes = new MutableEntrySet();
    synchronized(datanodeMap) {
      nodes = new ArrayList<DatanodeDescriptor>(datanodeMap.size());
      Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
      while (it.hasNext()) {
        DatanodeDescriptor dn = it.next();
        final boolean isDead = isDatanodeDead(dn);
        if ( (isDead && listDeadNodes) || (!isDead && listLiveNodes) ) {
          nodes.add(dn);
        }
        foundNodes.add(dn);
      }
    }

    if (listDeadNodes) {
      final EntrySet includedNodes = hostFileManager.getIncludes();
      final EntrySet excludedNodes = hostFileManager.getExcludes();
      for (Entry entry : includedNodes) {
        if ((foundNodes.find(entry) == null) &&
            (excludedNodes.find(entry) == null)) {
          // The remaining nodes are ones that are referenced by the hosts
          // files but that we do not know about, ie that we have never
          // head from. Eg. an entry that is no longer part of the cluster
          // or a bogus entry was given in the hosts files
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.namenode.HostFileManager.MutableEntrySet

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.