07-28-2014 04:20 PM
My environment script has never been sourced or run even though my parcel is at “actived” status for each host. The parcel files were indeed distributed into each host.
I also tried restart the cluster, it was not working. Then I tried to manually source the script in a host, it could work, so the script itself has no problem.
I am wondering if any procedure was missed? Or any naming rule for the script? How can i tell if my parcel's shell script has been sourced by CM?
07-30-2014 08:51 AM
The environment script is sourced as part of starting processes - it's not a global thing that happens when you activate the parcel. So, assuming you start a process after activating the parcel, and assuming your parcel's 'provides' tags match what the process' service is looking for, it should get sourced.
07-30-2014 10:03 AM
07-30-2014 10:07 AM
When you start a role, you are starting a process.
Let's use a concrete example.
* The lzo parcel contains the lzo plugin that's used by essentially all services in CDH.
* You download and activate the lzo parcel. At this point, nothing changes - you need ot restart everything to pick up the new parcel
* So you restart Hive (for example)
* When the hive server process starts, the Agent will source the lzo parcel's env script which appends the lzo jar to the classpath.
* Now the hive server is running with lzo support
The lzo parcel provides 'cdh-plugin' so this parcel will be loaded for all CDH processes. If a parcel provides 'hdfs-plugin' then it would only be loaded for HDFS, etc.
07-30-2014 02:18 PM
07-30-2014 02:37 PM
Where are you trying to echo variables? You won't see them set except from inside your environment script (which is sourced, so echo won't do anything). To see if your parcel's script is being sourced, look at the stderr.log for the process you think should be loading your parcel.
07-30-2014 04:58 PM
I checked this folder before, there is no "process" folder. i am using cm v5.
[root@lcigh158 cloudera-scm-agent]# pwd
[root@lcigh158 cloudera-scm-agent]# ls
cloudera-scm-agent.log cmf_listener.log supervisord.out