Package net.opentsdb.core

Examples of net.opentsdb.core.WritableDataPoints


        for (int i = 3; i < words.length; i++) {
          if (!words[i].isEmpty()) {
            Tags.parse(tags, words[i]);
          }
        }
        final WritableDataPoints dp = getDataPoints(tsdb, metric, tags);
        Deferred<Object> d;
        if (Tags.looksLikeInteger(value)) {
          d = dp.addPoint(timestamp, Tags.parseLong(value));
        } else // floating point value
          d = dp.addPoint(timestamp, Float.parseFloat(value));
        }
        d.addErrback(errback);
        points++;
        if (points % 1000000 == 0) {
          final long now = System.nanoTime();
View Full Code Here


  private static
    WritableDataPoints getDataPoints(final TSDB tsdb,
                                     final String metric,
                                     final HashMap<String, String> tags) {
    final String key = metric + tags;
    WritableDataPoints dp = datapoints.get(key);
    if (dp != null) {
      return dp;
    }
    dp = tsdb.newDataPoints();
    dp.setSeries(metric, tags);
    dp.setBatchImport(true);
    datapoints.put(key, dp);
    return dp;
  }
View Full Code Here

TOP

Related Classes of net.opentsdb.core.WritableDataPoints

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.