溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

怎么控制批處理服務(wù)器

發(fā)布時間:2021-11-23 17:45:21 來源:億速云 閱讀:185 作者:小新 欄目:大數(shù)據(jù)

這篇文章主要介紹怎么控制批處理服務(wù)器,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!

介紹

批處理服務(wù)器現(xiàn)在由Syracuse平臺管理。這意味著您可以使用HTTP或https模式以及一組控制它的URL來訪問服務(wù)。任何工具都可以使用不同的語法。

您可以通過多種方式執(zhí)行此操作:

1.列出批處理服務(wù)器,然后調(diào)用API進(jìn)行訪問

2.通過其代碼直接訪問批處理服務(wù)器

3.使用批處理服務(wù)器調(diào)度程序

1.列出批處理服務(wù)器,然后調(diào)用API來訪問它們

獲取批處理服務(wù)器列表(如果有多個)。

myservport作為服務(wù)器主機(jī)名或地址以及Syracuse Web服務(wù)器使用的TCP端口,URL將為:

http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers?representation=batchServer.$query

在上面的URL中,可以從http客戶端使用/ api1 /段,該客戶端傳輸身份驗(yàn)證(例如curl或postman)。它將會話作為Web服務(wù)進(jìn)行管理。通過Web客戶端進(jìn)行身份驗(yàn)證時,可以將/ api1 /替換為/ sdata /。

請求的結(jié)果類似于此提要。在這種情況下,該$resource數(shù)組包含該$key值標(biāo)識的批處理服務(wù)器列表。的status也被進(jìn)料中所示。

怎么控制批處理服務(wù)器

{

    "$url": "http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers?representation=batchServer.%24query",

    "$descriptor": "batchServers",

    "$startIndex": 1,

    "$itemsPerPage": 20,

    "$totalResults": 1,

    "$ui": "http://192.168.3.141:8124/syracuse-main/html/main.html#ui=http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers/$ui/master&data=http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers",

    "$resources": [

        {

            "$uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705",

            "$key": "39bf6186-37dd-49ca-ac20-c9a5af8fe705",

            "$etag": 1,

            "$creUser": "admin",

            "$creDate": "2019-12-22T07:24:39.619Z",

            "$updUser": "admin",

            "$updDate": "2020-08-07T00:36:50.404Z",

            "$properties": {

                "maxDelay": {

                    "$isDisabled": false

                },

                "killOverTime": {

                    "$isDisabled": false

                },

                "execInterval": {

                    "$isDisabled": false

                }

            },

            "$url": "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')?representation=batchServer.$details",

            "$shortUrl": "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')",

            "status": "stopped",

            "maxDelay": 0,

            "killOverTime": 30,

            "execInterval": 30,

            "auto": true,

            "code": "ERP",

            "runtimes": [

                {

                    "$uuid": "e8666836-85e7-4e63-8f54-6a8a985c10b8",

                    "$key": "e8666836-85e7-4e63-8f54-6a8a985c10b8",

                    "$etag": 1,

                    "$creUser": "admin",

                    "$updUser": "admin",

                    "$updDate": "2019-12-22T12:19:45.034Z",

                    "$properties": {},

                    "$parent_uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705",

                    "maxQueries": 5,

                    "serverPort": 20100,

                    "serverHost": "syracuseb",

                    "description": "syracuseb:20100",

                    "$links": {},

                    "$value": "syracuseb:20100"

                }

            ],

            "localePref": {

                "$uuid": "ab378c10-6915-4cfe-8f1e-44b59824bebd",

                "$key": "ab378c10-6915-4cfe-8f1e-44b59824bebd",

                "description": "English (United States)"

            },

            "role": {

                "$uuid": "58dd4404-e0cc-400c-856a-6824f09f1447",

                "$key": "58dd4404-e0cc-400c-856a-6824f09f1447",

                "description": "Super administrator"

            },

            "user": {

                "$uuid": "535cf2da-9472-45f8-b505-068138598317",

                "$key": "535cf2da-9472-45f8-b505-068138598317",

                "login": "admin",

                "firstName": "",

                "lastName": "系統(tǒng)管理員"

            },

            "refEndpoint": {

                "$uuid": "55fac56e-9f7e-454e-90bc-e5143ccdee5d",

                "$key": "55fac56e-9f7e-454e-90bc-e5143ccdee5d",

                "description": "X3 / X3",

                "nature": null

            },

            "x3solution": {

                "$uuid": "5125619c-c8e6-40d9-b139-a95e29b943b2",

                "$key": "5125619c-c8e6-40d9-b139-a95e29b943b2",

                "solutionName": "X3"

            },

            "$links": {

                "x3traces": {

                    "$title": "X3 server traces",

                    "$url": "/sdata/x3/erp/X3_X3/$service/upload?fileName=[SRV]/TRA/serveur.tra&type=1&$format=txt",

                    "$method": "GET",

                    "$isDisabled": false,

                    "$description": null

                },

                "start": {

                    "$isDisabled": false

                },

                "stop": {

                    "$isDisabled": true

                },

                "stopAll": {

                    "$isDisabled": true

                },

                "queries": {

                    "$isDisabled": false

                }

            },

            "$value": "ERP",

            "refUrl": "/sdata/x3/erp/X3_X3"

        }

    ],

    "$links": {},

    "$template": {

        "$url": "http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers/$template"

    },

    "$prototype": "{$baseUrl}/$prototypes('batchServer.$query')"

}

