Package net.opentsdb.tree

Examples of net.opentsdb.tree.TreeBuilder


                new ArrayList<TreeBuilder>(trees.size());
                for (Tree tree : trees) {
                  if (!tree.getEnabled()) {
                    continue;
                  }
                  final TreeBuilder builder = new TreeBuilder(tsdb, tree);
                  tree_builders.add(builder);
                }
               
                for (TreeBuilder builder : tree_builders) {
                  builder_calls.add(builder.processTimeseriesMeta(meta));
                }
                return Deferred.group(builder_calls)
                  .addCallback(new TreeBuilderBufferCB());
              } else {
                return Deferred.fromResult(false);
View Full Code Here


                new ArrayList<TreeBuilder>(trees.size());
                for (Tree tree : trees) {
                  if (!tree.getEnabled()) {
                    continue;
                  }
                  final TreeBuilder builder = new TreeBuilder(tsdb, tree);
                  tree_builders.add(builder);
                }
               
                for (TreeBuilder builder : tree_builders) {
                  builder_calls.add(builder.processTimeseriesMeta(meta));
                }
                return Deferred.group(builder_calls)
                  .addCallback(new TreeBuilderBufferCB());
              } else {
                return Deferred.fromResult(false);
View Full Code Here

                new ArrayList<TreeBuilder>(trees.size());
                for (Tree tree : trees) {
                  if (!tree.getEnabled()) {
                    continue;
                  }
                  final TreeBuilder builder = new TreeBuilder(tsdb, tree);
                  tree_builders.add(builder);
                }
               
                for (TreeBuilder builder : tree_builders) {
                  builder_calls.add(builder.processTimeseriesMeta(meta));
                }
                return Deferred.group(builder_calls)
                  .addCallback(new TreeBuilderBufferCB());
              } else {
                return Deferred.fromResult(false);
View Full Code Here

      if (query.getAPIMethod() == HttpMethod.GET || query.getAPIMethod() == HttpMethod.POST ||
          query.getAPIMethod() == HttpMethod.PUT) {
       
        final HashMap<String, HashMap<String, Object>> results =
          new HashMap<String, HashMap<String, Object>>(tsuids.size());
        final TreeBuilder builder = new TreeBuilder(tsdb, tree);
        for (String tsuid : tsuids) {
          final HashMap<String, Object> tsuid_results =
            new HashMap<String, Object>();
         
          try {
            final TSMeta meta = TSMeta.getTSMeta(tsdb, tsuid)
              .joinUninterruptibly();
            // if the meta doesn't exist, we can't process, so just log a
            // message to the results and move on to the next TSUID
            if (meta == null) {
              tsuid_results.put("branch", null);
              tsuid_results.put("meta", null);
              final ArrayList<String> messages = new ArrayList<String>(1);
              messages.add("Unable to locate TSUID meta data");
              tsuid_results.put("messages", messages);
              results.put(tsuid, tsuid_results);
              continue;
            }
           
            builder.processTimeseriesMeta(meta, true).joinUninterruptibly();
            tsuid_results.put("branch", builder.getRootBranch());
            tsuid_results.put("meta", meta);
            tsuid_results.put("messages", builder.getTestMessage());
           
            results.put(tsuid, tsuid_results);
          } catch (DeferredGroupException e) {
            // we want to catch NSU errors and handle them gracefully for
            // TSUIDs where they may have been deleted
View Full Code Here

TOP

Related Classes of net.opentsdb.tree.TreeBuilder

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.