Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisReplPlanMonitorGetStats

int ctMemphisReplPlanMonitorGetStats( pRCESJson request, ppRCESJson result )

Description:

Retrieve the statistics for the Replication Plan for a given period of time. The snapshot is retrieved for direct, reverse or both directions.

HTTP URL: <baseURL>/ctMemphisReplPlanMonitorGetStats/

HTTP Verb: POST

Constraints:

  • "id" must be an existing Replication Plan ID.

Parameters:

  • request [IN] - Replication Plan Monitor Get Statistics request in JSON format. For example:

{

"id": 1, // required

"beginTime": "2015-11-05T10:00:00", // optional, if it is not passed,

finds since the first stat record

"endTime": "2015-11-05T11:00:00", // optional, if it is not passed,

uses the current time

"detail": false, // optional, if true, return details for

all the threads. Default is true

"statID": 1932, // optional, retrieve details for a given statistic

ID returned for the Parallel Replication

"paging": true, // optional, see Note 1

"limit": 100, // optional, see Note 1

"start": 200 // optional, see Note 1

}

  • result [OUT] - Result in JSON format. For example, without parallel replication support:

{

"replPlanMonitorStatList": [

{

"statID": 1021,

"direction": "direct",

"time": "2015-11-05T10:00:00",

"targetDBEngine": true,

"sourceDBEngine": true,

"logNumber": 1,

"logPosition": 2342426,

"state": "Master",

"sequenceNumber": 4,

"functionName": "DELREC",

"transactionSuccessCounts":{

"commit":1010,

"add":1008,

"delete":1,

"update":1

},

"transactionFailCounts":{

"commit":0,

"add":0,

"delete":0,

"update":0

},

"latency": 2

},

...

]

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"total": 4 // total number of Replication Plan Snapshots for the query

- see Note 1 - Paging Parameters

}

An example with parallel replication:

{

"replPlanMonitorStatList": [

{

"statID": 1021,

"direction": "direct",

"time": "2015-11-05T10:00:00",

"targetDBEngine": true,

"sourceDBEngine": true,

"main": {

"sourceDbName": "FAIRCOMS",

"targetDbName": "REPLICA"

},

"logShip": {

"sourceTaskID": -1,

"logNumber": 1,

"logPosition": 2342426,

"state": "self",

"sequenceNumber": 4,

"error": 0,

"functionName": "ADDREC"

},

"logRead": {

"sourceTaskID": 23,

"targetTaskID": -1,

"logNumber": 1,

"logPosition": 2342426,

"state": "self",

"sequenceNumber": 4,

"error": 0,

"functionName": "ADDREC"

},

"analyzer": [

{

"number": 1,

"state": "self",

"sequenceNumber": 4,

"error": 0,

"functionName": "ADDREC"

},

{

"number": 2,

"state": "self",

"sequenceNumber": 4,

"error": 0,

"functionName": "ADDREC"

}

],

"dependency": {

"state": "self",

"sequenceNumber": 4,

"error": 0,

"functionName": "ADDREC"

},

"apply": [

{

"number": 1,

"targetTaskID": 33,

"logNumber": 1,

"logPosition": 2342426,

"state": "self",

"files": 5,

"sequenceNumber": 4,

"error": 0,

"functionName": "ADDREC",

"transactionSuccessCounts":{

"commit":1010,

"add":1008,

"delete":1,

"update":1

},

"transactionFailCounts":{

"commit":0,

"add":0,

"delete":0,

"update":0

}

},

{

"number": 2,

"targetTaskID": 34,

"logNumber": 1,

"logPosition": 2342427,

"state": "self",

"files": 2,

"sequenceNumber": 5,

"error": 0,

"functionName": "ADDREC",

"transactionSuccessCounts":{

"commit":1010,

"add":1008,

"delete":1,

"update":1

},

"transactionFailCounts":{

"commit":0,

"add":0,

"delete":0,

"update":0

}

}

],

"transactionProcessCounts": {

"waitingOnAnalyze": 0,

"waitingOnDependencyEval": 0,

"waitingOnDependencyResolution": 0,

"waitingOnApply": 0,

"total": 0

},

"transactionSuccessCounts":{

"commit":1010,

"add":1008,

"delete":1,

"update":1

},

"transactionFailCounts":{

"commit":0,

"add":0,

"delete":0,

"update":0

},

"latency": 3

},

...

]

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

},

"total": 4 // total number of Replication Plan Snapshots

for the query - see Note 1 - Paging Parameters

}

Return:

Error code

TOCIndex