hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-8866) Implement RegEx support for Column Qualifiers etc. in Thrift
Date Thu, 04 Jul 2013 08:43:23 GMT
Lars George created HBASE-8866:

             Summary: Implement RegEx support for Column Qualifiers etc. in Thrift
                 Key: HBASE-8866
                 URL: https://issues.apache.org/jira/browse/HBASE-8866
             Project: HBase
          Issue Type: New Feature
          Components: Thrift
            Reporter: Lars George

In the Thrift 1 definition file it says:

   * Get a scanner on the current table starting at the specified row and
   * ending at the last row in the table.  Return the specified columns.
   * @return scanner id to be used with other scanner procedures
  ScannerID scannerOpen(
    /** name of table */
    1:Text tableName,

     * Starting row in table to scan.
     * Send "" (empty string) to start at the first row.
    2:Text startRow,

     * columns to scan. If column name is a column family, all
     * columns of the specified column family are returned. It's also possible
     * to pass a regex in the column qualifier.
    3:list<Text> columns,

    /** Scan attributes */
    4:map<Text, Text> attributes
  ) throws (1:IOError io)

Especially that "columns" can contain a regex for the qualifier. The code though does *not*
support that currently:

    public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow,
        List<ByteBuffer> columns,
        Map<ByteBuffer, ByteBuffer> attributes) throws IOError {
      try {
        HTable table = getTable(tableName);
        Scan scan = new Scan(getBytes(startRow));
        addAttributes(scan, attributes);
        if(columns != null && columns.size() != 0) {
          for(ByteBuffer column : columns) {
            byte [][] famQf = KeyValue.parseColumn(getBytes(column));
            if(famQf.length == 1) {
            } else {
              scan.addColumn(famQf[0], famQf[1]);
        return addScanner(table.getScanner(scan));
      } catch (IOException e) {
        LOG.warn(e.getMessage(), e);
        throw new IOError(e.getMessage());

It parses the columns as literals, and sets up the Scan without supporting the appropriate
QualifierFilter (or others) with RegexStringComparator. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message