Package com.yahoo.omid.client

Examples of com.yahoo.omid.client.TransactionManager.beginTransaction()


   @Test public void testScanUncommitted() throws Exception {
      try{
         TransactionManager tm = new TransactionManager(conf);
         TransactionalTable table = new TransactionalTable(conf, TEST_TABLE);
         TransactionState t=tm.beginTransaction();
         int[] lIntsA=new int[]{100,243,2342,22,1,5,43,56};
         for (int i=0;i<lIntsA.length;i++) {
            byte[]data=Bytes.toBytes(lIntsA[i]);
            Put put=new Put(data);
            put.add(Bytes.toBytes(TEST_FAMILY), Bytes.toBytes(TEST_COL), data);
View Full Code Here


   @Test
   public void runTestWriteWriteConflict() throws Exception {
      TransactionManager tm = new TransactionManager(conf);
      TransactionalTable tt = new TransactionalTable(conf, TEST_TABLE);

      TransactionState t1 = tm.beginTransaction();
      LOG.info("Transaction created " + t1);

      TransactionState t2 = tm.beginTransaction();
      LOG.info("Transaction created" + t2);
View Full Code Here

      TransactionalTable tt = new TransactionalTable(conf, TEST_TABLE);

      TransactionState t1 = tm.beginTransaction();
      LOG.info("Transaction created " + t1);

      TransactionState t2 = tm.beginTransaction();
      LOG.info("Transaction created" + t2);

      byte[] row = Bytes.toBytes("test-simple");
      byte[] fam = Bytes.toBytes(TEST_FAMILY);
      byte[] col = Bytes.toBytes("testdata");
View Full Code Here

         admin.enableTable(table2);
      }

      TransactionalTable tt2 = new TransactionalTable(conf, table2);

      TransactionState t1 = tm.beginTransaction();
      LOG.info("Transaction created " + t1);

      TransactionState t2 = tm.beginTransaction();
      LOG.info("Transaction created" + t2);
View Full Code Here

      TransactionalTable tt2 = new TransactionalTable(conf, table2);

      TransactionState t1 = tm.beginTransaction();
      LOG.info("Transaction created " + t1);

      TransactionState t2 = tm.beginTransaction();
      LOG.info("Transaction created" + t2);

      byte[] row = Bytes.toBytes("test-simple");
      byte[] row2 = Bytes.toBytes("test-simple2");
      byte[] fam = Bytes.toBytes(TEST_FAMILY);
View Full Code Here

   @Test
   public void runTestCleanupAfterConflict() throws Exception {
      TransactionManager tm = new TransactionManager(conf);
      TransactionalTable tt = new TransactionalTable(conf, TEST_TABLE);

      TransactionState t1 = tm.beginTransaction();
      LOG.info("Transaction created " + t1);

      TransactionState t2 = tm.beginTransaction();
      LOG.info("Transaction created" + t2);
View Full Code Here

      TransactionalTable tt = new TransactionalTable(conf, TEST_TABLE);

      TransactionState t1 = tm.beginTransaction();
      LOG.info("Transaction created " + t1);

      TransactionState t2 = tm.beginTransaction();
      LOG.info("Transaction created" + t2);

      byte[] row = Bytes.toBytes("test-simple");
      byte[] fam = Bytes.toBytes(TEST_FAMILY);
      byte[] col = Bytes.toBytes("testdata");
View Full Code Here

   public void testCleanupWithDeleteRow() throws Exception {
      try {
         TransactionManager tm = new TransactionManager(conf);
         TransactionalTable tt = new TransactionalTable(conf, TEST_TABLE);

         TransactionState t1 = tm.beginTransaction();
         LOG.info("Transaction created " + t1);

         int rowcount = 10;
         int count = 0;
View Full Code Here

            p.add(fam, col, data1);
            tt.put(t1, p);
         }
         tm.tryCommit(t1);

         TransactionState t2 = tm.beginTransaction();
         LOG.info("Transaction created " + t2);
         Delete d = new Delete(modrow);
         tt.delete(t2, d);

         ResultScanner rs = tt.getScanner(t2, new Scan());
View Full Code Here

            LOG.trace("row: " + Bytes.toString(r.getRow()) + " count: " + count);
            r = rs.next();
         }
         assertEquals("Wrong count", rowcount - 1, count);

         TransactionState t3 = tm.beginTransaction();
         LOG.info("Transaction created " + t3);
         Put p = new Put(modrow);
         p.add(fam, col, data2);
         tt.put(t3, p);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.