Examples of Assigner


Examples of org.hivedb.meta.Assigner

  }

  // TODO There is no guarantee that records get assigned to different nodes, causes intermittent failures
  @Test
  public void shouldThrowAnExceptionIfARecordIsStoredOnMoreThanOneNode() throws Exception {
    final Assigner assigner = context.mock(Assigner.class);
    final Hive hive = Hive.load(getHive().getUri(), (HiveDataSourceProvider) getHive().getDataSourceProvider(), assigner);
    context.checking(new Expectations() {
      {
        exactly(2).of(assigner).chooseNode(with(any(Collection.class)), with(anything()));
        will(onConsecutiveCalls(returnValue(hive.getNode(1)), returnValue(hive.getNode(2))));
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.