Package org.apache.hadoop.hbase.client.idx

Examples of org.apache.hadoop.hbase.client.idx.IdxIndexDescriptor


  }

  public void testIndexedScanWithDeletedRows() throws Exception {
    byte[] tableName = Bytes.toBytes("testIndexedScanWithDeletedRows");
    byte[] family = Bytes.toBytes("family");
    IdxIndexDescriptor indexDescriptor1
      = new IdxIndexDescriptor(qualLong, IdxQualifierType.LONG);
    IdxIndexDescriptor indexDescriptor2
      = new IdxIndexDescriptor(qualDouble, IdxQualifierType.DOUBLE);
    int numRows = 10000;

    Random random = new Random(10121986L)// pseudo random order of row insertions

    long timestamp = 0;
View Full Code Here



  public void testIdxRegionSplit() throws Exception {
    byte[] tableName = Bytes.toBytes("testIDxRegionSplit");
    byte[] family = Bytes.toBytes("family");
    IdxIndexDescriptor indexDescriptor = new IdxIndexDescriptor(qualLong,
      IdxQualifierType.LONG);
    int numRows = 1000;

    //Setting up region
    String method = "testIdxRegionSplit";
View Full Code Here

  private void checkIdxRegionCompaction(boolean majorcompaction)
    throws Exception {
    byte[] tableName = Bytes.toBytes("testIdxRegionCompaction_" + majorcompaction);
    byte[] family = Bytes.toBytes("family");
    IdxIndexDescriptor indexDescriptor = new IdxIndexDescriptor(qualLong,
      IdxQualifierType.LONG);
    int numRows = 1000;
    int flushInterval = numRows / 5 + 1;

    //Setting up region
View Full Code Here

  }

  public void testFlushCacheWhileScanning() throws Exception {
    byte[] tableName = Bytes.toBytes("testIdxRegionCompaction");
    byte[] family = Bytes.toBytes("family");
    IdxIndexDescriptor indexDescriptor = new IdxIndexDescriptor(qualLong,
      IdxQualifierType.LONG);
    int numRows = 1000;
    int flushAndScanInterval = 10;
    int compactInterval = 10 * flushAndScanInterval;

 
View Full Code Here

    byte[]... families) {
    HTableDescriptor htd = new HTableDescriptor(tableName);
    for (byte[] family : families) {
      try {
        IdxColumnDescriptor icd = new IdxColumnDescriptor(family);
        icd.addIndexDescriptor(new IdxIndexDescriptor(qual1,
          IdxQualifierType.BYTE_ARRAY));
        icd.addIndexDescriptor(new IdxIndexDescriptor(qual2,
          IdxQualifierType.BYTE_ARRAY));
        icd.addIndexDescriptor(new IdxIndexDescriptor(qual3,
          IdxQualifierType.BYTE_ARRAY));
        htd.addFamily(icd);
      } catch (IOException e) {
        throw new IllegalStateException(e);
      }
View Full Code Here

 
  public static void main(String args[]) throws Exception {
    HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
    HTableDescriptor tableDescr = new HTableDescriptor("testfacttable");
    IdxColumnDescriptor idxColumnDescriptor = new IdxColumnDescriptor(Bytes.toBytes("data"));
    IdxIndexDescriptor indexDescriptor1  = new IdxIndexDescriptor(Bytes.toBytes("d1"), IdxQualifierType.LONG);
    IdxIndexDescriptor indexDescriptor2  = new IdxIndexDescriptor(Bytes.toBytes("d2"), IdxQualifierType.LONG);
    IdxIndexDescriptor indexDescriptor3  = new IdxIndexDescriptor(Bytes.toBytes("d3"), IdxQualifierType.LONG);
    idxColumnDescriptor.addIndexDescriptor(indexDescriptor1);
    idxColumnDescriptor.addIndexDescriptor(indexDescriptor2);
    idxColumnDescriptor.addIndexDescriptor(indexDescriptor3);
    tableDescr.addFamily(idxColumnDescriptor);
    if(admin.tableExists("testfacttable")) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.idx.IdxIndexDescriptor

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.