From 0d9383e9bdcfc20e808968f4b7fe6c1ac0f48fa6 Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Mon, 17 Aug 2009 00:23:12 +0000
Subject: [PATCH] These changes allow import-ldif to support multiple suffixes and fix some problems with the include/exclude options.
---
opends/src/server/org/opends/server/tasks/ImportTask.java | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/tasks/ImportTask.java b/opends/src/server/org/opends/server/tasks/ImportTask.java
index 56103ac..d185d19 100644
--- a/opends/src/server/org/opends/server/tasks/ImportTask.java
+++ b/opends/src/server/org/opends/server/tasks/ImportTask.java
@@ -170,8 +170,9 @@
private boolean replaceExisting = false;
private boolean skipSchemaValidation = false;
private boolean clearBackend = false;
- private boolean dnCheckPhase2 = false;
+ private boolean skipDNValidation = false;
private String tmpDirectory = null;
+ private int threadCount = 0;
private String backendID = null;
private String rejectFile = null;
private String skipFile = null;
@@ -243,6 +244,7 @@
AttributeType typeIsEncrypted;
AttributeType typeClearBackend;
AttributeType typeRandomSeed;
+ AttributeType typeThreadCount;
AttributeType typeTmpDirectory;
AttributeType typeDNCheckPhase2;
@@ -284,10 +286,12 @@
getAttributeType(ATTR_IMPORT_CLEAR_BACKEND, true);
typeRandomSeed =
getAttributeType(ATTR_IMPORT_RANDOM_SEED, true);
+ typeThreadCount =
+ getAttributeType(ATTR_IMPORT_THREAD_COUNT, true);
typeTmpDirectory =
getAttributeType(ATTR_IMPORT_TMP_DIRECTORY, true);
typeDNCheckPhase2 =
- getAttributeType(ATTR_IMPORT_DN_CHECK_PHASE2, true);
+ getAttributeType(ATTR_IMPORT_SKIP_DN_VALIDATION, true);
List<Attribute> attrList;
@@ -332,7 +336,7 @@
append = TaskUtils.getBoolean(attrList, false);
attrList = taskEntry.getAttribute(typeDNCheckPhase2);
- dnCheckPhase2 = TaskUtils.getBoolean(attrList, true);
+ skipDNValidation = TaskUtils.getBoolean(attrList, true);
attrList = taskEntry.getAttribute(typeTmpDirectory);
tmpDirectory = TaskUtils.getSingleValueString(attrList);
@@ -385,6 +389,9 @@
attrList = taskEntry.getAttribute(typeRandomSeed);
randomSeed = TaskUtils.getSingleValueInteger(attrList, 0);
+ attrList = taskEntry.getAttribute(typeThreadCount);
+ threadCount = TaskUtils.getSingleValueInteger(attrList, 0);
+
// Make sure that either the "includeBranchStrings" argument or the
// "backendID" argument was provided.
if(includeBranchStrings.isEmpty() && backendID == null)
@@ -891,8 +898,9 @@
importConfig.setIncludeBranches(includeBranches);
importConfig.setIncludeFilters(includeFilters);
importConfig.setValidateSchema(!skipSchemaValidation);
- importConfig.setDNCheckPhase2(dnCheckPhase2);
+ importConfig.setSkipDNValidation(skipDNValidation);
importConfig.setTmpDirectory(tmpDirectory);
+ importConfig.setThreadCount(threadCount);
// FIXME -- Should this be conditional?
importConfig.setInvokeImportPlugins(true);
--
Gitblit v1.10.0