Package org.apache.sqoop.submission.counter

Examples of org.apache.sqoop.submission.counter.CounterGroup


   */
  private Counters convertMapreduceCounters(org.apache.hadoop.mapred.Counters hadoopCounters) {
    Counters sqoopCounters = new Counters();

    for(org.apache.hadoop.mapred.Counters.Group hadoopGroup : hadoopCounters) {
      CounterGroup sqoopGroup = new CounterGroup(hadoopGroup.getName());
      for(org.apache.hadoop.mapred.Counters.Counter hadoopCounter : hadoopGroup) {
        Counter sqoopCounter = new Counter(hadoopCounter.getName(), hadoopCounter.getValue());
        sqoopGroup.addCounter(sqoopCounter);
      }
      sqoopCounters.addCounterGroup(sqoopGroup);
    }

    return sqoopCounters;
View Full Code Here


      while(rs.next()) {
        String groupName = rs.getString(1);
        String counterName = rs.getString(2);
        long value = rs.getLong(3);

        CounterGroup group = counters.getCounterGroup(groupName);
        if(group == null) {
          group = new CounterGroup(groupName);
          counters.addCounterGroup(group);
        }

        group.addCounter(new Counter(counterName, value));
      }

      if(counters.isEmpty()) {
        return null;
      } else {
View Full Code Here

TOP

Related Classes of org.apache.sqoop.submission.counter.CounterGroup

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.