Package org.kitesdk.data.hbase.tool

Examples of org.kitesdk.data.hbase.tool.SchemaTool


  public static SchemaManager initializeSchemaManager(
      HTablePool tablePool, String directory) throws Exception {
    SchemaManager entityManager = new DefaultSchemaManager(
        tablePool);
    SchemaTool schemaTool = new SchemaTool(new HBaseAdmin(getConf()),
        entityManager);
    schemaTool.createOrMigrateSchemaDirectory(directory, true);
    return entityManager;
  }
View Full Code Here


  }

  @Before
  public void before() throws Exception {
    tablePool = new HTablePool(HBaseTestUtils.getConf(), 10);
    SchemaTool tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()),
        new DefaultSchemaManager(tablePool));
    tool.createOrMigrateSchema(tableName, testRecord, true);
    tool.createOrMigrateSchema(tableName, testRecordv2, true);
    tool.createOrMigrateSchema(compositeTableName, compositeSubrecord1, true);
    tool.createOrMigrateSchema(compositeTableName, compositeSubrecord2, true);
    tool.createOrMigrateSchema(incrementTableName, testIncrement, true);
    manager = new DefaultSchemaManager(tablePool);
  }
View Full Code Here

    manager.migrateSchema(tableName, "TestRecord", badMigrationRecordIntToLong);
  }

  @Test(expected = IncompatibleSchemaException.class)
  public void testBadCreateIncompatibleKey1() throws Exception {
    SchemaTool tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()),
        new DefaultSchemaManager(tablePool));
    tool.createOrMigrateSchema(tableName, badCreateIncompatibleKey1, false);
  }
View Full Code Here

    tool.createOrMigrateSchema(tableName, badCreateIncompatibleKey1, false);
  }

  @Test(expected = IncompatibleSchemaException.class)
  public void testBadCreateIncompatibleKey2() throws Exception {
    SchemaTool tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()),
        new DefaultSchemaManager(tablePool));
    tool.createOrMigrateSchema(tableName, badCreateIncompatibleKey2, false);
  }
View Full Code Here

    tool.createOrMigrateSchema(tableName, badCreateIncompatibleKey2, false);
  }

  @Test(expected = IncompatibleSchemaException.class)
  public void testBadCreateIncompatibleColumn1() throws Exception {
    SchemaTool tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()),
        new DefaultSchemaManager(tablePool));
    tool.createOrMigrateSchema(tableName, badCreateIncompatibleColumn1, false);
  }
View Full Code Here

    tool.createOrMigrateSchema(tableName, badCreateIncompatibleColumn1, false);
  }

  @Test(expected = IncompatibleSchemaException.class)
  public void testBadCreateIncompatibleColumn2() throws Exception {
    SchemaTool tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()),
        new DefaultSchemaManager(tablePool));
    tool.createOrMigrateSchema(tableName, badCreateIncompatibleColumn2, false);
  }
View Full Code Here

    tool.createOrMigrateSchema(tableName, badCreateIncompatibleColumn2, false);
  }

  @Test(expected = IncompatibleSchemaException.class)
  public void testBadCreateIncompatibleColumn3() throws Exception {
    SchemaTool tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()),
        new DefaultSchemaManager(tablePool));
    tool.createOrMigrateSchema(tableName, badCreateIncompatibleColumn3, false);
  }
View Full Code Here

      throw new RuntimeException(e);
    }
    // Use the SchemaTool to create the schemas that are in the example-models
    // directory, and create the table and column families required by those
    // schemas.
    SchemaTool tool = new SchemaTool(admin, schemaManager);
    tool.createOrMigrateSchemaDirectory("classpath:example-models", true);
  }
View Full Code Here

TOP

Related Classes of org.kitesdk.data.hbase.tool.SchemaTool

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.