Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. id geom osm_id name type
  2. 1 00003381C75CBE6443 24254755 Millenium Hall office
  3. 2 00003382D5B5D76S3G ...
  4. ...
  5.  
  6. hbase(main):002:0> create 'hbaseTable', 'column1'
  7. 0 row(s) in 1.2620 seconds
  8.  
  9. hbase(main):003:0>
  10.  
  11. Configuration conf = HBaseConfiguration.create();
  12. HTableInterface table = new HTable(conf, "hbaseTable".getBytes());
  13.  
  14. Put put = new Put(1.getBytes());// for id 1.
  15. put.add("column1".getBytes(), "geom".getBytes(), 00003381C75CBE6443.getBytes());
  16. put.add("column1".getBytes(), "osm_id".getBytes(), 24254755.getBytes());
  17. put.add("column1".getBytes(), "name".getBytes(), Millenium Hall.getBytes());
  18. put.add("column1".getBytes(), "type".getBytes(), office.getBytes());
  19.  
  20. puts.add(put);// same can do for other ids as well.
  21.  
  22.  
  23. hTable.put(puts);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement