def _fixup(self): """ Fixup fields: - expand actions - time fields are struct_time - run is integer - configuration dict - log - definition """ # TODO(bc) Can we get the log and definition lazily? if self.startTime: self.startTime = parse_timestamp(self.startTime) if self.endTime: self.endTime = parse_timestamp(self.endTime) if self.createdTime: self.createdTime = parse_timestamp(self.createdTime) if self.lastModTime: self.lastModTime = parse_timestamp(self.lastModTime) self.run = int(self.run) self.actions = [ Action(act_dict) for act_dict in self.actions ] if self.conf is not None: xml = StringIO(i18n.smart_str(self.conf)) self.conf_dict = hadoop.confparse.ConfParse(xml) else: self.conf_dict = { }
def _fixup(self): """ Fixup: - time fields as struct_time - config dict """ if self.startTime: self.startTime = parse_timestamp(self.startTime) if self.endTime: self.endTime = parse_timestamp(self.endTime) retries = int(self.retries) xml = StringIO(i18n.smart_str(self.conf)) self.conf_dict = hadoop.confparse.ConfParse(xml)