Examples of publishStat()


Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

      } else {
        // for partitioned table, the key is
        // common key prefix + static partition spec + DynamicPartSpec + taskID
        key = conf.getStatsAggPrefix() + spSpec + fspKey + Path.SEPARATOR + taskID;
      }
      statsPublisher.publishStat(key, StatsSetupConst.ROW_COUNT, Long.toString(fspValue.stat.getNumRows()));
    }
    statsPublisher.closeConnection();
  }
}
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

    } else {
      // In case of a partition, the key for temp storage is
      // "tableName + partitionSpecs + taskID"
      key = conf.getStatsAggPrefix() + partitionSpecs + Path.SEPARATOR + taskID;
    }
    statsPublisher.publishStat(key, StatsSetupConst.ROW_COUNT, Long.toString(stat.getNumRows()));
    statsPublisher.closeConnection();
  }
}
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

      }
      Map<String, String> statsToPublish = new HashMap<String, String>();
      for (String statType : fspValue.stat.getStoredStats()) {
        statsToPublish.put(statType, Long.toString(fspValue.stat.getStat(statType)));
      }
      statsPublisher.publishStat(key, statsToPublish);
    }
    statsPublisher.closeConnection();
  }
}
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

        key = conf.getStatsAggPrefix() + pspecs + Path.SEPARATOR + taskID;
      }
      for(String statType : stats.get(pspecs).getStoredStats()) {
        statsToPublish.put(statType, Long.toString(stats.get(pspecs).getStat(statType)));
      }
      statsPublisher.publishStat(key, statsToPublish);
      LOG.info("publishing : " + key + " : " + statsToPublish.toString());
    }
    statsPublisher.closeConnection();
  }
}
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

      Map<String, String> statsToPublish = new HashMap<String, String>();
      for (String statType : fspValue.stat.getStoredStats()) {
        statsToPublish.put(statType, Long.toString(fspValue.stat.getStat(statType)));
      }
      if (!statsPublisher.publishStat(key, statsToPublish)) {
        // The original exception is lost.
        // Not changing the interface to maintain backward compatibility
        if (isStatsReliable) {
          throw new HiveException(ErrorMsg.STATSPUBLISHER_PUBLISHING_ERROR.getErrorCodedMsg());
        }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

        key = conf.getStatsAggPrefix() + pspecs + Path.SEPARATOR + taskID;
      }
      for(String statType : stats.get(pspecs).getStoredStats()) {
        statsToPublish.put(statType, Long.toString(stats.get(pspecs).getStat(statType)));
      }
      if (!statsPublisher.publishStat(key, statsToPublish)) {
        if (isStatsReliable) {
          throw new HiveException(ErrorMsg.STATSPUBLISHER_PUBLISHING_ERROR.getErrorCodedMsg());
        }
      }
      LOG.info("publishing : " + key + " : " + statsToPublish.toString());
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

      }
      Map<String, String> statsToPublish = new HashMap<String, String>();
      for (String statType : fspValue.stat.getStoredStats()) {
        statsToPublish.put(statType, Long.toString(fspValue.stat.getStat(statType)));
      }
      if (!statsPublisher.publishStat(key, statsToPublish)) {
        // The original exception is lost.
        // Not changing the interface to maintain backward compatibility
        if (isStatsReliable) {
          throw new HiveException(ErrorMsg.STATSPUBLISHER_PUBLISHING_ERROR.getErrorCodedMsg());
        }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

        key = conf.getStatsAggPrefix() + pspecs + Path.SEPARATOR + taskID;
      }
      for(String statType : stats.get(pspecs).getStoredStats()) {
        statsToPublish.put(statType, Long.toString(stats.get(pspecs).getStat(statType)));
      }
      statsPublisher.publishStat(key, statsToPublish);
      LOG.info("publishing : " + key + " : " + statsToPublish.toString());
    }
    statsPublisher.closeConnection();
  }
}
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

      }
      Map<String, String> statsToPublish = new HashMap<String, String>();
      for (String statType : fspValue.stat.getStoredStats()) {
        statsToPublish.put(statType, Long.toString(fspValue.stat.getStat(statType)));
      }
      statsPublisher.publishStat(key, statsToPublish);
    }
    statsPublisher.closeConnection();
  }
}
View Full Code Here

Examples of org.apache.hadoop.hive.ql.stats.StatsPublisher.publishStat()

      assertNotNull(statsAggregator);
      assertTrue(statsAggregator.connect(conf));

      // publish stats
      fillStatMap("200", "1000");
      assertTrue(statsPublisher.publishStat("file_00000", stats));
      fillStatMap("400", "3000");
      assertTrue(statsPublisher.publishStat("file_00001", stats));


      // aggregate existing stats
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.