From 293d6dd9da947951ac774636e97f6667ed669a18 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 17 May 2007 13:05:54 +0000
Subject: [PATCH] The upgrader determines schema and configuration customization by performing an ldif-diff of the base schema and configuration files with those in the current server. Previously the invocation of this command just used the internal LDIFDiff class to perform this work. Given the recent discovery of problems associated with using DirectoryServer in the same process when the filesystem bits and the jars are different version, this commit externalizes the command invocation to an external process using the currently installed jars.
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java | 75 -------------------------------------
1 files changed, 0 insertions(+), 75 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java
index 589d992..6adceb7 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java
@@ -40,7 +40,6 @@
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
-import java.io.File;
/**
* Class used to manipulate an OpenDS server.
@@ -449,47 +448,6 @@
}
/**
- * Backs up all the databases to a specified directory.
- * @param backupDir File representing the directory where the backups will
- * be stored
- * @return OperationOutput containing information about the operation
- * @throws IOException if the process could not be started
- * @throws InterruptedException if the process was prematurely interrupted
- */
- public OperationOutput backupDatabases(File backupDir)
- throws IOException, InterruptedException {
- final OperationOutput output = new OperationOutput();
- List<String> args = new ArrayList<String>();
- args.add(Utils.getPath(installation.getCommandFile("backup")));
- args.add("-a"); // backup all
- args.add("-d"); // backup to directory
- args.add(Utils.getPath(backupDir));
- ProcessBuilder pb = new ProcessBuilder(args);
- Process p = pb.start();
-
- BufferedReader out =
- new BufferedReader(new InputStreamReader(p.getErrorStream()));
- new OutputReader(out) {
- public void processLine(String line) {
- output.addErrorMessage(line);
- LOG.log(Level.INFO, "backup operation: " + line);
- }
- };
-
- BufferedReader err =
- new BufferedReader(new InputStreamReader(p.getInputStream()));
- new OutputReader(err) {
- public void processLine(String line) {
- output.addOutputMessage(line);
- LOG.log(Level.INFO, "backup operation: " + line);
- }
- };
-
- output.setReturnCode(p.waitFor());
- return output;
- }
-
- /**
* This class is used to read the standard error and standard output of the
* Stop process.
* <p/>
@@ -549,39 +507,6 @@
}
/**
- * This class is used to read an input stream and process ouput.
- */
- abstract private class OutputReader {
-
- /**
- * Called whenever new input is read from the reader.
- * @param line String representing new input
- */
- public abstract void processLine(String line);
-
- /**
- * The protected constructor.
- *
- * @param reader the BufferedReader of the stop process.
- */
- public OutputReader(final BufferedReader reader) {
- Thread t = new Thread(new Runnable() {
- public void run() {
- try {
- String line;
- while (null != (line = reader.readLine())) {
- processLine(line);
- }
- } catch (Throwable t) {
- LOG.log(Level.INFO, "error reading output", t);
- }
- }
- });
- t.start();
- }
- }
-
- /**
* Returns the Message ID indicating that the server has started.
* @return the Message ID indicating that the server has started.
*/
--
Gitblit v1.10.0