if (columnfamilies.size() != values.size())
return new ReturnMsg(0,
"Mismatch between values list and columnfamilies list.");
try {
HTable table = new HTable(conf, tableName);
long lockId = table.startUpdate(getRow());
for (int i = 0; i < values.size(); i++) {
Text column = null;
if (getColumn(i).toString().contains(":"))
column = getColumn(i);
else
column = new Text(getColumn(i) + ":");
table.put(lockId, column, getValue(i));
}
if(timestamp != null)
table.commit(lockId, Long.parseLong(timestamp));
else
table.commit(lockId);
return new ReturnMsg(1, "1 row inserted successfully.");
} catch (IOException e) {
String[] msg = e.getMessage().split("[\n]");
return new ReturnMsg(0, msg[0]);