Posts: 12
Registered: ‎07-05-2018

APACHE kudu java API

I am trying to update the kudu table using java api.

i ahve table named users and it has two columns username and age,primary key is set when creating the table 

when i try to update the age from 26 whicc is already been inserted to 29.

 i get the following exception

org.apache.kudu.client.NonRecoverableException: Primary key column usernameis not set
at org.apache.kudu.client.KuduException.transformException(
at org.apache.kudu.client.KuduSession.apply(
at java_app.Update_kudu.main(
Caused by: java.lang.IllegalStateException: Primary key column username is not set


code goes like this 

Update update = table.newUpdate();
PartialRow row = update.getRow();
row.addInt("age", Integer.parseInt("27"));

please help me with this .ASAP