Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

HBase Cell level TTL does not work when after memstore flushed

avatar
Contributor

Hello ~

I'm looking for the solution of below symtoms.

Anyone who knows the solution ?

 

Thanks .

 

Environment : CDH 5.14 (HBase 1.2)

 

-- create test table
create 'jkkim','f'


-- put an sample data
put 'jkkim','row2','f:name','jonggyun Kim2'

-- put another sample data with TTL
put 'jkkim','row4','f:name','jonggyun Kim',{TTL => 10000}

-- scan after 15 seconds
scan 'jkkim'

-- row4 does not shown result (expected)
ROW COLUMN+CELL
row2 column=f:name, timestamp=1530609778641, value=jonggyun Kim2
1 row(s) in 0.0120 seconds


--put sample data again with TTL 
put 'jkkim','row4','f:name','jonggyun Kim',{TTL => 10000}

-- Run manually flush command
flush 'jkkim'


--scan after 15 seconds
scan 'jkkim'

-- row4 is shown result (not expected)
ROW COLUMN+CELL
row2 column=f:name, timestamp=1530609778641, value=jonggyun Kim2
row4 column=f:name, timestamp=1530609975940, value=jonggyun Kim

 

1 ACCEPTED SOLUTION

avatar
Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
4 REPLIES 4

avatar
Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Contributor

Dear Harsh J

Thank you very much. 

Very helpful.

 

One more questions about changing hfile format.

After change hfile format version, is it rewrite all of hfile to new version format?

Or Just be applied only newly created hfile?

 

Thanks.

avatar
Mentor

Immediately after the config change and restart, the existing HFiles will
stay as is (on V2), only newly flushed HFiles will be V3. But when the
table/region undergoes a major compaction, all HFiles will be rewritten to
V3. You can force a rewrite with the HBase Shell 'major_compact' command to
have it immediately rewrite all files.

avatar
Contributor

Got it!

Thank you for the explanation.