You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by "Kepes, Ivan" <ik...@cboe.com> on 2020/12/16 20:58:38 UTC

PutKudu Processor Not Correctly Ingesting Microsecond Timestamps

Has anyone been able to ingest timestamps with microsecond granularity using the PutKudu Processor? Incoming microsecond granularity timestamps are being inserted as millisecond timestamps. I believe what happens is the toTimestamp function is creating timestamps using Timestamp(Long.parselong()) (https://github.com/apache/nifi/blob/rel/nifi-1.12.0/nifi-commons/nifi-record/src/main/java/org/apache/nifi/serialization/record/util/DataTypeUtils.java#L1163) which expects input in milliseconds (https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html#Timestamp-long-) and is not microsecond aware. For reference, toTimestamp is called from buildPartialRow() (https://github.com/apache/nifi/blob/rel/nifi-1.12.0/nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-processors/src/main/java/org/apache/nifi/processors/kudu/AbstractKuduProcessor.java#L331)

I can file a Jira if appropriate. Looking at the code I'm not convinced code changes are required but I have not been able to figure out how to get around this.

Thanks, Ivan.
Confidentiality Notice: This email, including attachments, may include non-public, proprietary, confidential or legally privileged information. If you are not an intended recipient or an authorized agent of an intended recipient, you are hereby notified that any dissemination, distribution or copying of the information contained in or transmitted with this email is unauthorized and strictly prohibited. If you have received this email in error, please notify the sender by replying to this message and permanently delete this email, its attachments, and any copies of it immediately. You should not retain, copy or use this email or any attachment for any purpose, or disclose all or any part of the contents to any other person.