2

I am doing some playing around with hbase shell to see how HBase behaves. But I cannot find anything equivalent in hbase shell of doing a put with a TTL different from that of the column family. The Java Put class (at least in HBase 1.x) has a setTTL method for the mutation the Put represents. Does HBase shell "put" command have anything equivalent?

Thanks.

user2456600
  • 515
  • 4
  • 14

1 Answers1

2

I found that the answer, only available if using HBase 1.x, is to do as follows:

hbase(main):001:0> put 't1', 'r1', 'c1', 'value', {'TTL'=>100}

That is, pass a Ruby hash as the last param here the key 'TTL' is mapped to the integer value of the TTL you want in milliseconds.

user2456600
  • 515
  • 4
  • 14