[ 
https://issues.apache.org/jira/browse/NIFI-7737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17349417#comment-17349417
 ] 

ASF subversion and git services commented on NIFI-7737:
-------------------------------------------------------

Commit 0b29a42991a63da3b2bacad94c4f6e49ca5e1862 in nifi's branch 
refs/heads/main from Wouter de Vries
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=0b29a42 ]

NIFI-7737: add string array option to putcassandrarecord

NIFI-7737: fix checkstyle issues

Signed-off-by: Matthew Burgess <mattyb...@apache.org>

This closes #5005


> Add support for String[] to PutCassandraRecord
> ----------------------------------------------
>
>                 Key: NIFI-7737
>                 URL: https://issues.apache.org/jira/browse/NIFI-7737
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Wouter de Vries
>            Assignee: Wouter de Vries
>            Priority: Major
>             Fix For: 1.14.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Currently the PutCassandraRecord processor does support string arrays. Trying 
> to use them results in the following error:
> {noformat}
> | 2020-08-13 15:15:37,861 ERROR [Timer-Driven Process Thread-5] 
> o.a.n.p.cassandra.PutCassandraRecord 
> PutCassandraRecord[id=af756410-1ef0-3d80-045e-160f02632c54] Unable to write 
> the records into Cassandra table due to 
> com.datastax.driver.core.exceptions.InvalidTypeException: Value 3 of type 
> class [Ljava.lang.Object; does not correspond to any CQL3 type: 
> com.datastax.driver.core.exceptions.InvalidTypeException: Value 3 of type 
> class [Ljava.lang.Object; does not correspond to any CQL3 type
> | com.datastax.driver.core.exceptions.InvalidTypeException: Value 3 of type 
> class [Ljava.lang.Object; does not correspond to any CQL3 type
> |     at com.datastax.driver.core.querybuilder.Utils.convert(Utils.java:361)
> |     at 
> com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:265)
> |     at 
> com.datastax.driver.core.BatchStatement.getIdAndValues(BatchStatement.java:92)
> |     at 
> com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:597)
> |     at 
> com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:131)
> |     at 
> com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:68)
> |     at 
> org.apache.nifi.processors.cassandra.PutCassandraRecord.onTrigger(PutCassandraRecord.java:300)
> |     at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> |     at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
> |     at 
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
> |     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)
> | Caused by: com.datastax.driver.core.exceptions.CodecNotFoundException: 
> Codec not found for requested operation: [ANY <-> [Ljava.lang.Object;]
> |     at 
> com.datastax.driver.core.CodecRegistry.notFound(CodecRegistry.java:741)
> |     at 
> com.datastax.driver.core.CodecRegistry.createCodec(CodecRegistry.java:602)
> |     at 
> com.datastax.driver.core.CodecRegistry.findCodec(CodecRegistry.java:582)
> |     at 
> com.datastax.driver.core.CodecRegistry.codecFor(CodecRegistry.java:429)
> |     at com.datastax.driver.core.querybuilder.Utils.convert(Utils.java:357)
> |     ... 18 common frames omitted{noformat}
> The solution is to add the appropriate codec for this type conversion. I will 
> submit a PR for this change.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to