Support Questions
Find answers, ask questions, and share your expertise

Nifi putKudu processor java.lang.NumberFormatException

New Contributor

Hi I am trying to push string type data into UNIXTIME_MICROS type in Kudu table by putKudu processor in Nifi.

However I am getting this error.. 

 

2021-09-19 17:13:51,128 ERROR [Timer-Driven Process Thread-3] org.apache.nifi.processors.kudu.PutKudu PutKudu[id=f3ca3b60-017b-1000-5ae0-9c36cd79af0f] Failed to write due to java.lang.NumberFormatException: For input string: "2020-12-08 17:54:34.600322000": java.lang.NumberFormatException: For input string: "2020-12-08 17:54:34.600322000"
java.lang.NumberFormatException: For input string: "2020-12-08 17:54:34.600322000"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.parseLong(Long.java:631)
at org.apache.nifi.serialization.record.util.DataTypeUtils.toTimestamp(DataTypeUtils.java:1250)
at org.apache.nifi.processors.kudu.AbstractKuduProcessor.buildPartialRow(AbstractKuduProcessor.java:340)
at org.apache.nifi.processors.kudu.PutKudu.createKuduOperation(PutKudu.java:623)
at org.apache.nifi.processors.kudu.PutKudu.trigger(PutKudu.java:465)
at org.apache.nifi.processors.kudu.PutKudu.lambda$onTrigger$0(PutKudu.java:345)
at org.apache.nifi.processors.kudu.AbstractKuduProcessor.executeOnKuduClient(AbstractKuduProcessor.java:197)
at org.apache.nifi.processors.kudu.PutKudu.onTrigger(PutKudu.java:345)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1173)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:214)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

 

I have tried changing the timestamp format to 'yyyy‑MM‑dd HH:mm:ss.SSSSSS' in CSVreader and changed added attribute in the schema as

"name": timestamp "type": {
"type" : "string",
"logicalType" : "timestamp-millis"
}

but neither of them works.. 

 

These are the following versions of the services:

Nifi: 1.13.0

Kudu: 1.14.0

Impala: 3.4.0

 

 

 

 

0 REPLIES 0
; ;