@Test public void testConvertToScanPrefixKey() { Row filterRow = new RowWithSchema(filterSchemaPrefix, "AAPL"); Scan scan = (Scan)serde.convertToQuery(filterRow); assertEquals("Should be start row 'AAPL'", "AAPL", Bytes.toString(scan.getStartRow())); assertEquals("Should be stop row 'AAPM'", "AAPM", Bytes.toString(scan.getStopRow())); }
@Override public Query convertToQuery(Row row) { if (filtersEntireRowKey(row)) { return convertToGet(row); } else if (filtersRowKeyPrefix(row)) { return convertToScan(row); } else { throw new RuntimeException("Default HBase serde only supports full row key or prefix row key reads."); } }
DefaultHBaseSerde implements HBaseSerde { @Override public Query convertToQuery(Row row) { if (filtersEntireRowKey(row)) { return convertToGet(row); } else if (filtersRowKeyPrefix(row)) { return convertToScan(row); } else { throw new RuntimeException("Default HBase serde only supports full row key or prefix row key reads."); } } }
DefaultHBaseSerde implements HBaseSerde { @Override public Query convertToQuery(Row row) { if (filtersEntireRowKey(row)) { return convertToGet(row); } else if (filtersRowKeyPrefix(row)) { return convertToScan(row); } else { throw new RuntimeException("Default HBase serde only supports full row key or prefix row key reads."); } }  }
DefaultHBaseSerde implements HBaseSerde { @Override public Query convertToQuery(Row row) { if (filtersEntireRowKey(row)) { return convertToGet(row); } else if (filtersRowKeyPrefix(row)) { return convertToScan(row); } else { throw new RuntimeException("Default HBase serde only supports full row key or prefix row key reads."); } }  void configure(Config config); @Override Query convertToQuery(Row row); @Override Row convertFromResult(Result result); @Override List<Row> convertFromResults(Iterable<Result> results); @Override Put convertToPut(Row row); @Override List<Put> convertToPuts(List<Row> rows); @Override Delete convertToDelete(Row row); @Override List<Delete> convertToDeletes(List<Row> rows); }
DefaultHBaseSerde implements HBaseSerde { @Override public Query convertToQuery(Row row) { if (filtersEntireRowKey(row)) { return convertToGet(row); } else if (filtersRowKeyPrefix(row)) { return convertToScan(row); } else { throw new RuntimeException("Default HBase serde only supports full row key or prefix row key reads."); } }  void configure(Config config); @Override Query convertToQuery(Row row); @Override Row convertFromResult(Result result); @Override List<Row> convertFromResults(Iterable<Result> results); @Override Put convertToPut(Row row); @Override List<Put> convertToPuts(List<Row> rows); @Override Delete convertToDelete(Row row); @Override List<Delete> convertToDeletes(List<Row> rows);  }