@Override
  public int scannerOpenWithScan(ByteBuffer tableName, TScan tScan,
    Map<ByteBuffer, ByteBuffer> attributes) throws IOError {

    Table table = null;
    try {
      table = getTable(tableName);
      Scan scan = new Scan();
      addAttributes(scan, attributes);
      if (tScan.isSetStartRow()) {
        scan.withStartRow(tScan.getStartRow());
      }
      if (tScan.isSetStopRow()) {
        scan.withStopRow(tScan.getStopRow());
      }
      if (tScan.isSetTimestamp()) {
        scan.setTimeRange(0, tScan.getTimestamp());
      }
      if (tScan.isSetCaching()) {
        scan.setCaching(tScan.getCaching());
      }
      if (tScan.isSetBatchSize()) {
        scan.setBatch(tScan.getBatchSize());
      }
      if (tScan.isSetColumns() && !tScan.getColumns().isEmpty()) {
        for (ByteBuffer column : tScan.getColumns()) {
          byte[][] famQf = CellUtil.parseColumn(getBytes(column));
          if (famQf.length == 1) {
            scan.addFamily(famQf[0]);
          } else {
            scan.addColumn(famQf[0], famQf[1]);
          }
        }
      }
      if (tScan.isSetFilterString()) {
        ParseFilter parseFilter = new ParseFilter();
        scan.setFilter(parseFilter.parseFilterString(tScan.getFilterString()));
      }
      if (tScan.isSetReversed()) {
        scan.setReversed(tScan.isReversed());
      }
      if (tScan.isSetCacheBlocks()) {
        scan.setCacheBlocks(tScan.isCacheBlocks());
      }
      return addScanner(table.getScanner(scan), tScan.sortColumns);
    } catch (IOException e) {
      LOG.warn(e.getMessage(), e);
      throw getIOError(e);
    } finally {
      closeTable(table);
    }
  }
Note: this internal interface is slightly different from public APIs in regard to handling of
the qualifier. Here we differ from the public Java API in that null != byte[0]. Rather, we
respect qual == null as a request for the entire column family. The caller (
{@link #getVerTs(ByteBuffer, ByteBuffer, ByteBuffer, long, int, Map)}) interface IS consistent
in that the column is parse like normal.
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHBaseServiceHandler.java