2

When put a new row to HBase, it is needed to create a new Put instance and call add(byte [] family, byte [] qualifier, long ts, byte [] value) to add data, which will create a KeyValue instance. If there are lots of put operations, lots of Put and KeyValue will be created. It triggers GC frequently.

Is there any way to re-use Put and KeyValue? If so, I can use an ObjectPool to stable the memory usage instead of allocating memory which will be GCed very soon.

DeepNightTwo
  • 4,809
  • 8
  • 46
  • 60

0 Answers0