Author: croberts Date: 2013-01-29 20:35:50 +0000 (Tue, 29 Jan 2013) New Revision: 5667
Modified: branches/elephant/cumin/python/cumin/gridhadoop/datanode.py branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py branches/elephant/cumin/python/cumin/gridhadoop/namenode.py branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py Log: No longer hard-coding the "hadoop-host" value. For now, we are just choosing the first one from the list. Long term, cumin will have a higher-level page where the hadoop-host (scheduler) is selected, followed by the rest of the UI as it pertains to grid-hadoop.
Modified: branches/elephant/cumin/python/cumin/gridhadoop/datanode.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2013-01-25 20:06:44 UTC (rev 5666) +++ branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2013-01-29 20:35:50 UTC (rev 5667) @@ -67,7 +67,8 @@ #need to make this work for user/grid-hadoop path too somehow # this is way less than ideal frame = self.page.page_widgets_by_path[self.path.rsplit(".", 11)[0] + self.frame_path] - return frame.get_href(session, id, "grid2.lab.bos.redhat.com") + hadoop_schedulers = self.app.remote.get_hosts("SCHEDULER", "HADOOP") + return frame.get_href(session, id, hadoop_schedulers[0])
class DataNodeDelete(ObjectSelectorTask): def __init__(self, app, selector, name):
Modified: branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2013-01-25 20:06:44 UTC (rev 5666) +++ branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2013-01-29 20:35:50 UTC (rev 5667) @@ -73,7 +73,8 @@ frame = self.page.page_widgets_by_path[self.path.rsplit(".", 7)[0] + self.frame_path]
#if isinstance(frame, TagObjectFrame): - return frame.get_href(session, id, "grid2.lab.bos.redhat.com") + hadoop_schedulers = self.app.remote.get_hosts("SCHEDULER", "HADOOP") + return frame.get_href(session, id, hadoop_schedulers[0])
class JobTrackerDelete(ObjectSelectorTask): def __init__(self, app, selector, name):
Modified: branches/elephant/cumin/python/cumin/gridhadoop/namenode.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2013-01-25 20:06:44 UTC (rev 5666) +++ branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2013-01-29 20:35:50 UTC (rev 5667) @@ -72,8 +72,8 @@ # this is way less than ideal frame = self.page.page_widgets_by_path[self.path.rsplit(".", 7)[0] + self.frame_path]
- return frame.get_href(session, id, "grid2.lab.bos.redhat.com") - + hadoop_schedulers = self.app.remote.get_hosts("SCHEDULER", "HADOOP") + return frame.get_href(session, id, hadoop_schedulers[0])
class NameNodeCreate(Task): def __init__(self, app, name):
Modified: branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py =================================================================== --- branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2013-01-25 20:06:44 UTC (rev 5666) +++ branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2013-01-29 20:35:50 UTC (rev 5667) @@ -67,7 +67,8 @@ #need to make this work for user/grid-hadoop path too somehow # this is way less than ideal frame = self.page.page_widgets_by_path[self.path.rsplit(".", 11)[0] + self.frame_path] - return frame.get_href(session, id, "grid2.lab.bos.redhat.com") + hadoop_schedulers = self.app.remote.get_hosts("SCHEDULER", "HADOOP") + return frame.get_href(session, id, hadoop_schedulers[0])
class TaskTrackerDelete(ObjectSelectorTask): def __init__(self, app, selector, name):