hi! i am trying to store a column with a serialize...
# troubleshooting
j
hi! i am trying to store a column with a serialized HLL. i wrote a small spark app for an offline table and i'm using
com.clearspring.analytics
and generating my HLL like this:
Copy code
val hll = new HyperLogLog(12)
hll.offer(rows.filter(p => p.customer.isDefined).map(p => p.customer.get))
val serializedHll = ObjectSerDeUtils.HYPER_LOG_LOG_SER_DE.serialize(hll)
it seems to ~work ok but when i generate segments i'm getting some errors that I'm not really sure how to debug. any thoughts?
Copy code
java.lang.RuntimeException: Caught exception while de-serializing HyperLogLog
Suppressed: java.lang.NullPointerException	atorg.apache.pinot.segment.local.startree.v2.builder.OffHeapSingleTreeBuilder.close(OffHeapSingleTreeBuilder.java:346)
at org.apache.pinot.segment.local.startree.v2.builder.MultipleTreesBuilder.build(MultipleTreesBuilder.java:143)
and when i look at where the null pointer is coming from, it seems to be from
_starTreeRecordBuffer.close()
which seems odd?
if it's any help I have my schema configured as:
Copy code
name: "customers"
dataType: "BYTES"
and set a
functionColumnPairs
for
DISTINCTCOUNTHLL__customers
m
What version of the jar are you using from clearspring?
Pinot is using
2.7.0
Note, that you can also do HLL on the fly (during query time) on raw columns. Unless you want to preaggregate offline.
j
Ooo this is a good catch I think I'm using 2.9.5. I didn't even think about this!
hmmm, didn't end up being it. switched to 2.7.0 but still erroring. different error thought which makes me think it is further along:
Copy code
Caused by: java.lang.RuntimeException: Caught exception while de-serializing HyperLogLog
        at org.apache.pinot.segment.local.utils.CustomSerDeUtils$6.deserialize(CustomSerDeUtils.java:172)
        at org.apache.pinot.segment.local.utils.CustomSerDeUtils$6.deserialize(CustomSerDeUtils.java:156)
        at org.apache.pinot.segment.local.aggregator.DistinctCountHLLValueAggregator.deserializeAggregatedValue(DistinctCountHLLValueAggregator.java:103)
i wrote a test for my spark app that passes as well to check if deserializing was working and it passed.
Copy code
val hll = ObjectSerDeUtils.HYPER_LOG_LOG_SER_DE.deserialize(output.head.serializedHll)
hll.cardinality() shouldBe 2