// --------------------------------------------------------------- // HbaseTM_initialize (2) // Purpose - Initialize the HBase-trx TM Library. // --------------------------------------------------------------- int HbaseTM_initialize (bool pp_tracing, bool pv_tm_stats, CTmTimer *pp_tmTimer, short pv_nid) { int lv_error = 0; union { HBASETM_TraceMask lv_traceMask; int lv_traceMaskInt; } u; //initialize trace file char * lp_traceString = (char *) ms_getenv_str("HBASETM_TRACE"); char * lp_traceStringEnd; if (pp_tracing != 0 && lp_traceString) { lp_traceStringEnd = lp_traceString + strlen(lp_traceString); if (lp_traceStringEnd == NULL) { // tm_log_event(DTM_XMAPI_INVALID_STRING_SIZE, SQ_LOG_CRIT, "DTM_XMAPI_INVALID_STRING_SIZE"); // Make sure the lp_traceStringEnd pointer points to the null terminator. abort(); } //Convert hexadecimal string to int unsigned long lv_traceMaskul = strtoul(lp_traceString, &lp_traceStringEnd, 16); u.lv_traceMaskInt = (int) lv_traceMaskul; } else u.lv_traceMask = HBASETM_TraceOff; lv_error = gv_HbaseTM.initialize(u.lv_traceMask, pv_tm_stats, pp_tmTimer, pv_nid); HBASETrace((lv_error?HBASETM_TraceAPIExitError:HBASETM_TraceAPIExit), (HDR ": HbaseTM_initialize EXIT returning %d\n", lv_error)); return lv_error; } // HbaseTM_initialize
// --------------------------------------------------------------- // HbaseTM_initialize // Purpose - Initialize HBase-trx in a client. // --------------------------------------------------------------- int HbaseTM_initialize (short pv_nid) { int lv_error = gv_HbaseTM.initialize(pv_nid); return lv_error; }
//---------------------------------------------------------------- // HbaseTM_process_request_regions_info // Purpose: Retrieve region info for dtmci //--------------------------------------------------------------- HashMapArray* HbaseTM_process_request_regions_info() { cout << "Start HBaseTM_process_request_regions\n"; HashMapArray* mapArrayRegions = gv_HbaseTM.requestRegionInfo(); return mapArrayRegions; }
//---------------------------------------------------------------- // HbaseTM_initiate_stall // Purpose - Initiate stall in phase 2 //---------------------------------------------------------------- void HbaseTM_initiate_stall(int where) { cout << "HbaseTM_initiate_stall called with parameter " << where << "\n"; gv_HbaseTM.stall(where); }
//---------------------------------------------------------------- // HbaseTM_initiate_cp // Purpose - Initiate control point //---------------------------------------------------------------- void HbaseTM_initiate_cp() { gv_HbaseTM.addControlPoint(); }
//---------------------------------------------------------------- // HbaseTM_initiate_cp // Purpose - Initiate control point //---------------------------------------------------------------- void HbaseTM_initiate_cp() { cout << "HbaseTM_initiate_cp called\n"; gv_HbaseTM.addControlPoint(); }