# HyperLogLog getCount supports in batch request (CLIENT-1571)

**URL:** <https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386>\
**Category:** Delivered Requests\
**Created:** [April 20, 2021, 6:52am UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386 "2021-04-20T06:52:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yarosman](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/yarosman/32/1615_2.png) [@yarosman](https://discuss.aerospike.com/u/yarosman)\
**Post date:** [April 20, 2021, 6:52am UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386/1 "2021-04-20T06:52:38Z")

</div>

For example I want retrieve 30 records with bins ‘сlicks’, ‘shows’, ‘uniques\_hll’. If I use batch request I can retrieve ‘clicks’, ‘shows’ and raw `uniques_hll` value. And after that for each key I have to execute operate with hll getCount operation additionally. Is it possible to retrieve HLL count result for bin in batch request ?

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [April 20, 2021, 11:24pm UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386/2 "2021-04-20T23:24:30Z")

</div>

Currently, you cannot execute bin operations within a batch.

---

<div class="post-metadata">

**Author:** ![yarosman](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/yarosman/32/1615_2.png) [@yarosman](https://discuss.aerospike.com/u/yarosman)\
**Post date:** [April 21, 2021, 11:07am UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386/3 "2021-04-21T11:07:07Z")

</div>

Therefore for such simple operation I should execute 31 requests to aerospike ? (( Can I calculate count from HLLValue ?

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [April 21, 2021, 9:44pm UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386/4 "2021-04-21T21:44:16Z")

</div>

> [@yarosman](#):
>
> Therefore for such simple operation I should execute 31 requests to aerospike ?

Yes, currently only get, put, and background scans/queries accept bin operations.

> [@yarosman](#):
>
> Can I calculate count from HLLValue ?

No, the HLLValue is opaque to the clients.

---

<div class="post-metadata">

**Author:** ![yarosman](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/yarosman/32/1615_2.png) [@yarosman](https://discuss.aerospike.com/u/yarosman)\
**Post date:** [April 22, 2021, 8:42am UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386/5 "2021-04-22T08:42:03Z")

</div>

Maybe it is possible to extend functionality and control what retrieve for HLL in batch requesrt: raw value or count ?

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [October 29, 2021, 5:43pm UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386/6 "2021-10-29T17:43:06Z")

</div>

Recently clients added support for batch reads with operations.

See: CLIENT-1571 in [Java client version 5.1.6](https://download.aerospike.com/download/client/java/notes.html#5.1.6).

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/system/32/2274_2.png) [@system](https://discuss.aerospike.com/u/system)\
**Post date:** [January 28, 2022, 7:42pm UTC](https://discuss.aerospike.com/t/hyperloglog-getcount-supports-in-batch-request-client-1571/8386/7 "2022-01-28T19:42:37Z")

</div>

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.
