Package com.alibaba.wasp

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


      fMetaService.updateEntityGroupLocation(egis.get(i), egLocations[i]);
    }
    for (int i = 0; i < egis.size(); i++) {
      // getEntityGroupLocation
      ServerName sn = fMetaService.getEntityGroupLocation(egis.get(i));
      assertEquals(sn.compareTo(egLocations[i]), 0);
    }

    for (int i = 0; i < egis.size(); i++) {
      // getEntityGroupsAndLocations
      Pair<EntityGroupInfo, ServerName> pair = fMetaService
View Full Code Here


    Map<EntityGroupInfo, ServerName> entityGroups = fMetaService.fullScan(
        disabledTables, false);
    assertEquals(entityGroups.size(), egis.size());
    for (int i = 0; i < egis.size(); i++) {
      ServerName sn = entityGroups.get(egis.get(i));
      assertEquals(sn.compareTo(egLocations[i]), 0);
    }

    // getOfflineSplitParents
    Map<EntityGroupInfo, Result> offlineSplitParents = fMetaService
        .getOfflineSplitParents();
View Full Code Here

      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
        .getTableEntityGroupsAndLocations(Bytes.toBytes(tableName), false);
View Full Code Here

    for (Pair<EntityGroupInfo, ServerName> pair : entityGroupInfos) {
      entityGroups.put(pair.getFirst(), pair.getSecond());
    }
    for (int i = 0; i < egis.size(); i++) {
      ServerName sn = entityGroups.get(egis.get(i));
      assertEquals(sn.compareTo(egLocations[i]), 0);
    }
    fMetaService.dropTable(FMetaTestUtil.User.getTableName());
  }

  @Test
View Full Code Here

        ServerName value = ServerName.convert(locationValue);
        entityGroups.put(key, value);
      }
      for (int i = 0; i < egis.size(); i++) {
        ServerName sn = entityGroups.get(egis.get(i));
        assertEquals(sn.compareTo(egLocations[i]), 0);
      }

      // scanEntityGroupLocation
      byte[] row = Bytes.toBytes("20001");
      EntityGroupLocation egLocation = fMetaService.scanEntityGroupLocation(
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.