Package com.alibaba.wasp

Examples of com.alibaba.wasp.EntityGroupInfo.compareTo()


    EntityGroupInfo older = new EntityGroupInfo(tablename, empty, empty, false,
        0L);
    EntityGroupInfo newer = new EntityGroupInfo(tablename, empty, empty, false,
        1L);
    assertTrue(older.compareTo(newer) < 0);
    assertTrue(newer.compareTo(older) > 0);
    assertTrue(older.compareTo(older) == 0);
    assertTrue(newer.compareTo(newer) == 0);
  }
}
View Full Code Here


    EntityGroupInfo newer = new EntityGroupInfo(tablename, empty, empty, false,
        1L);
    assertTrue(older.compareTo(newer) < 0);
    assertTrue(newer.compareTo(older) > 0);
    assertTrue(older.compareTo(older) == 0);
    assertTrue(newer.compareTo(newer) == 0);
  }
}
View Full Code Here

          FConstants.EGINFO);
      byte[] locationValue = r.getValue(FConstants.CATALOG_FAMILY,
          FConstants.EGLOCATION);
      EntityGroupInfo key = EntityGroupInfo.parseFromOrNull(infoValue);
      ServerName value = ServerName.convert(locationValue);
      assertEquals(key.compareTo(egis.get(0)), 0);
      assertEquals(value.compareTo(egLocations[0]), 0);
    }

    // getTableEntityGroupsAndLocations
    List<Pair<EntityGroupInfo, ServerName>> entityGroupInfos = fMetaService
View Full Code Here

      assertEquals(egis.size(), egls.size());

      for (EntityGroupLocation egl : egls) {
        EntityGroupInfo eginfo = egl.getEntityGroupInfo();
        for (int i = 0; i < egis.size(); i++) {
          if (eginfo.compareTo(egis.get(i)) == 0) {
            assertEquals(egl.getHostname(), egLocations[i].getHostname());
            assertEquals(egl.getPort(), egLocations[i].getPort());
            break;
          }
        }
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.