Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.HTableDescriptor.addIndex()


    desc.addFamily(new HColumnDescriptor(FAMILY));

    // Create a new index that does lexicographic ordering on COL_A
    IndexSpecification colAIndex = new IndexSpecification(INDEX_COL_A,
        COL_A);
    desc.addIndex(colAIndex);

    admin = new IndexedTableAdmin(conf);
    admin.createTable(desc);
    table = new IndexedTable(conf, desc.getName());
  }
View Full Code Here


    LOG.warn("Not putting table in readonly, if its being written to, the index may get out of sync");
    HTableDescriptor indexTableDesc = createIndexTableDesc(baseTableName, indexSpec);
    super.createTable(indexTableDesc);
    super.disableTable(baseTableName);
    HTableDescriptor desc = super.getTableDescriptor(baseTableName);
    desc.addIndex(indexSpec);
    super.modifyTable(baseTableName, desc);
    super.enableTable(baseTableName);
    reIndexTable(baseTableName, indexSpec);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.