-
Notifications
You must be signed in to change notification settings - Fork 132
The parcel.json file
The primary metadata file for a parcel is parcel.json. While all the other files are optional, this one must exist for a parcel to be a parcel.
The following example is a simplified version of the CDH parcel.json. It truncates the long component/package/user lists, but illustrates all of the different parts of the file.
{
"name": "CDH",
"version": "5.0.0",
"setActiveSymlink": true,
"depends": "",
"replaces": "IMPALA, SOLR, SPARK",
"conflicts": "",
"provides": [
"cdh",
"impala",
"solr",
"spark"
],
"scripts": {
"defines": "cdh_env.sh"
},
"packages": [
{ "name" : "hadoop",
"version": "2.2.0+cdh5.0.0+609-0.cdh5b2.p0.386~precise-cdh5.0.0"
},
{ "name" : "hadoop-client",
"version": "2.2.0+cdh5.0.0+609-0.cdh5b2.p0.386~precise-cdh5.0.0"
},
{ "name" : "hadoop-hdfs",
"version": "2.2.0+cdh5.0.0+609-0.cdh5b2.p0.386~precise-cdh5.0.0"
}
],
"components": [
{ "name" : "hadoop",
"version" : "2.2.0-cdh5.0.0-SNAPSHOT",
"pkg_version": "2.2.0+cdh5.0.0+609"
},
{ "name" : "hadoop-hdfs",
"version" : "2.2.0-cdh5.0.0-SNAPSHOT",
"pkg_version": "2.2.0+cdh5.0.0+609"
}
],
"users": {
"hdfs": {
"longname" : "Hadoop HDFS",
"home" : "/var/lib/hadoop-hdfs",
"shell" : "/bin/bash",
"extra_groups": [ "hadoop" ]
},
"impala": {
"longname" : "Impala",
"home" : "/var/run/impala",
"shell" : "/bin/bash",
"extra_groups": [ "hive", "hdfs" ]
}
},
"groups": [
"hadoop"
]
}- name: The name of the parcel.
- version: The version of the parcel.
The name and version fields are the fundamental fields that identify a parcel; only one parcel may provide a given (name, version) combination, and for any given name, Cloudera Manager will only consider one version to be active at a time, for a particular cluster.
Parcel directories must be named 'name-version' to match these two fields. Cloudera Manager will flag any parcel where this is not true as invalid.
Compressed parcel files must similarly be named 'name-version-distro_suffix.parcel' to be considered valid. See [here](Parcel Distro Suffixes) for details on distro suffixes.