public class FpgaResourceAllocator extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FpgaResourceAllocator.FpgaAllocation |
Constructor and Description |
---|
FpgaResourceAllocator(Context ctx) |
Modifier and Type | Method and Description |
---|---|
void |
addFpgaDevices(String type,
List<FpgaDevice> list) |
FpgaResourceAllocator.FpgaAllocation |
assignFpga(String type,
long count,
Container container,
String ipidHash)
Assign
FpgaResourceAllocator.FpgaAllocation with preferred IPID, if no, with random FPGAs |
void |
cleanupAssignFpgas(String requestor) |
void |
recoverAssignedFpgas(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
void |
updateFpga(String requestor,
FpgaDevice device,
String newIPID,
String newHash) |
public FpgaResourceAllocator(Context ctx)
public void addFpgaDevices(String type, List<FpgaDevice> list)
public void updateFpga(String requestor, FpgaDevice device, String newIPID, String newHash)
public FpgaResourceAllocator.FpgaAllocation assignFpga(String type, long count, Container container, String ipidHash) throws ResourceHandlerException
FpgaResourceAllocator.FpgaAllocation
with preferred IPID, if no, with random FPGAstype
- vendor plugin supported FPGA device typecount
- requested FPGA slot countcontainer
- container idipidHash
- hash of the localized aocx fileFpgaDevice
ResourceHandlerException
- When failed to allocate or write state storepublic void recoverAssignedFpgas(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException
ResourceHandlerException
public void cleanupAssignFpgas(String requestor)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.