当前位置: 首页>>代码示例>>Java>>正文


Java State类代码示例

本文整理汇总了Java中org.apache.hadoop.mapreduce.task.reduce.MapHost.State的典型用法代码示例。如果您正苦于以下问题:Java State类的具体用法?Java State怎么用?Java State使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


State类属于org.apache.hadoop.mapreduce.task.reduce.MapHost包,在下文中一共展示了State类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addKnownMapOutput

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public synchronized void addKnownMapOutput(String hostName,
                                           String hostUrl,
                                           TaskAttemptID mapId) {
  MapHost host = mapLocations.get(hostName);
  if (host == null) {
    host = new MapHost(hostName, hostUrl);
    mapLocations.put(hostName, host);
  }
  host.addKnownMap(mapId);

  // Mark the host as pending
  if (host.getState() == State.PENDING) {
    pendingHosts.add(host);
    notifyAll();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:ShuffleSchedulerImpl.java

示例2: run

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public void run() {
  try {
    while (true) {
      // take the first host that has an expired penalty
      MapHost host = penalties.take().host;
      synchronized (ShuffleSchedulerImpl.this) {
        if (host.markAvailable() == MapHost.State.PENDING) {
          pendingHosts.add(host);
          ShuffleSchedulerImpl.this.notifyAll();
        }
      }
    }
  } catch (InterruptedException ie) {
    return;
  } catch (Throwable t) {
    reporter.reportException(t);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:19,代码来源:ShuffleSchedulerImpl.java

示例3: addKnownMapOutput

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public synchronized void addKnownMapOutput(String hostName, 
                                           String hostUrl,
                                           TaskAttemptID mapId) {
  MapHost host = mapLocations.get(hostName);
  if (host == null) {
    host = new MapHost(hostName, hostUrl);
    mapLocations.put(hostName, host);
  }
  host.addKnownMap(mapId);

  // Mark the host as pending 
  if (host.getState() == State.PENDING) {
    pendingHosts.add(host);
    notifyAll();
  }
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:17,代码来源:ShuffleScheduler.java

示例4: run

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public void run() {
  try {
    while (true) {
      // take the first host that has an expired penalty
      MapHost host = penalties.take().host;
      synchronized (ShuffleScheduler.this) {
        if (host.markAvailable() == MapHost.State.PENDING) {
          pendingHosts.add(host);
          ShuffleScheduler.this.notifyAll();
        }
      }
    }
  } catch (InterruptedException ie) {
    return;
  } catch (Throwable t) {
    reporter.reportException(t);
  }
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:19,代码来源:ShuffleScheduler.java

示例5: freeHost

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public synchronized void freeHost(MapHost host) {
  if (host.getState() != State.PENALIZED) {
    if (host.markAvailable() == State.PENDING) {
      pendingHosts.add(host);
      notifyAll();
    }
  }
  LOG.info(host + " freed by " + Thread.currentThread().getName() + " in " +
           (Time.monotonicNow()-shuffleStart.get()) + "ms");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:ShuffleSchedulerImpl.java

示例6: freeHost

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public synchronized void freeHost(MapHost host) {
  if (host.getState() != State.PENALIZED) {
    if (host.markAvailable() == State.PENDING) {
      pendingHosts.add(host);
      notifyAll();
    }
  }
  LOG.info(host + " freed by " + Thread.currentThread().getName() + " in " +
           (Time.monotonicNow()-SHUFFLE_START.get()) + "ms");
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:11,代码来源:ShuffleSchedulerImpl.java

示例7: freeHost

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public synchronized void freeHost(MapHost host) {
  if (host.getState() != State.PENALIZED) {
    if (host.markAvailable() == State.PENDING) {
      pendingHosts.add(host);
      notifyAll();
    }
  }
  LOG.info(host + " freed by " + Thread.currentThread().getName() + " in " +
           (System.currentTimeMillis()-shuffleStart.get()) + "ms");
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:11,代码来源:ShuffleSchedulerImpl.java

示例8: freeHost

import org.apache.hadoop.mapreduce.task.reduce.MapHost.State; //导入依赖的package包/类
public synchronized void freeHost(MapHost host) {
  if (host.getState() != State.PENALIZED) {
    if (host.markAvailable() == State.PENDING) {
      pendingHosts.add(host);
      notifyAll();
    }
  }
  LOG.info(host + " freed by " + Thread.currentThread().getName() + " in " + 
           (System.currentTimeMillis()-shuffleStart.get()) + "s");
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:11,代码来源:ShuffleScheduler.java


注:本文中的org.apache.hadoop.mapreduce.task.reduce.MapHost.State类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。