def get(self): values={} curstatus = status() admindata = AdminData() values['status']=admindata.get() values['datastoremapcount'] = curstatus.datstoremapcount() values['currentmapcount'] = curstatus.currentmapcount() values['resultcount'] = curstatus.resultcount() #values['status'] = curstatus.whatsgoinon() values['lastresult'] = curstatus.resultobject() path = os.path.join(os.path.dirname(__file__), 'templates/mapview.html') self.response.out.write(template.render(path, values))
def get(self): rm = reducemanager(); reducelist = rm.getreduceitems(10); if not reducelist: admin = AdminData() admin.changeStatus('Complete') return "" tosend="" for i in range(0,len(reducelist)-2): result = reducelist[i] tosend= tosend + '"'+ result.data +'",' tosend= tosend +'"'+str(reducelist[len(reducelist)-1].data)+'"' self.response.out.write(tosend)
def get(self): clientCookie = self.request.cookies.get('BigKahuna', '') maploader = Maploader("blogs") map = maploader.getmap() #add to maptokenmapping mtmanager = maptokenmanager() #mtmanager.putMapToken(map,clientCookie) workflow_type = self.getWorkflowType() if not map: admin = AdminData() if workflow_type=="gears": admin.changeStatus("gearsmapreduce") else: admin.changeStatus("reduce") else: self.response.out.write("{ \"data\": \"" + map.text +"\", \"id\":" + str(map.uniqueid) + "}")
def whatsgoinon(self): admindata = AdminData() return admindata.getStatus()
def getCurrentStatus(self): admin_data = AdminData() return admin_data.get()