| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.extensions.ConfigFileHandler; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.JDKLogging; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteStringBuilder; |
| | | import org.opends.server.util.BuildVersion; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import com.forgerock.opendj.cli.Argument; |
| | | import com.forgerock.opendj.cli.ArgumentException; |
| | | import com.forgerock.opendj.cli.BooleanArgument; |
| | |
| | | import com.forgerock.opendj.cli.StringArgument; |
| | | import com.forgerock.opendj.cli.SubCommand; |
| | | import com.forgerock.opendj.cli.SubCommandArgumentParser; |
| | | |
| | | import org.opends.server.util.table.TableBuilder; |
| | | import org.opends.server.util.table.TextTablePrinter; |
| | | |
| | |
| | | */ |
| | | public class DBTest |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The error stream which this application should use. */ |
| | | private final PrintStream err; |
| | | |
| | |
| | | { |
| | | this.out = NullOutputStream.wrapOrNullStream(out); |
| | | this.err = NullOutputStream.wrapOrNullStream(err); |
| | | JDKLogging.disableLogging(); |
| | | |
| | | LocalizableMessage toolDescription = INFO_DESCRIPTION_DBTEST_TOOL.get(); |
| | | this.parser = new SubCommandArgumentParser(this.getClass().getName(), |
| | |
| | | } |
| | | catch (InitializationException e) |
| | | { |
| | | logger.traceException(e); |
| | | printMessage(e.getMessageObject()); |
| | | return 1; |
| | | } |
| | |
| | | return 0; |
| | | } |
| | | } catch (Exception e) { |
| | | logger.traceException(e); |
| | | printMessage(LocalizableMessage.raw(StaticUtils.stackTraceToString(e))); |
| | | return 1; |
| | | } |
| | |
| | | if(dc instanceof Index) |
| | | { |
| | | builder.appendCell(ec.getState().getIndexTrustState(null, |
| | | ((Index)dc))); |
| | | (dc))); |
| | | } |
| | | else if(dc instanceof VLVIndex) |
| | | { |
| | | builder.appendCell(ec.getState().getIndexTrustState(null, |
| | | ((VLVIndex)dc))); |
| | | (dc))); |
| | | } |
| | | builder.appendCell(dc.getRecordCount()); |
| | | |
| | |
| | | ArrayList<Backend> backendList = new ArrayList<Backend>(); |
| | | ArrayList<BackendCfg> entryList = new ArrayList<BackendCfg>(); |
| | | ArrayList<List<DN>> dnList = new ArrayList<List<DN>>(); |
| | | int code = BackendToolUtils.getBackends(backendList, entryList, dnList); |
| | | // TODO: Throw error if return code is not 0 |
| | | BackendToolUtils.getBackends(backendList, entryList, dnList); |
| | | |
| | | LinkedHashMap<LocalDBBackendCfg, BackendImpl> jeBackends = |
| | | new LinkedHashMap<LocalDBBackendCfg, BackendImpl>(); |