Package org.apache.spark.resource
Class ResourceInformation
Object
org.apache.spark.resource.ResourceInformation
- All Implemented Interfaces:
Serializable
Class to hold information about a type of Resource. A resource could be a GPU, FPGA, etc.
The array of addresses are resource specific and its up to the user to interpret the address.
One example is GPUs, where the addresses would be the indices of the GPUs
param: name the name of the resource param: addresses an array of strings describing the addresses of the resource
- Since:
- 3.0.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
boolean
int
hashCode()
name()
static ResourceInformation
Parses a JSON string into aResourceInformation
instance.static ResourceInformation
parseJson
(org.json4s.JValue json) final org.json4s.JValue
toJson()
toString()
-
Constructor Details
-
ResourceInformation
-
-
Method Details
-
parseJson
Parses a JSON string into aResourceInformation
instance.- Parameters:
json
- (undocumented)- Returns:
- (undocumented)
-
parseJson
-
name
-
addresses
-
toString
-
equals
-
hashCode
public int hashCode() -
toJson
public final org.json4s.JValue toJson()
-