Package com.alibaba.wasp.plan

Examples of com.alibaba.wasp.plan.DeletePlan


                  entityGroupKeyCondition.getValue()));
      action.setEntityGroupLocation(entityGroupLocation);
    }
    List<DeleteAction> actions = new ArrayList<DeleteAction>();
    actions.add(action);
    DeletePlan deletePlan = new DeletePlan(actions);
    context.setPlan(deletePlan);
    LOG.debug("DeletePlan " + deletePlan.toString());
  }
View Full Code Here


    // delete
    context.setSql(delete);
    druidParser.generatePlan(context);
    Plan plan = context.getPlan();
    if (plan instanceof DeletePlan) {
      DeletePlan deletePlan = (DeletePlan) plan;
      List<DeleteAction> units = deletePlan.getActions();
      Assert.assertEquals(units.size(), 1);
      // EntityGroup execute delete
      eg.delete(units.get(0));
      Redo redo = eg.getLog();
      if (redo instanceof MemRedoLog) {
View Full Code Here

          } 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;
          }
View Full Code Here

        .getConfiguration()));
    context.setSql(sql);
    context.setReadModel(ReadModel.CURRENT);
    parser.generatePlan(context);

    DeletePlan plan = (DeletePlan) context.getPlan();
    List<WriteResultProto> writeResultProtos = engine.execDeletePlan(plan);
    assertTrue(writeResultProtos.size() == 1);

    for (ClientProtos.WriteResultProto writeResultProto : writeResultProtos) {
      assertTrue(writeResultProto.getCode() == ClientProtos.WriteResultProto.StatusCode.SUCCESS);
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.plan.DeletePlan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.