| | |
| | | */ |
| | | public void importLDIF() throws DatabaseException, IOException, JebException |
| | | { |
| | | String backendDirectory = config.getBackendDirectory(); |
| | | File backendDirectory = config.getBackendDirectory(); |
| | | |
| | | EnvironmentConfig envConfig = config.getEnvironmentConfig(); |
| | | envConfig.setConfigParam("je.env.runCheckpointer", "false"); |
| | |
| | | envConfig.setConfigParam("je.env.isLocking", "false"); |
| | | } |
| | | |
| | | File envHome = new File(backendDirectory); |
| | | env = new Environment(envHome, envConfig); |
| | | env = new Environment(backendDirectory, envConfig); |
| | | |
| | | if (!ldifImportConfig.appendToExistingData()) |
| | | { |
| | |
| | | // environment and re-open it. Only do this when we are |
| | | // importing to all the base DNs in the backend. |
| | | env.close(); |
| | | EnvManager.removeFiles(backendDirectory); |
| | | env = new Environment(envHome, envConfig); |
| | | EnvManager.removeFiles(backendDirectory.getPath()); |
| | | env = new Environment(backendDirectory, envConfig); |
| | | } |
| | | |
| | | // Divide the total buffer size by the number of threads |