public class FpgaResourceAllocator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FpgaResourceAllocator.FpgaAllocation |
static class |
FpgaResourceAllocator.FpgaDevice |
| Constructor and Description |
|---|
FpgaResourceAllocator(Context ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFpga(String type,
List<FpgaResourceAllocator.FpgaDevice> list) |
FpgaResourceAllocator.FpgaAllocation |
assignFpga(String type,
long count,
Container container,
String IPIDPreference)
Assign
FpgaResourceAllocator.FpgaAllocation with preferred IPID, if no, with random FPGAs |
void |
cleanupAssignFpgas(String requestor) |
List<FpgaResourceAllocator.FpgaDevice> |
getAllowedFpga() |
HashMap<String,List<FpgaResourceAllocator.FpgaDevice>> |
getAvailableFpga() |
int |
getAvailableFpgaCount() |
HashMap<String,List<FpgaResourceAllocator.FpgaDevice>> |
getUsedFpga() |
int |
getUsedFpgaCount() |
void |
recoverAssignedFpgas(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
void |
updateFpga(String requestor,
FpgaResourceAllocator.FpgaDevice device,
String newIPID) |
public FpgaResourceAllocator(Context ctx)
public HashMap<String,List<FpgaResourceAllocator.FpgaDevice>> getAvailableFpga()
public List<FpgaResourceAllocator.FpgaDevice> getAllowedFpga()
public int getAvailableFpgaCount()
public HashMap<String,List<FpgaResourceAllocator.FpgaDevice>> getUsedFpga()
public int getUsedFpgaCount()
public void addFpga(String type, List<FpgaResourceAllocator.FpgaDevice> list)
public void updateFpga(String requestor, FpgaResourceAllocator.FpgaDevice device, String newIPID)
public FpgaResourceAllocator.FpgaAllocation assignFpga(String type, long count, Container container, String IPIDPreference) throws ResourceHandlerException
FpgaResourceAllocator.FpgaAllocation with preferred IPID, if no, with random FPGAstype - vendor plugin supported FPGA device typecount - requested FPGA slot countcontainer - container idIPIDPreference - allocate slot with this IPID firstFpgaResourceAllocator.FpgaDeviceResourceHandlerException - When failed to allocate or write state storepublic void recoverAssignedFpgas(org.apache.hadoop.yarn.api.records.ContainerId containerId)
throws ResourceHandlerException
ResourceHandlerExceptionpublic void cleanupAssignFpgas(String requestor)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.