Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

APACHE kudu java API

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

Don't have an account?
Coming from Hortonworks? Activate your account here