创建Cloudera地块时无法使用“替代”键

问题描述 投票:0回答:1

我尝试在parcels.json中使用“alternative”键。然而,Cloudera包裹验证员踢了它:

==>无法识别的字段“scripts.alternatives”。认可的字段是“[define,_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验证正常。

parzs.json的架构在One Engineer’s Experience with Parcel中描述。

而在The alternatives.json file中描述了validates.json的内容

cloudera cloudera-manager
1个回答
2
投票

因此:https://github.com/cloudera/cm_ext/wiki/The-parcel.json-file

脚本目前,Cloudera Manager只能指定和使用一个脚本,尽管将来可能会发生变化。定义:此脚本源自包裹影响的每个进程的环境(基于标记)。即使parcel不需要定义任何环境变量,也必须提供此脚本(脚本本身可以为空)。 “定义”脚本可以实现真正的工作,使进程可以访问包裹的内容。这是一个重要的主题,讨论[这里](包裹定义脚本)。

在qazxsw poi区块内只能有qazxsw poi选项。 qazxsw poi文件,因此(defines)是可选的,将由scm代理默默使用。

使用带有scripts选项的验证器(alternatives.json)来确保您的文件正确无误。

https://github.com/cloudera/cm_ext/wiki/The-alternatives.json-file

© www.soinside.com 2019 - 2024. All rights reserved.