HBASE-892 Cell iteration is broken (Doğacan Güney via Jim Kellerman)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@698016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-09-22 22:00:31 +00:00
parent ebe81b974f
commit c912849278
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@ Release 0.19.0 - Unreleased
BUG FIXES
HBASE-891 HRS.validateValuesLength throws IOE, gets caught in the retries
HBASE-892 Cell iteration is broken (Doğacan Güney via Jim Kellerman)
IMPROVEMENTS
HBASE-890 Alter table operation and also related changes in REST interface

View File

@ -161,7 +161,7 @@ public class Cell implements Writable, Iterable<Cell> {
return new CellIterator();
}
private class CellIterator implements Iterator<Cell> {
private int currentValue = -1;
private int currentValue = 0;
CellIterator() {
}
@ -170,8 +170,9 @@ public class Cell implements Writable, Iterable<Cell> {
}
public Cell next() {
currentValue += 1;
return new Cell(values[currentValue], timestamps[currentValue]);
Cell c = new Cell(values[currentValue], timestamps[currentValue]);
currentValue++;
return c;
}
public void remove() throws UnsupportedOperationException {