Package org.apache.hadoop.hbase.index

Examples of org.apache.hadoop.hbase.index.IndexedHTableDescriptor.readFields()


    if (null == status) {
      fail("Status should not be null");
    }
    FSDataInputStream fsDataInputStream = fs.open(status.getPath());
    HTableDescriptor iHtd = new IndexedHTableDescriptor();
    iHtd.readFields(fsDataInputStream);
    assertEquals(((IndexedHTableDescriptor) iHtd).getIndices().size(), 2);
    Scan s = new Scan();
    ResultScanner scanner = table.getScanner(s);
    Result[] next = scanner.next(10);
    List<KeyValue> cf1 = next[0].getColumn(Bytes.toBytes("f1"), Bytes.toBytes("q1"));
View Full Code Here


    if (null == status) {
      fail("Status should not be null");
    }
    FSDataInputStream fsDataInputStream = fs.open(status.getPath());
    HTableDescriptor iHtd = new IndexedHTableDescriptor();
    iHtd.readFields(fsDataInputStream);
    assertEquals(((IndexedHTableDescriptor) iHtd).getIndices().size(), 1);
    Scan s = new Scan();
    ResultScanner scanner = table.getScanner(s);
    Result[] next = scanner.next(10);
    List<KeyValue> cf1 = next[0].getColumn(Bytes.toBytes("f1"), Bytes.toBytes("q1"));
View Full Code Here

          if (null == status) {
            return;
          }
          fsDataInputStream = fs.open(status.getPath());
          iHtd = new IndexedHTableDescriptor();
          iHtd.readFields(fsDataInputStream);
        } catch (EOFException e) {
          if (LOG.isDebugEnabled()) {
            LOG.debug(iHtd.getNameAsString() + " is normal table and not an indexed table.", e);
          }
        } catch (IOException i) {
View Full Code Here

      FileSystem fs = FSUtils.getCurrentFileSystem(conf);
      Path path = getTableInfoFilePath(conf, tableName, fs);
      if (null != path) {
        fsDataInputStream = fs.open(path);
        tableDescriptor = new IndexedHTableDescriptor();
        tableDescriptor.readFields(fsDataInputStream);
      }
    } catch (IOException e) {
      if (e instanceof EOFException) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Error reading data from the table descriptor . Got " + e + " exception");
View Full Code Here

      FileStatus status = IndexMasterObserver.getTableInfoPath(fs, path);
      if (null == status) {
        throw new IOException(tableName + " status is null");
      }
      fsDataInputStream = fs.open(status.getPath());
      indexedHTabDescriptor.readFields(fsDataInputStream);
      return indexedHTabDescriptor;
    } catch (EOFException e) {
      return new HTableDescriptor(indexedHTabDescriptor);
    } catch (IOException i) {
      throw i;
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.