使用POST

$key到一批服務(wù)器識別相關(guān)的實(shí)例。它將替換以下URL中的單詞KEY。

啟動由KEY標(biāo)識的批處理服務(wù)器

http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers('KEY')/$service/start?representation=batchServer.$query

停止由KEY標(biāo)識的批處理服務(wù)器

http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers('KEY')/$service/stop?representation=batchServer.$query

停止由KEY及其所有正在運(yùn)行的任務(wù)標(biāo)識的批處理服務(wù)器

http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers('KEY')/$service/stopAll?representation=batchServer.$query

注:這里的KEY 就是上面查詢到的KEY值

舉例

啟動batchServer, 界面手工怎么也起不來

http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')/$service/start?representation=batchServer.$query

怎么控制批處理服務(wù)器

    "$uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705",

    "$key": "39bf6186-37dd-49ca-ac20-c9a5af8fe705",

    "$etag": 1,

    "$creUser": "admin",

    "$creDate": "2019-12-22T07:24:39.619Z",

    "$updUser": "admin",

    "$updDate": "2020-08-09T08:13:53.855Z",

    "$properties": {

        "status": {

            "$diagnoses": []

        },

        "maxDelay": {

            "$isDisabled": true

        },

        "killOverTime": {

            "$isDisabled": true

        },

        "execInterval": {

"$isDisabled": true

        }

    },

    "$url": "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')?representation=batchServer.$details",

    "$shortUrl": "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')",

    "$diagnoses": [

        {

            "$datetime": "2020-08-09T08:35:43.914Z",

            "$severity": "info",

            "$message": "新客戶端已創(chuàng)建于syracuseb:20100的2296上"

        },

        {

            "$datetime": "2020-08-09T08:35:43.914Z",

            "$severity": "info",

            "$message": "已將runtime 'syracuseb:20100'加入至批處理控制器的服務(wù)器列表,且該runtime將同時處理5條請求。"

        },

        {

            "$severity": "info",

            "$message": "服務(wù)器批次為starting"

        }

    ],

    "status": "starting",

    "maxDelay": 0,

    "killOverTime": 30,

    "execInterval": 30,

    "auto": true,

    "code": "ERP",

    "runtimes": [

        {

            "$uuid": "e8666836-85e7-4e63-8f54-6a8a985c10b8",

            "$key": "e8666836-85e7-4e63-8f54-6a8a985c10b8",

            "$etag": 1,

            "$creUser": "admin",

            "$updUser": "admin",

            "$updDate": "2019-12-22T12:19:45.034Z",

            "$properties": {},

            "$parent_uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705",

            "maxQueries": 5,

            "serverPort": 20100,

            "serverHost": "syracuseb",

            "description": "syracuseb:20100",

            "$links": {},

            "$value": "syracuseb:20100"

        }

    ],

    "localePref": {

        "$uuid": "ab378c10-6915-4cfe-8f1e-44b59824bebd",

        "$key": "ab378c10-6915-4cfe-8f1e-44b59824bebd",

        "description": "English (United States)"

    },

    "role": {

        "$uuid": "58dd4404-e0cc-400c-856a-6824f09f1447",

        "$key": "58dd4404-e0cc-400c-856a-6824f09f1447",

        "description": "Super administrator"

    },

    "user": {

        "$uuid": "535cf2da-9472-45f8-b505-068138598317",

        "$key": "535cf2da-9472-45f8-b505-068138598317",

        "login": "admin",

        "firstName": "",

        "lastName": "系統(tǒng)管理員"

    },

    "refEndpoint": {

        "$uuid": "55fac56e-9f7e-454e-90bc-e5143ccdee5d",

        "$key": "55fac56e-9f7e-454e-90bc-e5143ccdee5d",

        "description": "X3 / X3",

        "nature": null

    },

    "x3solution": {

        "$uuid": "5125619c-c8e6-40d9-b139-a95e29b943b2",

        "$key": "5125619c-c8e6-40d9-b139-a95e29b943b2",

        "solutionName": "X3"

    },

    "$links": {

        "x3traces": {

            "$title": "X3 server traces",

            "$url": "/sdata/x3/erp/X3_X3/$service/upload?fileName=[SRV]/TRA/serveur.tra&type=1&$format=txt",

            "$method": "GET",

            "$isDisabled": false,

            "$description": null

        },

        "start": {

            "$isDisabled": true

        },

        "stop": {

            "$isDisabled": false

        },

        "stopAll": {

            "$isDisabled": false

        },

        "queries": {

            "$isDisabled": false

        }

    },

    "$value": "ERP",

查看狀態(tài), 啟動成功

怎么控制批處理服務(wù)器

停止

http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')/$service/stop?representation=batchServer.$query

怎么控制批處理服務(wù)器

查看狀態(tài)

怎么控制批處理服務(wù)器

停止所有

http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')/$service/stopAll?representation=batchServer.$query

怎么控制批處理服務(wù)器

以上是“怎么控制批處理服務(wù)器”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI