Package com.alibaba.wasp.meta

Examples of com.alibaba.wasp.meta.FTable


      Assert.assertTrue(result);
      try {
        Plan plan = context.getPlan();
        if (plan instanceof CreateTablePlan) {
          CreateTablePlan createTable = (CreateTablePlan) plan;
          FTable ftable = createTable.getTable();
          TableSchemaCacheReader.getService(conf).createTable(ftable);
          TableSchemaCacheReader.getInstance(conf).addSchema(
              ftable.getTableName(), ftable);
        } else {
          Assert.assertTrue(false);
        }
      } catch (IOException ioe) {
        // ioe.printStackTrace();
View Full Code Here


    }
  }

  @Test
  public void printFTable() {
    FTable user = FMetaTestUtil.User;
    FTable photo = FMetaTestUtil.Photo;
    System.out.println(user.toString());
    // System.out.println("\n");
    System.out.println(photo.toString());
  }
View Full Code Here

      throws IOException, InterruptedException, NodeExistsException,
      KeeperException, DeserializationException, ServiceException {
    final byte[] tableName = Bytes.toBytes("ephemeral");

    // Create table then get the single entityGroup for our new table.
    FTable t = TESTING_UTIL.createTable(tableName);

    List<EntityGroup> entityGroups = cluster.getEntityGroups(tableName);
    EntityGroupInfo egi = getAndCheckSingleTableEntityGroup(entityGroups);

    int tableEntityGroupIndex = getTableEntityGroupIndex(admin, egi);
View Full Code Here

      InterruptedException, NodeExistsException, KeeperException {
    final byte[] tableName = Bytes
        .toBytes("testExistingZnodeBlocksSplitAndWeRollback");

    // Create table then get the single entityGroup for our new table.
    FTable t = TESTING_UTIL.createTable(tableName);
    // TESTING_UTIL.waitTableEnabled(tableName, 5000);
    List<EntityGroup> entityGroups = cluster.getEntityGroups(tableName);
    EntityGroupInfo egi = getAndCheckSingleTableEntityGroup(entityGroups);

    int tableEntityGroupIndex = getTableEntityGroupIndex(admin, egi);
View Full Code Here

  public void testShutdownSimpleFixup() throws IOException,
      InterruptedException {
    final byte[] tableName = Bytes.toBytes("testShutdownSimpleFixup");

    // Create table then get the single entityGroup for our new table.
    FTable t = TESTING_UTIL.createTable(tableName);
    TESTING_UTIL.waitTableEnabled(tableName, 5000);
    List<EntityGroup> entityGroups = cluster.getEntityGroups(tableName);
    EntityGroupInfo egi = getAndCheckSingleTableEntityGroup(entityGroups);

    int tableEntityGroupIndex = getTableEntityGroupIndex(admin, egi);
View Full Code Here

      InterruptedException {
    final byte[] tableName = Bytes
        .toBytes("testShutdownFixupWhenDaughterHasSplit");

    // Create table then get the single entityGroup for our new table.
    FTable t = TESTING_UTIL.createTable(tableName);
    TESTING_UTIL.waitTableEnabled(tableName, 5000);
    List<EntityGroup> entityGroups = cluster.getEntityGroups(tableName);
    EntityGroupInfo egi = getAndCheckSingleTableEntityGroup(entityGroups);

    int tableEntityGroupIndex = getTableEntityGroupIndex(admin, egi);
View Full Code Here

      DeserializationException {
    final byte[] tableName = Bytes
        .toBytes("testMasterRestartWhenSplittingIsPartial");

    // Create table then get the single entityGroup for our new table.
    FTable t = TESTING_UTIL.createTable(tableName);
    TESTING_UTIL.waitTableEnabled(tableName, 5000);
    List<EntityGroup> entityGroups = cluster.getEntityGroups(tableName);
    EntityGroupInfo egi = getAndCheckSingleTableEntityGroup(entityGroups);

    int tableEntityGroupIndex = getTableEntityGroupIndex(admin, egi);
View Full Code Here

    FServer fServer = null;
    List<EntityGroup> entityGroups = null;
    WaspAdmin admin = new WaspAdmin(TESTING_UTIL.getConfiguration());
    try {
      // Create table then get the single entityGroup for our new table.
      FTable t = TESTING_UTIL.createTable(tableName);
      TESTING_UTIL.waitTableEnabled(tableName, 5000);
      entityGroups = cluster.getEntityGroups(tableName);
      int fserverIndex = cluster.getServerWith(entityGroups.get(0)
          .getEntityGroupName());
      fServer = cluster.getFServer(fserverIndex);
View Full Code Here

        druidParser.parseSqlToStatement(context);
        druidParser.generatePlan(context);
        Plan plan = context.getPlan();
        if (plan instanceof CreateTablePlan) {
          CreateTablePlan createTable = (CreateTablePlan) plan;
          FTable ftable = createTable.getTable();
          fmetaServices.createTable(ftable);
          TableSchemaCacheReader reader = TableSchemaCacheReader
              .getInstance(fmetaServices.getConf());
          reader.addSchema(ftable.getTableName(), ftable);
        }
      } catch (IOException ioe) {
        ioe.printStackTrace();
      }
    }
View Full Code Here

  }

  @Test
  public void printFTable() {
    FTable user = FMetaTestUtil.User;
    FTable photo = FMetaTestUtil.Photo;
    System.out.println(user.toString());
    System.out.println("\n");
    System.out.println(photo.toString());
  }
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.meta.FTable

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.