Skip to content

Commit

Permalink
Merge pull request larsgeorge#2 from matt-martin/master
Browse files Browse the repository at this point in the history
Fixing a minor off by one error
  • Loading branch information
larsgeorge committed Mar 3, 2012
2 parents f339c86 + 66d9b7c commit 6cbb40c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ch03/src/main/java/util/HBaseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
String val = vals[v < vals.length ? v : vals.length];
String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
Expand Down
2 changes: 1 addition & 1 deletion ch04/src/main/java/util/HBaseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
String val = vals[v < vals.length ? v : vals.length];
String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
Expand Down
2 changes: 1 addition & 1 deletion ch05/src/main/java/util/HBaseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
String val = vals[v < vals.length ? v : vals.length];
String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
Expand Down
2 changes: 1 addition & 1 deletion ch06/src/main/java/util/HBaseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
String val = vals[v < vals.length ? v : vals.length];
String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
Expand Down
2 changes: 1 addition & 1 deletion ch07/src/main/java/util/HBaseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
String val = vals[v < vals.length ? v : vals.length];
String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
Expand Down
2 changes: 1 addition & 1 deletion ch09/src/main/java/util/HBaseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
String val = vals[v < vals.length ? v : vals.length];
String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
Expand Down

0 comments on commit 6cbb40c

Please sign in to comment.