Reply
New Contributor
Posts: 3
Registered: ‎01-23-2017

Unable to use “alternatives” key when creating Cloudera parcels

I tried to use the "alternatives" key in my parcels.json. However, Cloudera's parcel validiator kicked it out with:

==> Unrecognized field "scripts.alternatives". Recognized fields are "[defines, _defines]"

 

My parcels.json file is:

 

{
  "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":[]
}

The json validates fine without the "alternatives" key.

The schema for parcels.json is described in One Engineer’s Experience with Parcel.

And the validates.json contents are described in The alternatives.json file

 

As proof-of-concept, I am using the Cloudera Quickstart VM, running on Centos and CDH 5.8.

 

 

Announcements