Skip to content

Commit

Permalink
Use new API methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgeorge committed Mar 15, 2015
1 parent 6a0ac5c commit c5fd614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch03/src/main/java/client/PutExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public static void main(String[] args) throws IOException {

Put put = new Put(Bytes.toBytes("row1")); // co PutExample-3-NewPut Create put with specific row.

put.add(Bytes.toBytes("colfam1"), Bytes.toBytes("qual1"),
put.addColumn(Bytes.toBytes("colfam1"), Bytes.toBytes("qual1"),
Bytes.toBytes("val1")); // co PutExample-4-AddCol1 Add a column, whose name is "colfam1:qual1", to the put.
put.add(Bytes.toBytes("colfam1"), Bytes.toBytes("qual2"),
put.addColumn(Bytes.toBytes("colfam1"), Bytes.toBytes("qual2"),
Bytes.toBytes("val2")); // co PutExample-4-AddCol2 Add another column, whose name is "colfam1:qual2", to the put.

table.put(put); // co PutExample-5-DoPut Store row with column into the HBase table.
Expand Down

0 comments on commit c5fd614

Please sign in to comment.