Examples of obtainScanner()


Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

  private void scanTable(String tableName, boolean printValues)
  throws IOException {
    HTable table = new HTable(conf, new Text(tableName));
   
    HScannerInterface scanner =
      table.obtainScanner(columns, HConstants.EMPTY_START_ROW);
   
    try {
      HStoreKey key = new HStoreKey();
      TreeMap<Text, byte[]> results = new TreeMap<Text, byte[]>();
     
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

  }

  private void scanTable(boolean printResults)
  throws IOException {
    HTable table = new HTable(conf, new Text(TABLE_NAME));
    HScannerInterface scanner = table.obtainScanner(columns,
        HConstants.EMPTY_START_ROW);
    try {
      HStoreKey key = new HStoreKey();
      TreeMap<Text, byte[]> results = new TreeMap<Text, byte[]>();
      while (scanner.next(key, results)) {
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

      } else {
        throw new IOException("no index directory found");
      }

      HTable table = new HTable(conf, new Text(TABLE_NAME));
      scanner = table.obtainScanner(columns, HConstants.EMPTY_START_ROW);

      HStoreKey key = new HStoreKey();
      TreeMap<Text, byte[]> results = new TreeMap<Text, byte[]>();

      IndexConfiguration indexConf = new IndexConfiguration();
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

  }

  private void scanTable(final String tableName, final boolean printValues) throws IOException {
    HTable table = new HTable(conf, new Text(tableName));

    HScannerInterface scanner = table.obtainScanner(columns, HConstants.EMPTY_START_ROW);
    int numFound = doScan(scanner, printValues);
    Assert.assertEquals(NUM_ROWS, numFound);
  }

  private void scanTableWithRowFilter(final String tableName, final boolean printValues) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

  private void scanTableWithRowFilter(final String tableName, final boolean printValues) throws IOException {
    HTable table = new HTable(conf, new Text(tableName));
    Map<Text, byte[]> columnMap = new HashMap<Text, byte[]>();
    columnMap.put(TEXT_COLUMN1, VALUE);
    RegExpRowFilter filter = new RegExpRowFilter(null, columnMap);
    HScannerInterface scanner = table.obtainScanner(columns, HConstants.EMPTY_START_ROW, filter);
    int numFound = doScan(scanner, printValues);
    Assert.assertEquals(NUM_ROWS, numFound);
  }

  private int doScan(final HScannerInterface scanner, final boolean printValues) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

      HConstants.EMPTY_START_ROW:
      new Text(URLDecoder.decode(request.getParameter(END_ROW),
        HConstants.UTF8_ENCODING));

    HScannerInterface scanner = (request.getParameter(END_ROW) == null)?
       table.obtainScanner(columns, startRow):
       table.obtainScanner(columns, startRow, endRow);
   
    // Make a scanner id by hashing the object toString value (object name +
    // an id).  Will make identifier less burdensome and more url friendly.
    String scannerid =
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

      new Text(URLDecoder.decode(request.getParameter(END_ROW),
        HConstants.UTF8_ENCODING));

    HScannerInterface scanner = (request.getParameter(END_ROW) == null)?
       table.obtainScanner(columns, startRow):
       table.obtainScanner(columns, startRow, endRow);
   
    // Make a scanner id by hashing the object toString value (object name +
    // an id).  Will make identifier less burdensome and more url friendly.
    String scannerid =
      Integer.toHexString(JenkinsHash.hash(scanner.toString().getBytes(), -1));
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

        HTable table = getTable(tableName);
        Text[] columnsText = new Text[columns.size()];
        for (int i = 0; i < columns.size(); ++i) {
          columnsText[i] = getText(columns.get(i));
        }
        HScannerInterface scanner = table.obtainScanner(columnsText,
            getText(startRow));
        return addScanner(scanner);
      } catch (IOException e) {
        throw new IOError(e.getMessage());
      }
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

        HTable table = getTable(tableName);
        Text[] columnsText = new Text[columns.size()];
        for (int i = 0; i < columns.size(); ++i) {
          columnsText[i] = getText(columns.get(i));
        }
        HScannerInterface scanner = table.obtainScanner(columnsText,
            getText(startRow), getText(stopRow));
        return addScanner(scanner);
      } catch (IOException e) {
        throw new IOError(e.getMessage());
      }
View Full Code Here

Examples of org.apache.hadoop.hbase.HTable.obtainScanner()

        HTable table = getTable(tableName);
        Text[] columnsText = new Text[columns.size()];
        for (int i = 0; i < columns.size(); ++i) {
          columnsText[i] = getText(columns.get(i));
        }
        HScannerInterface scanner = table.obtainScanner(columnsText,
            getText(startRow), timestamp);
        return addScanner(scanner);
      } catch (IOException e) {
        throw new IOError(e.getMessage());
      }
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.