Exemple #1
0
 def executorResources(self) -> Dict[str, ExecutorResourceRequest]:
     if self._java_resource_profile is not None:
         execRes = self._java_resource_profile.executorResourcesJMap()
         result = {}
         for k, v in execRes.items():
             result[k] = ExecutorResourceRequest(
                 v.resourceName(), v.amount(), v.discoveryScript(), v.vendor()
             )
         return result
     else:
         return self._executor_resource_requests
Exemple #2
0
 def executorResources(self) -> Dict[str, ExecutorResourceRequest]:
     """
     Returns
     -------
     dict
         a dictionary of resources to :class:`ExecutorResourceRequest`
     """
     if self._java_resource_profile_builder is not None:
         result = {}
         execRes = self._java_resource_profile_builder.executorResourcesJMap(
         )
         for k, v in execRes.items():
             result[k] = ExecutorResourceRequest(v.resourceName(),
                                                 v.amount(),
                                                 v.discoveryScript(),
                                                 v.vendor())
         return result
     else:
         return self._executor_resource_requests