Esempio n. 1
0
 def taskResources(self) -> Dict[str, TaskResourceRequest]:
     if self._java_resource_profile is not None:
         taskRes = self._java_resource_profile.taskResourcesJMap()
         result = {}
         for k, v in taskRes.items():
             result[k] = TaskResourceRequest(v.resourceName(), v.amount())
         return result
     else:
         return self._task_resource_requests
Esempio n. 2
0
 def taskResources(self) -> Dict[str, TaskResourceRequest]:
     """
     Returns
     -------
     dict
         a dictionary of resources to :class:`TaskResourceRequest`
     """
     if self._java_resource_profile_builder is not None:
         taskRes = self._java_resource_profile_builder.taskResourcesJMap()
         result = {}
         for k, v in taskRes.items():
             result[k] = TaskResourceRequest(v.resourceName(), v.amount())
         return result
     else:
         return self._task_resource_requests