Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to use “alternatives” key when creating Cloudera parcels

Highlighted

Unable to use “alternatives” key when creating Cloudera parcels

New Contributor

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.