Package com.alibaba.wasp.plan

Examples of com.alibaba.wasp.plan.UpdatePlan


      action.setEntityGroupLocation(entityGroupLocation);
    }
    action.setSessionId(context.getSessionId());
    List<UpdateAction> actions = new ArrayList<UpdateAction>();
    actions.add(action);
    UpdatePlan plan = new UpdatePlan(actions);
    context.setPlan(plan);
    LOG.debug("UpdatePlan " + plan);
  }
View Full Code Here


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

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

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

    UpdatePlan plan = (UpdatePlan) context.getPlan();
    List<WriteResultProto> writeResultProtos = engine.execUpdatePlan(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.UpdatePlan

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.