Package com.alibaba.wasp.fserver.redo

Examples of com.alibaba.wasp.fserver.redo.Redo


      InsertPlan insertPlan = (InsertPlan) plan;
      List<InsertAction> units = insertPlan.getActions();
      Assert.assertEquals(units.size(), 1);
      // EntityGroup execute insert
      eg.insert(units.get(0));
      Redo redo = eg.getLog();
      if (redo instanceof MemRedoLog) {
        MemRedoLog memRedo = (MemRedoLog) redo;
        Assert.assertEquals(0, memRedo.size());
      }
    }
View Full Code Here


      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) {
        MemRedoLog memRedo = (MemRedoLog) redo;
        Assert.assertEquals(memRedo.size(), 0);
      }
    }
View Full Code Here

      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) {
        MemRedoLog memRedo = (MemRedoLog) redo;
        Assert.assertEquals(memRedo.size(), 0);
      }
    }
View Full Code Here

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

TOP

Related Classes of com.alibaba.wasp.fserver.redo.Redo

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.