Package org.kitesdk.data.hbase.manager

Examples of org.kitesdk.data.hbase.manager.DefaultSchemaManager


  }

  @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


  }

  @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

  }

  @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

    Dao<ManagedSchema> managedDao = new SpecificAvroDao<ManagedSchema>(
        tablePool, "managed_schemas", managedRecordString, ManagedSchema.class);

    managedDao.delete(new PartitionKey(tableName, "test"));

    SchemaManager manager = new DefaultSchemaManager(tablePool);
    try {
      manager.getEntityVersion(tableName, "test",
          parser.parseEntitySchema(testRecord));
      fail();
    } catch (SchemaNotFoundException e) {
      // This is what we expect
    }
    manager.createSchema(tableName, "test", testRecord,
        "org.kitesdk.data.hbase.avro.AvroKeyEntitySchemaParser",
        "org.kitesdk.data.hbase.avro.AvroKeySerDe",
        "org.kitesdk.data.hbase.avro.AvroEntitySerDe");
    assertEquals(
        0,
        manager.getEntityVersion(tableName, "test",
            parser.parseEntitySchema(testRecord)));
  }
View Full Code Here

   * table in HBase, and create the required tables to run.
   */
  public UserProfileExample() {
    Configuration conf = HBaseConfiguration.create();
    HTablePool pool = new HTablePool(conf, 10);
    SchemaManager schemaManager = new DefaultSchemaManager(pool);

    registerSchemas(conf, schemaManager);

    userProfileDao = new SpecificAvroDao<UserProfileModel>(pool,
        "kite_example_user_profiles", "UserProfileModel", schemaManager);
View Full Code Here

TOP

Related Classes of org.kitesdk.data.hbase.manager.DefaultSchemaManager

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.