Author: croberts
Date: 2013-02-12 15:46:46 +0000 (Tue, 12 Feb 2013)
New Revision: 5687
Modified:
branches/elephant/cumin/python/cumin/gridhadoop/datanode.py
branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py
branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py
branches/elephant/cumin/python/cumin/gridhadoop/main.py
branches/elephant/cumin/python/cumin/gridhadoop/namenode.py
branches/elephant/cumin/python/cumin/gridhadoop/scheduler.py
branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py
Log:
Additional fixes for user vs admin and frame linking. Also cleaning up comments that were
no longer useful.
Modified: branches/elephant/cumin/python/cumin/gridhadoop/datanode.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2013-02-12 15:46:17 UTC
(rev 5686)
+++ branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2013-02-12 15:46:46 UTC
(rev 5687)
@@ -144,7 +144,6 @@
if obj:
self.form.id.set(form_session, obj._id)
- ## TODO find a better way to do this
self.form.hadoophost.set(form_session,
self.module.frame.children_by_name[self.module.frame.name +
".ghschedframe"].host.get(session))
self.form.nn_id.set(form_session,
self.module.frame.children_by_name[self.module.frame.name + ".ghschedframe"]\
.children_by_name[self.module.frame.name +
".ghschedframe.namenodeframe"].id.get(session))
Modified: branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2013-02-12 15:46:17 UTC (rev
5686)
+++ branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2013-02-12 15:46:46 UTC (rev
5687)
@@ -61,7 +61,7 @@
def get_owner_filter(self, session):
if self.check_owner:
- owner_list = ["condor", session.get_user().name] #condor is a
temporary hack
+ owner_list = [session.get_user().name]
else:
owner_list = None
return owner_list
Modified: branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2013-02-12 15:46:17 UTC
(rev 5686)
+++ branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2013-02-12 15:46:46 UTC
(rev 5687)
@@ -142,7 +142,6 @@
if obj:
self.form.id.set(form_session, obj._id)
- ## TODO find a better way to do this
self.form.hadoophost.set(form_session,
self.app.gridhadoop.frame.children_by_name["gridhadoop.ghschedframe"].host.get(session))
self.form.return_url.set(form_session, session.marshal())
self.form.show(form_session)
Modified: branches/elephant/cumin/python/cumin/gridhadoop/main.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/main.py 2013-02-12 15:46:17 UTC (rev
5686)
+++ branches/elephant/cumin/python/cumin/gridhadoop/main.py 2013-02-12 15:46:46 UTC (rev
5687)
@@ -43,12 +43,6 @@
self.scheduler_frame = HadoopSchedulerFrame(app, name +
".ghschedframe", check_owner, self.module)
self.add_mode(self.scheduler_frame)
-
-# self.name_node_frame = NameNodeFrame(app, name + ".namenodeframe")
-# self.add_mode(self.name_node_frame)
-#
-# self.job_tracker_frame = JobTrackerFrame(app, name +
".jobtrackerframe")
-# self.add_mode(self.job_tracker_frame)
def render_title(self, session):
return "Grid-hadoop"
@@ -57,12 +51,7 @@
def __init__(self, app, name, check_owner):
super(GridHadoopView, self).__init__(app, name)
-# heading = self.Heading(app, "heading")
-# self.add_child(heading)
-
self.tabs = TabbedModeSet(app, "childtabs")
self.add_child(self.tabs)
- #self.tabs.add_tab(NameNodeSelector(app, name + ".namenodes",
check_owner))
- #self.tabs.add_tab(JobTrackerSelector(app, name + ".jobtrackers",
check_owner))
self.tabs.add_tab(HadoopSchedulerSelector(app, name + ".hscheds"))
Modified: branches/elephant/cumin/python/cumin/gridhadoop/namenode.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2013-02-12 15:46:17 UTC
(rev 5686)
+++ branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2013-02-12 15:46:46 UTC
(rev 5687)
@@ -49,7 +49,6 @@
def __init__(self, app, name, cls):
super(NameNodeTable, self).__init__(app, name, cls)
- #probably doesnt' work for user/grid-hadoop path
self.id_col = self.NameNodeColumn(app, "idcol", cls.Id, cls.Id,
".namenodeframe")
self.ipc_col = ObjectTableColumn(app, "ipc", cls.Ipc)
self.ipc_col.width = "20%"
Modified: branches/elephant/cumin/python/cumin/gridhadoop/scheduler.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/scheduler.py 2013-02-12 15:46:17 UTC
(rev 5686)
+++ branches/elephant/cumin/python/cumin/gridhadoop/scheduler.py 2013-02-12 15:46:46 UTC
(rev 5687)
@@ -63,9 +63,7 @@
class SchedNameColumn(ObjectLinkColumn):
def render_cell_href(self, session, record):
id = unescape_entity(record[self.id_field.index])
- #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(".", 7)[0]
+ self.frame_path]
+ frame = self.frame.children_by_name[self.frame.name + self.frame_path]
return frame.get_href(session, id, id)
Modified: branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2013-02-12 15:46:17 UTC
(rev 5686)
+++ branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2013-02-12 15:46:46 UTC
(rev 5687)
@@ -134,7 +134,6 @@
if obj:
self.form.id.set(form_session, obj._id)
- ## TODO find a better way to do this
self.form.hadoophost.set(form_session,
self.app.gridhadoop.frame.children_by_name["gridhadoop.ghschedframe"].host.get(session))
self.form.jt_id.set(form_session,
self.app.gridhadoop.frame.children_by_name["gridhadoop.ghschedframe"].children_by_name["gridhadoop.ghschedframe.jobtrackerframe"].id.get(session))
self.form.return_url.set(form_session, session.marshal())