org.apache.hadoop.mapreduce.Counter.getUnderlyingCounter()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.apache.hadoop.mapreduce.Counter.getUnderlyingCounter()方法的一些代码示例,展示了Counter.getUnderlyingCounter()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Counter.getUnderlyingCounter()方法的具体详情如下:
包路径:org.apache.hadoop.mapreduce.Counter
类名称:Counter
方法名:getUnderlyingCounter

Counter.getUnderlyingCounter介绍

暂无

代码示例

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core

@Override
@SuppressWarnings("unchecked")
public void incrAllCounters(CounterGroupBase<C> other) {
 if (checkNotNull(other.getUnderlyingGroup(), "other group")
   instanceof FileSystemCounterGroup<?>) {
  for (Counter counter : other) {
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   findCounter(c.scheme, c.key) .increment(counter.getValue());
  }
 }
}

代码示例来源:origin: io.hops/hadoop-mapreduce-client-core

@Override
@SuppressWarnings("unchecked")
public void incrAllCounters(CounterGroupBase<C> other) {
 if (checkNotNull(other.getUnderlyingGroup(), "other group")
   instanceof FileSystemCounterGroup<?>) {
  for (Counter counter : other) {
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   findCounter(c.scheme, c.key) .increment(counter.getValue());
  }
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

@Override
@SuppressWarnings("unchecked")
public void incrAllCounters(CounterGroupBase<C> other) {
 if (checkNotNull(other.getUnderlyingGroup(), "other group")
   instanceof FileSystemCounterGroup<?>) {
  for (Counter counter : other) {
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   findCounter(c.scheme, c.key) .increment(counter.getValue());
  }
 }
}

代码示例来源:origin: io.hops/hadoop-mapreduce-client-core

/**
 * FileSystemGroup ::= #scheme (scheme #counter (key value)*)*
 */
@Override
public void write(DataOutput out) throws IOException {
 WritableUtils.writeVInt(out, map.size()); // #scheme
 for (Map.Entry<String, Object[]> entry : map.entrySet()) {
  WritableUtils.writeString(out, entry.getKey()); // scheme
  // #counter for the above scheme
  WritableUtils.writeVInt(out, numSetCounters(entry.getValue()));
  for (Object counter : entry.getValue()) {
   if (counter == null) continue;
   @SuppressWarnings("unchecked")
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   WritableUtils.writeVInt(out, c.key.ordinal());  // key
   WritableUtils.writeVLong(out, c.getValue());    // value
  }
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core

/**
 * FileSystemGroup ::= #scheme (scheme #counter (key value)*)*
 */
@Override
public void write(DataOutput out) throws IOException {
 WritableUtils.writeVInt(out, map.size()); // #scheme
 for (Map.Entry<String, Object[]> entry : map.entrySet()) {
  WritableUtils.writeString(out, entry.getKey()); // scheme
  // #counter for the above scheme
  WritableUtils.writeVInt(out, numSetCounters(entry.getValue()));
  for (Object counter : entry.getValue()) {
   if (counter == null) continue;
   @SuppressWarnings("unchecked")
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   WritableUtils.writeVInt(out, c.key.ordinal());  // key
   WritableUtils.writeVLong(out, c.getValue());    // value
  }
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

/**
 * FileSystemGroup ::= #scheme (scheme #counter (key value)*)*
 */
@Override
public void write(DataOutput out) throws IOException {
 WritableUtils.writeVInt(out, map.size()); // #scheme
 for (Map.Entry<String, Object[]> entry : map.entrySet()) {
  WritableUtils.writeString(out, entry.getKey()); // scheme
  // #counter for the above scheme
  WritableUtils.writeVInt(out, numSetCounters(entry.getValue()));
  for (Object counter : entry.getValue()) {
   if (counter == null) continue;
   @SuppressWarnings("unchecked")
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   WritableUtils.writeVInt(out, c.key.ordinal());  // key
   WritableUtils.writeVLong(out, c.getValue());    // value
  }
 }
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * FileSystemGroup ::= #scheme (scheme #counter (key value)*)*
 */
@Override
public void write(DataOutput out) throws IOException {
 WritableUtils.writeVInt(out, map.size()); // #scheme
 for (Map.Entry<String, Object[]> entry : map.entrySet()) {
  WritableUtils.writeString(out, entry.getKey()); // scheme
  // #counter for the above scheme
  WritableUtils.writeVInt(out, numSetCounters(entry.getValue()));
  for (Object counter : entry.getValue()) {
   if (counter == null) continue;
   @SuppressWarnings("unchecked")
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   WritableUtils.writeVInt(out, c.key.ordinal());  // key
   WritableUtils.writeVLong(out, c.getValue());    // value
  }
 }
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

@Override
@SuppressWarnings("unchecked")
public void incrAllCounters(CounterGroupBase<C> other) {
 if (checkNotNull(other.getUnderlyingGroup(), "other group")
   instanceof FileSystemCounterGroup<?>) {
  for (Counter counter : other) {
   FSCounter c = (FSCounter) ((Counter)counter).getUnderlyingCounter();
   findCounter(c.scheme, c.key) .increment(counter.getValue());
  }
 }
}

相关文章