@Override
  public List<PrivilegedOperation> bootstrap(Configuration configuration)
      throws ResourceHandlerException {
    // The plugin should be initilized by FpgaDiscoverer already
    if (!vendorPlugin.initPlugin(configuration)) {
      throw new ResourceHandlerException("FPGA plugin initialization failed");
    }
    LOG.info("FPGA Plugin bootstrap success.");
    // Get avialable devices minor numbers from toolchain or static configuration
    List<FpgaDevice> fpgaDeviceList = fpgaDiscoverer.discover();
    allocator.addFpgaDevices(vendorPlugin.getFpgaType(), fpgaDeviceList);
    this.cGroupsHandler.initializeCGroupController(
        CGroupsHandler.CGroupController.DEVICES);
    return null;
  }
@Test
  public void testBootStrapWithEmptyUserConfiguration()
      throws ResourceHandlerException {
    // User configuration contains invalid minor device number
    String allowed = "";
    boolean invalidConfiguration = false;
    configuration.set(YarnConfiguration.NM_FPGA_ALLOWED_DEVICES, allowed);
    try {
      fpgaResourceHandler.bootstrap(configuration);
    } catch (ResourceHandlerException e) {
      invalidConfiguration = true;
    }
    Assert.assertTrue(invalidConfiguration);
  }