Esempio n. 1
0
  @Test
  public void testMigrateFile() throws Exception {
    tool.createOrMigrateSchemaFile(tableName, simpleSchemaFile, true);

    Dao<SimpleHBaseRecord> dao =
        new SpecificAvroDao<SimpleHBaseRecord>(tablePool, tableName, "SimpleHBaseRecord", manager);
    testBasicOperations(dao);
  }
Esempio n. 2
0
  @Test
  public void testMigrateDirectory() throws Exception {
    tool.createOrMigrateSchemaDirectory("classpath:SchemaTool", true);

    // the table name is set in the schema file, so use that table name to
    // verify that creatOrMigrateSchemaDirectory worked
    tableName = "simple";

    Dao<SimpleHBaseRecord> dao =
        new SpecificAvroDao<SimpleHBaseRecord>(tablePool, tableName, "SimpleHBaseRecord", manager);
    testBasicOperations(dao);
  }