Package org.apache.accumulo.server.master.state

Examples of org.apache.accumulo.server.master.state.DistributedStore


    }
  }
 
  @Test
  public void testFakeZoo() throws DistributedStoreException {
    DistributedStore store = new FakeZooStore();
    store.put("/a/b/c", "abc".getBytes());
    byte[] abc = store.get("/a/b/c");
    assertArrayEquals(abc, "abc".getBytes());
    byte[] empty = store.get("/a/b");
    assertArrayEquals(empty, "".getBytes());
    store.put("/a/b", "ab".getBytes());
    assertArrayEquals(store.get("/a/b"), "ab".getBytes());
    store.put("/a/b/b", "abb".getBytes());
    List<String> children = store.getChildren("/a/b");
    assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b", "c")));
    store.remove("/a/b/c");
    children = store.getChildren("/a/b");
    assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b")));
  }
View Full Code Here


    }
  }
 
  @Test
  public void testFakeZoo() throws DistributedStoreException {
    DistributedStore store = new FakeZooStore();
    store.put("/a/b/c", "abc".getBytes());
    byte[] abc = store.get("/a/b/c");
    assertArrayEquals(abc, "abc".getBytes());
    byte[] empty = store.get("/a/b");
    assertArrayEquals(empty, "".getBytes());
    store.put("/a/b", "ab".getBytes());
    assertArrayEquals(store.get("/a/b"), "ab".getBytes());
    store.put("/a/b/b", "abb".getBytes());
    List<String> children = store.getChildren("/a/b");
    assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b", "c")));
    store.remove("/a/b/c");
    children = store.getChildren("/a/b");
    assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b")));
  }
View Full Code Here

    }
  }
 
  @Test
  public void testFakeZoo() throws DistributedStoreException {
    DistributedStore store = new FakeZooStore();
    store.put("/a/b/c", "abc".getBytes());
    byte[] abc = store.get("/a/b/c");
    assertArrayEquals(abc, "abc".getBytes());
    byte[] empty = store.get("/a/b");
    assertArrayEquals(empty, "".getBytes());
    store.put("/a/b", "ab".getBytes());
    assertArrayEquals(store.get("/a/b"), "ab".getBytes());
    store.put("/a/b/b", "abb".getBytes());
    List<String> children = store.getChildren("/a/b");
    assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b", "c")));
    store.remove("/a/b/c");
    children = store.getChildren("/a/b");
    assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b")));
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.server.master.state.DistributedStore

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.