org.apache.hadoop.chukwa.extraction.demux.processor.mapper
Class JobLog.CounterHash

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,HashMap<String,Long>>
          extended by org.apache.hadoop.chukwa.extraction.demux.processor.mapper.JobLog.CounterHash
All Implemented Interfaces:
Serializable, Cloneable, Map<String,HashMap<String,Long>>
Enclosing class:
JobLog

public static class JobLog.CounterHash
extends HashMap<String,HashMap<String,Long>>

Parse counter string to object Example string: {(org\.apache\.hadoop\.mapred\.JobInProgress$Counter)(Job Counters ) [(TOTAL_LAUNCHED_REDUCES)(Launched reduce tasks)(1)] [(TOTAL_LAUNCHED_MAPS)(Launched map tasks)(14)] [(DATA_LOCAL_MAPS)(Data-local map tasks)(14)] } {(FileSystemCounters)(FileSystemCounters) [(FILE_BYTES_READ)(FILE_BYTES_READ)(132)] [(HDFS_BYTES_READ)(HDFS_BYTES_READ)(20471)] [(FILE_BYTES_WRITTEN)(FILE_BYTES_WRITTEN)(790)] [(HDFS_BYTES_WRITTEN)(HDFS_BYTES_WRITTEN)(248)] }

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
JobLog.CounterHash(String str)
           
 
Method Summary
 HashMap<String,Long> flat()
          Flat the counter hashs and add into map passed int.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

JobLog.CounterHash

public JobLog.CounterHash(String str)
Method Detail

flat

public HashMap<String,Long> flat()
Flat the counter hashs and add into map passed int. For example mentioned in the constructor, the result will be
 Counter:org\.apache\.hadoop\.mapred\.JobInProgress$Counter:TOTAL_LAUNCHED_REDUCES=1
 Counter:org\.apache\.hadoop\.mapred\.JobInProgress$Counter:TOTAL_LAUNCHED_MAPS=14
 Counter:org\.apache\.hadoop\.mapred\.JobInProgress$Counter:DATA_LOCAL_MAPS=14
 Counter:FileSystemCounters:FILE_BYTES_READ=132
 Counter:FileSystemCounters:HDFS_BYTES_READ=20471
 Counter:FileSystemCounters:FILE_BYTES_WRITTEN=790
 Counter:FileSystemCounters:HDFS_BYTES_WRITTEN=248
 



Copyright © ${year} The Apache Software Foundation