public class ResourceUtils
extends Object
Constructor and Description |
---|
ResourceUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
AMOUNT() |
static String |
DISCOVERY_SCRIPT() |
static String |
FPGA() |
static scala.collection.immutable.Map<String,ResourceInformation> |
getOrDiscoverAllResources(SparkConf sparkConf,
String componentName,
scala.Option<String> resourcesFileOpt)
Gets all allocated resource information for the input component from input resources file and
discover the remaining via discovery scripts.
|
static String |
GPU() |
static void |
initializeForcefully(boolean isInterpreter,
boolean silent) |
static scala.collection.Seq<org.apache.spark.resource.ResourceID> |
listResourceIds(SparkConf sparkConf,
String componentName) |
static void |
logResourceInfo(String componentName,
scala.collection.immutable.Map<String,ResourceInformation> resources) |
static void |
org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) |
static org.slf4j.Logger |
org$apache$spark$internal$Logging$$log_() |
static scala.collection.Seq<org.apache.spark.resource.ResourceAllocation> |
parseAllocatedFromJsonFile(String resourcesFile) |
static scala.collection.Seq<org.apache.spark.resource.ResourceRequest> |
parseAllResourceRequests(SparkConf sparkConf,
String componentName) |
static org.apache.spark.resource.ResourceRequest |
parseResourceRequest(SparkConf sparkConf,
org.apache.spark.resource.ResourceID resourceId) |
static scala.collection.Seq<org.apache.spark.resource.ResourceRequirement> |
parseResourceRequirements(SparkConf sparkConf,
String componentName) |
static String |
RESOURCE_DOT() |
static String |
RESOURCE_PREFIX() |
static boolean |
resourcesMeetRequirements(scala.collection.immutable.Map<String,Object> resourcesFree,
scala.collection.Seq<org.apache.spark.resource.ResourceRequirement> resourceRequirements) |
static String |
VENDOR() |
static <T> scala.collection.Seq<T> |
withResourcesJson(String resourcesFile,
scala.Function1<String,scala.collection.Seq<T>> extract) |
public static String DISCOVERY_SCRIPT()
public static String VENDOR()
public static String AMOUNT()
public static org.apache.spark.resource.ResourceRequest parseResourceRequest(SparkConf sparkConf, org.apache.spark.resource.ResourceID resourceId)
public static scala.collection.Seq<org.apache.spark.resource.ResourceID> listResourceIds(SparkConf sparkConf, String componentName)
public static scala.collection.Seq<org.apache.spark.resource.ResourceRequest> parseAllResourceRequests(SparkConf sparkConf, String componentName)
public static scala.collection.Seq<org.apache.spark.resource.ResourceRequirement> parseResourceRequirements(SparkConf sparkConf, String componentName)
public static boolean resourcesMeetRequirements(scala.collection.immutable.Map<String,Object> resourcesFree, scala.collection.Seq<org.apache.spark.resource.ResourceRequirement> resourceRequirements)
public static <T> scala.collection.Seq<T> withResourcesJson(String resourcesFile, scala.Function1<String,scala.collection.Seq<T>> extract)
public static scala.collection.Seq<org.apache.spark.resource.ResourceAllocation> parseAllocatedFromJsonFile(String resourcesFile)
public static scala.collection.immutable.Map<String,ResourceInformation> getOrDiscoverAllResources(SparkConf sparkConf, String componentName, scala.Option<String> resourcesFileOpt)
sparkConf
- (undocumented)componentName
- (undocumented)resourcesFileOpt
- (undocumented)public static void logResourceInfo(String componentName, scala.collection.immutable.Map<String,ResourceInformation> resources)
public static final String GPU()
public static final String FPGA()
public static final String RESOURCE_PREFIX()
public static final String RESOURCE_DOT()
public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)
public static void initializeForcefully(boolean isInterpreter, boolean silent)