@Test(expected = RowTooBigException.class)
  public void testScannersSeekOnFewLargeCells() throws IOException {
    byte[] row1 = Bytes.toBytes("row1");
    byte[] fam1 = Bytes.toBytes("fam1");

    TableDescriptor tableDescriptor = TableDescriptorBuilder.newBuilder(TEST_TD)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(fam1)).build();

    final RegionInfo hri = RegionInfoBuilder.newBuilder(tableDescriptor.getTableName()).build();
    HRegion region = HBaseTestingUtil.createRegionAndWAL(hri, rootRegionDir, HTU.getConfiguration(),
      tableDescriptor);
    try {
      // Add 5 cells to memstore
      for (int i = 0; i < 5; i++) {
        Put put = new Put(row1);

        byte[] value = new byte[5 * 1024 * 1024];
        put.addColumn(fam1, Bytes.toBytes("col_" + i), value);
        region.put(put);
        region.flush(true);
      }

      Get get = new Get(row1);
      region.get(get);
    } finally {
      HBaseTestingUtil.closeRegionAndWAL(region);
    }
  }
Usecase: - create a row with 5 large cells (5 Mb each) - flush memstore but don't compact
storefiles. - try to Get whole row. OOME happened before we actually get to reading results,
but during seeking, as each StoreFile gets it's own scanner, and each scanner seeks after the
first KV.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRowTooBig.java