timeval gv_startTime;

using namespace std;


int main () {

   short lv_retcode = 0;
   long  lv_txid = 20500;
   short lv_dtmid = 0;
   long ctrlPtNum;
   CHbaseTM *lp_myHbaseTM = 0;

   lp_myHbaseTM = new CHbaseTM();
   printf("Created the CHbaseTM object \n");

   lp_myHbaseTM->initConnection(lv_dtmid);
   printf("After lp_myHbaseTM->initConnection \n");

   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->prepareCommit(lv_txid);
   printf("After lp_myHbaseTM->prepareCommit(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_retcode = lp_myHbaseTM->participatingRegions(lv_txid);
   printf("After lp_myHbaseTM->participatingRegions(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_retcode = lp_myHbaseTM->doCommit(lv_txid);
   printf("After lp_myHbaseTM->doCommit(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->abortTransaction(lv_txid);
   printf("After lp_myHbaseTM->abortTransaction(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_txid++;
   lp_myHbaseTM->beginTransaction(&lv_txid);
   printf("After lp_myHbaseTM->beginTransaction, transactionId = %ld \n", lv_txid);

   lv_retcode = lp_myHbaseTM->prepareCommit(lv_txid);
   printf("After lp_myHbaseTM->prepareCommit(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_retcode = lp_myHbaseTM->participatingRegions(lv_txid);
   printf("After lp_myHbaseTM->participatingRegions(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   lv_retcode = lp_myHbaseTM->doCommit(lv_txid);
   printf("After lp_myHbaseTM->doCommit(transactionId = %ld), retcode = %d \n", lv_txid, lv_retcode);

   ctrlPtNum = lp_myHbaseTM->addControlPoint();
   printf("After lp_myHbaseTM->addControlPoint, transactionId = %ld \n", lv_txid);

   delete lp_myHbaseTM;
   
   return 0;
}
