diff --git a/src/main/asciidoc/_chapters/architecture.adoc b/src/main/asciidoc/_chapters/architecture.adoc index 9a5eba9e9ec..9bdf179853f 100644 --- a/src/main/asciidoc/_chapters/architecture.adoc +++ b/src/main/asciidoc/_chapters/architecture.adoc @@ -452,8 +452,8 @@ scan.setFilter(f); scan.setBatch(10); // set this if there could be many columns returned ResultScanner rs = t.getScanner(scan); for (Result r = rs.next(); r != null; r = rs.next()) { - for (KeyValue kv : r.raw()) { - // each kv represents a column + for (Cell cell : result.listCells()) { + // each cell represents a column } } rs.close(); @@ -482,8 +482,8 @@ scan.setFilter(f); scan.setBatch(10); // set this if there could be many columns returned ResultScanner rs = t.getScanner(scan); for (Result r = rs.next(); r != null; r = rs.next()) { - for (KeyValue kv : r.raw()) { - // each kv represents a column + for (Cell cell : result.listCells()) { + // each cell represents a column } } rs.close(); @@ -518,8 +518,8 @@ scan.setFilter(f); scan.setBatch(10); // set this if there could be many columns returned ResultScanner rs = t.getScanner(scan); for (Result r = rs.next(); r != null; r = rs.next()) { - for (KeyValue kv : r.raw()) { - // each kv represents a column + for (Cell cell : result.listCells()) { + // each cell represents a column } } rs.close(); diff --git a/src/main/asciidoc/_chapters/datamodel.adoc b/src/main/asciidoc/_chapters/datamodel.adoc index ba4961a5a19..7d1aece00b6 100644 --- a/src/main/asciidoc/_chapters/datamodel.adoc +++ b/src/main/asciidoc/_chapters/datamodel.adoc @@ -425,7 +425,7 @@ Get get = new Get(Bytes.toBytes("row1")); get.setMaxVersions(3); // will return last 3 versions of row Result r = table.get(get); byte[] b = r.getValue(CF, ATTR); // returns current version of value -List kv = r.getColumn(CF, ATTR); // returns all versions of this column +List cells = r.getColumnCells(CF, ATTR); // returns all versions of this column ---- ==== Put diff --git a/src/main/asciidoc/_chapters/mapreduce.adoc b/src/main/asciidoc/_chapters/mapreduce.adoc index 61cff86993f..bba8cc92b94 100644 --- a/src/main/asciidoc/_chapters/mapreduce.adoc +++ b/src/main/asciidoc/_chapters/mapreduce.adoc @@ -417,8 +417,8 @@ public static class MyMapper extends TableMapper { private static Put resultToPut(ImmutableBytesWritable key, Result result) throws IOException { Put put = new Put(key.get()); - for (KeyValue kv : result.raw()) { - put.add(kv); + for (Cell cell : result.listCells()) { + put.add(cell); } return put; }