@Test(expected = RowTooBigException.class)
  public void testScanAcrossManySmallColumns() 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 to memstore
      for (int i = 0; i < 10; i++) {
        Put put = new Put(row1);
        for (int j = 0; j < 10 * 10000; j++) {
          byte[] value = new byte[10];
          put.addColumn(fam1, Bytes.toBytes("col_" + i + "_" + j), value);
        }
        region.put(put);
        region.flush(true);
      }
      region.compact(true);

      Get get = new Get(row1);
      region.get(get);
    } finally {
      HBaseTestingUtil.closeRegionAndWAL(region);
    }
  }
Usecase: - create a row with 1M cells, 10 bytes in each - flush & run major compaction - try to
Get whole row. OOME happened in StoreScanner.next(..).
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRowTooBig.java