Package org.apache.hadoop.hbase.avro.generated

Examples of org.apache.hadoop.hbase.avro.generated.ATableDescriptor


  public void testTableAdminAndMetadata() throws Exception {
    AvroServer.HBaseImpl impl = new AvroServer.HBaseImpl();

    assertEquals(impl.listTables().size(), 0);

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    impl.createTable(tableA);
    assertEquals(impl.listTables().size(), 1);
    assertTrue(impl.isTableEnabled(tableAname));
    assertTrue(impl.tableExists(tableAname));

    ATableDescriptor tableB = new ATableDescriptor();
    tableB.name = tableBname;
    impl.createTable(tableB);
    assertEquals(impl.listTables().size(), 2);

    impl.disableTable(tableBname);
View Full Code Here


   */
  @Test
  public void testFamilyAdminAndMetadata() throws Exception {
    AvroServer.HBaseImpl impl = new AvroServer.HBaseImpl();

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    AFamilyDescriptor familyA = new AFamilyDescriptor();
    familyA.name = familyAname;
    Schema familyArraySchema = Schema.createArray(AFamilyDescriptor.SCHEMA$);
    GenericArray<AFamilyDescriptor> families = new GenericData.Array<AFamilyDescriptor>(1, familyArraySchema);
View Full Code Here

   */
  @Test
  public void testDML() throws Exception {
    AvroServer.HBaseImpl impl = new AvroServer.HBaseImpl();

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    AFamilyDescriptor familyA = new AFamilyDescriptor();
    familyA.name = familyAname;
    Schema familyArraySchema = Schema.createArray(AFamilyDescriptor.SCHEMA$);
    GenericArray<AFamilyDescriptor> families = new GenericData.Array<AFamilyDescriptor>(1, familyArraySchema);
View Full Code Here

  //
  // Table metadata
  //

  static public ATableDescriptor htdToATD(HTableDescriptor table) throws IOException {
    ATableDescriptor atd = new ATableDescriptor();
    atd.name = ByteBuffer.wrap(table.getName());
    Collection<HColumnDescriptor> families = table.getFamilies();
    Schema afdSchema = Schema.createArray(AFamilyDescriptor.SCHEMA$);
    GenericData.Array<AFamilyDescriptor> afamilies = null;
    if (families.size() > 0) {
View Full Code Here

    AvroServer.HBaseImpl impl =
      new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration());

    assertEquals(impl.listTables().size(), 0);

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    impl.createTable(tableA);
    assertEquals(impl.listTables().size(), 1);
    assertTrue(impl.isTableEnabled(tableAname));
    assertTrue(impl.tableExists(tableAname));

    ATableDescriptor tableB = new ATableDescriptor();
    tableB.name = tableBname;
    impl.createTable(tableB);
    assertEquals(impl.listTables().size(), 2);

    impl.disableTable(tableBname);
View Full Code Here

  @Test
  public void testFamilyAdminAndMetadata() throws Exception {
    AvroServer.HBaseImpl impl =
      new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration());

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    AFamilyDescriptor familyA = new AFamilyDescriptor();
    familyA.name = familyAname;
    Schema familyArraySchema = Schema.createArray(AFamilyDescriptor.SCHEMA$);
    GenericArray<AFamilyDescriptor> families = new GenericData.Array<AFamilyDescriptor>(1, familyArraySchema);
View Full Code Here

  @Test
  public void testDML() throws Exception {
    AvroServer.HBaseImpl impl =
      new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration());

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    AFamilyDescriptor familyA = new AFamilyDescriptor();
    familyA.name = familyAname;
    Schema familyArraySchema = Schema.createArray(AFamilyDescriptor.SCHEMA$);
    GenericArray<AFamilyDescriptor> families = new GenericData.Array<AFamilyDescriptor>(1, familyArraySchema);
View Full Code Here

  //
  // Table metadata
  //

  static public ATableDescriptor htdToATD(HTableDescriptor table) throws IOException {
    ATableDescriptor atd = new ATableDescriptor();
    atd.name = ByteBuffer.wrap(table.getName());
    Collection<HColumnDescriptor> families = table.getFamilies();
    Schema afdSchema = Schema.createArray(AFamilyDescriptor.SCHEMA$);
    GenericData.Array<AFamilyDescriptor> afamilies = null;
    if (families.size() > 0) {
View Full Code Here

    AvroServer.HBaseImpl impl =
      new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration());

    assertEquals(impl.listTables().size(), 0);

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    impl.createTable(tableA);
    assertEquals(impl.listTables().size(), 1);
    assertTrue(impl.isTableEnabled(tableAname));
    assertTrue(impl.tableExists(tableAname));

    ATableDescriptor tableB = new ATableDescriptor();
    tableB.name = tableBname;
    impl.createTable(tableB);
    assertEquals(impl.listTables().size(), 2);

    impl.disableTable(tableBname);
View Full Code Here

  @Test
  public void testFamilyAdminAndMetadata() throws Exception {
    AvroServer.HBaseImpl impl =
      new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration());

    ATableDescriptor tableA = new ATableDescriptor();
    tableA.name = tableAname;
    AFamilyDescriptor familyA = new AFamilyDescriptor();
    familyA.name = familyAname;
    Schema familyArraySchema = Schema.createArray(AFamilyDescriptor.SCHEMA$);
    GenericArray<AFamilyDescriptor> families = new GenericData.Array<AFamilyDescriptor>(1, familyArraySchema);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.avro.generated.ATableDescriptor

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.