我试着在我的parcels.json中使用"alternatives“键。然而,Cloudera的包裹验证器使用以下命令将其踢出:
==>无法识别的字段"scripts.alternatives“。可识别的字段是“定义,_defines”
我的parcel.json文件是:
{
"schema_version": 1,
"name": "Runtime",
"version": "2",
"setActiveSymlink": true,
"depends": "",
"replaces": "MATLAB_Runtime",
"conflicts": "",
"provides": [
"mine"
],
"scripts": {
"defines": "env.sh",
"alternatives": "alternatives.json"
},
"packages": [
{ "name" : "Runtime",
"version": "2"
}
],
"components": [
{ "name" : "mine",
"version" : "2",
"pkg_version": "2",
"pkg_release": "2"
}
],
"users":{},
"groups":[]
}json在没有"alternatives“密钥的情况下可以很好地进行验证。
One Engineer’s Experience with Parcel中描述了parcels.json的架构。
The alternatives.json file中描述了validates.json的内容
发布于 2017-12-20 22:28:00
相应的:https://github.com/cloudera/cm_ext/wiki/The-parcel.json-file
Cloudera脚本目前,只有一个脚本可以由
管理器指定和使用,尽管这种情况可能会在未来发生变化。定义:此脚本来源于受包裹影响的每个进程的环境(基于标记)。即使包裹不需要定义任何环境变量,也必须提供此脚本(脚本本身可以为空)。“定义”脚本完成真正的工作,使进程可以访问包裹的内容。这是一个实质性的话题,讨论了here。
在scripts块中只能有defines选项。因此(https://github.com/cloudera/cm_ext/wiki/The-alternatives.json-file)是可选的,并将由alternatives.json代理以静默方式使用。
使用带有-a选项的验证器(https://github.com/cloudera/cm_ext/tree/master/validator)来确保您的文件是正确的。
-a,--alternatives-json <FILE> The alternatives.json file to validate
https://stackoverflow.com/questions/41707305
复制相似问题