// EntityGroup execute insert
OperationStatus status = eg.insert(units.get(0));
if (status.getOperationStatusCode() != org.apache.hadoop.hbase.HConstants.OperationStatusCode.SUCCESS) {
success = false;
}
Redo redo = eg.getLog();
try {
while (redo.peekLastUnCommitedTransaction() != null) {
Thread.sleep(500);
}
} catch (Exception e) {
success = false;
}
} else if (plan instanceof UpdatePlan) {
UpdatePlan updatePlan = (UpdatePlan) plan;
List<UpdateAction> units = updatePlan.getActions();
Assert.assertEquals(units.size(), 1);
// EntityGroup execute insert
OperationStatus status = eg.update(units.get(0));
if (status.getOperationStatusCode() != org.apache.hadoop.hbase.HConstants.OperationStatusCode.SUCCESS) {
success = false;
}
Redo redo = eg.getLog();
try {
while (redo.peekLastUnCommitedTransaction() != null) {
Thread.sleep(500);
}
} catch (Exception e) {
success = false;
}
} else if (plan instanceof DeletePlan) {
LOG.info(" DeletePlan is " + plan.toString());
DeletePlan deletePlan = (DeletePlan) plan;
List<DeleteAction> units = deletePlan.getActions();
Assert.assertEquals(units.size(), 1);
OperationStatus status = eg.delete(units.get(0));
if (status.getOperationStatusCode() != org.apache.hadoop.hbase.HConstants.OperationStatusCode.SUCCESS) {
success = false;
}
Redo redo = eg.getLog();
try {
while (redo.peekLastUnCommitedTransaction() != null) {
Thread.sleep(500);
}
} catch (Exception e) {
success = false;
}