My approach to this would be to have a script which knows what are the current task trackers online and connected currently to the JobTracker, should be issued an RPC command, to get restarted. That ways, I can restart all my tasktrackers in my cluster restarted from a single host/place(i.e.,. where the jobtracker is running upon).
Here is the thing, I would propose:
have another script named 'mapred-cluster.sh' with the following options.
mapred-cluster.sh [jobtracker|tasktracker] [options]
jobtracker start|stop|restart # this would restart only the jobtracker component of the cluster
tasktracker [-h comma seperated hostnames|ipaddress|all] start|stop|restart # this should based on the argument value provided by -h option, should initiate the action as noted by start|stop|restart. If -h option is not provided, assume it is the localhost. If 'all' is provided as an argument value to the option -h, then it should initiate a (batch?) restart of all the tasktrackers connected to the jobtracker.
Let me know how does it sound to guys. Anyone willing to code a patch/hookup a jar for this?