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

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

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

Counter.readFields介绍

[英]Read the binary representation of the counter
[中]读取计数器的二进制表示形式

代码示例

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

@Override
public void readFields(DataInput in) throws IOException {
 realCounter.readFields(in);
}

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
  public void readFields(DataInput in) throws IOException {
    delegate.readFields(in);
  }
}

代码示例来源:origin: org.apache.giraph/giraph-core

/**
  * Read from Hadoop input.
  *
  * @param in DataInput to read from.
  * @throws IOException if something goes wrong reading.
  */
 public void readFields(DataInput in) throws IOException {
  counter.readFields(in);
 }
}

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

@Override
public void readFields(DataInput in) throws IOException {
 realCounter.readFields(in);
}

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

@Override
public void readFields(DataInput in) throws IOException {
 realCounter.readFields(in);
}

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

@Override
public void readFields(DataInput in) throws IOException {
 realCounter.readFields(in);
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

public synchronized void readFields(DataInput in) throws IOException {
 displayName = Text.readString(in);
 counters.clear();
 int size = WritableUtils.readVInt(in);
 for(int i=0; i < size; i++) {
  Counter counter = new Counter();
  counter.readFields(in);
  counters.put(counter.getName(), counter);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

public synchronized void readFields(DataInput in) throws IOException {
 displayName = Text.readString(in);
 counters.clear();
 int size = WritableUtils.readVInt(in);
 for(int i=0; i < size; i++) {
  Counter counter = new Counter();
  counter.readFields(in);
  counters.put(counter.getName(), counter);
 }
}

代码示例来源:origin: org.apache.crunch/crunch-core

@Override
 public Object invoke(Object obj, Method m, Method m2, Object[] args) throws Throwable {
  String name = m.getName();
  if ("increment".equals(name)) {
   c.increment((Long) args[0]);
   return null;
  } else if ("getCounter".equals(name) || "getValue".equals(name)) {
   return c.getValue();
  } else if ("setValue".equals(name)) {
   c.setValue((Long) args[0]);
   return null;
  } else if ("getDisplayName".equals(name)) {
   return c.getDisplayName();
  } else if ("getName".equals(name)) {
   return c.getName();
  } else if ("getUnderlyingCounter".equals(name)) {
   return c;
  } else if ("readFields".equals(name)) {
   c.readFields((DataInput) args[0]);
   return null;
  } else if ("write".equals(name)) {
   c.write((DataOutput) args[0]);
   return null;
  }
  throw new IllegalStateException("Unhandled Counters.Counter method = " + name);
 }
}

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

@Override
public synchronized void readFields(DataInput in) throws IOException {
 displayName = StringInterner.weakIntern(Text.readString(in));
 counters.clear();
 int size = WritableUtils.readVInt(in);
 for (int i = 0; i < size; i++) {
  T counter = newCounter();
  counter.readFields(in);
  counters.put(counter.getName(), counter);
  limits.incrCounters();
 }
}

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

@Override
public synchronized void readFields(DataInput in) throws IOException {
 displayName = StringInterner.weakIntern(Text.readString(in));
 counters.clear();
 int size = WritableUtils.readVInt(in);
 for (int i = 0; i < size; i++) {
  T counter = newCounter();
  counter.readFields(in);
  counters.put(counter.getName(), counter);
  limits.incrCounters();
 }
}

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

@Override
public synchronized void readFields(DataInput in) throws IOException {
 displayName = StringInterner.weakIntern(Text.readString(in));
 counters.clear();
 int size = WritableUtils.readVInt(in);
 for (int i = 0; i < size; i++) {
  T counter = newCounter();
  counter.readFields(in);
  counters.put(counter.getName(), counter);
  limits.incrCounters();
 }
}

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

@Override
public synchronized void readFields(DataInput in) throws IOException {
 displayName = StringInterner.weakIntern(Text.readString(in));
 counters.clear();
 int size = WritableUtils.readVInt(in);
 for (int i = 0; i < size; i++) {
  T counter = newCounter();
  counter.readFields(in);
  counters.put(counter.getName(), counter);
  limits.incrCounters();
 }
}

相关文章