Examples of MetricsTable


Examples of co.cask.cdap.data2.dataset2.lib.table.MetricsTable

      this.entityCodecs = CacheBuilder.newBuilder().build(new CacheLoader<String, MetricsEntityCodec>() {
        @Override
        public MetricsEntityCodec load(String namespace) throws Exception {
          String tableName = namespace.toLowerCase() + "." + cConf.get(MetricsConstants.ConfigKeys.ENTITY_TABLE_NAME,
                                                                       MetricsConstants.DEFAULT_ENTITY_TABLE_NAME);
          MetricsTable table = getOrCreateMetricsTable(tableName, DatasetProperties.EMPTY);
          EntityTable entityTable = new EntityTable(table);

          return new MetricsEntityCodec(entityTable,
                                        MetricsConstants.DEFAULT_CONTEXT_DEPTH,
                                        MetricsConstants.DEFAULT_METRIC_DEPTH,
View Full Code Here

Examples of co.cask.cdap.data2.dataset2.lib.table.MetricsTable

                                    MetricsConstants.DEFAULT_METRIC_TABLE_PREFIX) + ".ts." + resolution;
      int ttl =  cConf.getInt(MetricsConstants.ConfigKeys.RETENTION_SECONDS + "." + resolution + ".seconds", -1);

      DatasetProperties props = ttl > 0 ?
        DatasetProperties.builder().add(OrderedTable.PROPERTY_TTL, ttl).build() : DatasetProperties.EMPTY;
      MetricsTable table = getOrCreateMetricsTable(tableName, props);
      LOG.info("TimeSeriesTable created: {}", tableName);
      return new TimeSeriesTable(table, entityCodecs.getUnchecked(namespace), resolution, getRollTime(resolution));
    } catch (Exception e) {
      LOG.error("Exception in creating TimeSeriesTable.", e);
      throw Throwables.propagate(e);
View Full Code Here

Examples of co.cask.cdap.data2.dataset2.lib.table.MetricsTable

  public AggregatesTable createAggregates(String namespace) {
    try {
      String tableName = namespace.toLowerCase() + "." +
                          cConf.get(MetricsConstants.ConfigKeys.METRICS_TABLE_PREFIX,
                                    MetricsConstants.DEFAULT_METRIC_TABLE_PREFIX) + ".agg";
      MetricsTable table = getOrCreateMetricsTable(tableName, DatasetProperties.EMPTY);
      LOG.info("AggregatesTable created: {}", tableName);
      return new AggregatesTable(table, entityCodecs.getUnchecked(namespace));
    } catch (Exception e) {
      LOG.error("Exception in creating AggregatesTable.", e);
      throw Throwables.propagate(e);
View Full Code Here

Examples of co.cask.cdap.data2.dataset2.lib.table.MetricsTable

  @Override
  public KafkaConsumerMetaTable createKafkaConsumerMeta(String namespace) {
    try {
      String tableName = namespace.toLowerCase() + "." + cConf.get(MetricsConstants.ConfigKeys.KAFKA_META_TABLE,
                                                     MetricsConstants.DEFAULT_KAFKA_META_TABLE);
      MetricsTable table = getOrCreateMetricsTable(tableName, DatasetProperties.EMPTY);
      LOG.info("KafkaConsumerMetaTable created: {}", tableName);
      return new KafkaConsumerMetaTable(table);
    } catch (Exception e) {
      LOG.error("Exception in creating KafkaConsumerMetaTable.", e);
      throw Throwables.propagate(e);
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.