Examples of syncToStorage()


Examples of net.opentsdb.meta.UIDMeta.syncToStorage()

        }
       
      }
     
      try {
        final Deferred<UIDMeta> process_meta = meta.syncToStorage(tsdb,
            method == HttpMethod.PUT).addCallbackDeferring(new SyncCB());
        final UIDMeta updated_meta = process_meta.joinUninterruptibly();
        tsdb.indexUIDMeta(updated_meta);
        query.sendReply(query.serializer().formatUidMetaV1(updated_meta));
      } catch (IllegalStateException e) {
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

    rule.setLevel(1);
    rule.setOrder(0);
    rule.setType(TreeRuleType.TAGV_CUSTOM);
    rule.setNotes("Just some notes");
    rule.setField("foo");
    rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly();
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void storeRuleInvalidMissingCustomFieldMetricCustom() throws Exception {
    setupStorage();
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

    rule.setLevel(1);
    rule.setOrder(0);
    rule.setType(TreeRuleType.METRIC_CUSTOM);
    rule.setNotes("Just some notes");
    rule.setField("foo");
    rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly();
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void storeRuleInvalidRegexIdx() throws Exception {
    setupStorage();
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

    rule.setLevel(1);
    rule.setOrder(0);
    rule.setType(TreeRuleType.TAGK);
    rule.setRegex("^.*$");
    rule.setRegexGroupIdx(-1);
    rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly();
  }
 
  @Test
  public void deleteRule() throws Exception {
    setupStorage();
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

    final TreeRule rule = new TreeRule(1);
    rule.setLevel(1);
    rule.setOrder(0);
    rule.setType(TreeRuleType.METRIC);
    rule.setNotes("Just some notes");
    assertTrue(rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly());
    assertEquals(3, storage.numColumns(new byte[] { 0, 1 }));
  }
 
  @Test
  public void storeRuleMege() throws Exception {
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

    setupStorage();
    final TreeRule rule = new TreeRule(1);
    rule.setLevel(2);
    rule.setOrder(1);
    rule.setNotes("Just some notes");
    assertTrue(rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly());
    assertEquals(2, storage.numColumns(new byte[] { 0, 1 }));
    final TreeRule stored = JSON.parseToObject(
        storage.getColumn(new byte[] { 0, 1 },
        "tree_rule:2:1".getBytes(MockBase.ASCII())), TreeRule.class);
    assertEquals("Host owner", stored.getDescription());
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

 
  @Test (expected = IllegalArgumentException.class)
  public void storeRuleBadID0() throws Exception {
    setupStorage();
    final TreeRule rule = new TreeRule(0);
    rule.syncToStorage(storage.getTSDB(), false);
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void storeRuleBadID65536() throws Exception {
    setupStorage();
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

 
  @Test (expected = IllegalArgumentException.class)
  public void storeRuleBadID65536() throws Exception {
    setupStorage();
    final TreeRule rule = new TreeRule(65536);
    rule.syncToStorage(storage.getTSDB(), false);
  }
 
  @Test (expected = IllegalStateException.class)
  public void storeRuleNoChanges() throws Exception {
    setupStorage();
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

  @Test (expected = IllegalStateException.class)
  public void storeRuleNoChanges() throws Exception {
    setupStorage();
    final TreeRule rule = TreeRule.fetchRule(storage.getTSDB(), 1, 2, 1)
      .joinUninterruptibly();
    rule.syncToStorage(storage.getTSDB(), false);
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void storeRuleInvalidType() throws Exception {
    setupStorage();
View Full Code Here

Examples of net.opentsdb.tree.TreeRule.syncToStorage()

    setupStorage();
    final TreeRule rule = new TreeRule(1);
    rule.setLevel(1);
    rule.setOrder(0);
    rule.setNotes("Just some notes");
    rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly();
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void storeRuleInvalidMissingFieldTagk() throws Exception {
    setupStorage();
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.