From 36e213444660f0a74ed415adeab490a5f3d50a6f Mon Sep 17 00:00:00 2001
From: Fabio Pistolesi <fabio.pistolesi@forgerock.com>
Date: Fri, 09 Oct 2015 11:40:06 +0000
Subject: [PATCH] OPENDJ-1791 Implement a tool like dbtest for the pluggable backend

---
 opendj-server-legacy/src/messages/org/opends/messages/tool.properties |  104 ++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 73 insertions(+), 31 deletions(-)

diff --git a/opendj-server-legacy/src/messages/org/opends/messages/tool.properties b/opendj-server-legacy/src/messages/org/opends/messages/tool.properties
index 9752dec..e4995b7 100644
--- a/opendj-server-legacy/src/messages/org/opends/messages/tool.properties
+++ b/opendj-server-legacy/src/messages/org/opends/messages/tool.properties
@@ -1844,47 +1844,43 @@
  generate the RC script:  %s
 ERR_DSCFG_ERROR_QUIET_AND_INTERACTIVE_INCOMPATIBLE_1326=If you specify \
  the {%s} argument you must also specify {%s}
-INFO_DESCRIPTION_DBTEST_TOOL_1327=This utility can be used to debug the JE \
-  database
+INFO_DESCRIPTION_DBTEST_TOOL_1327=This utility can be used to debug the JE database
 INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_ROOT_CONTAINERS_1328=List the root \
   containers used by all JE backends
-INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_ENTRY_CONTAINERS_1329=List the entry \
+INFO_DESCRIPTION_BACKEND_DEBUG_SUBCMD_LIST_ENTRY_CONTAINERS_1329=List the entry \
   containers for a root container
 INFO_DESCRIPTION_DBTEST_SUBCMD_DUMP_DATABASE_CONTAINER_1330=Dump records from \
   a database container. Depending on database size, \
   this subcommand can generate lots of output
-INFO_DESCRIPTION_DBTEST_BACKEND_ID_1331=The backend ID of the JE backend to \
-  debug
-INFO_DESCRIPTION_DBTEST_BASE_DN_1332=The base DN of the entry container to debug
-INFO_DESCRIPTION_DBTEST_DATABASE_NAME_1333=The name of the database container \
-  to debug
-INFO_DESCRIPTION_DBTEST_SKIP_DECODE_1334=Do not try to decode the JE data to \
+INFO_DESCRIPTION_BACKEND_DEBUG_BACKEND_ID_1331=The backend ID of the backend to debug
+INFO_DESCRIPTION_BACKEND_DEBUG_BASE_DN_1332=The base DN of the entry container to debug
+INFO_DESCRIPTION_BACKEND_DEBUG_INDEX_NAME_1333=The name of the index to debug
+INFO_DESCRIPTION_BACKEND_DEBUG_SKIP_DECODE_1334=Do not try to decode backend data to \
   their appropriate types
 ERR_DBTEST_DECODE_FAIL_1335=An error occurred while decoding data: %s
-INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_INDEX_STATUS_1336=List the status of \
+INFO_DESCRIPTION_BACKEND_DEBUG_SUBCMD_LIST_INDEX_STATUS_1336=List the status of \
   indexes in an entry container. \
-  This subcommand can take a long time to complete, \
-  as it reads all indexes for all backends
-INFO_DESCRIPTION_DBTEST_MAX_KEY_VALUE_1337=Only show records with keys that \
+  This subcommand can take a long time to complete, as it reads all indexes for all backends
+INFO_DESCRIPTION_BACKEND_DEBUG_MAX_KEY_VALUE_1337=Only show records with keys that \
   should be ordered before the provided value using the comparator for the \
   database container
-INFO_DESCRIPTION_DBTEST_MIN_KEY_VALUE_1338=Only show records with keys that \
+INFO_DESCRIPTION_BACKEND_DEBUG_MIN_KEY_VALUE_1338=Only show records with keys that \
   should be ordered after the provided value using the comparator for the \
   database container
-INFO_DESCRIPTION_DBTEST_MAX_DATA_SIZE_1339=Only show records whose data is no \
+INFO_DESCRIPTION_BACKEND_DEBUG_MAX_DATA_SIZE_1339=Only show records whose data is no \
   larger than the provided value
-INFO_DESCRIPTION_DBTEST_MIN_DATA_SIZE_1340=Only show records whose data is no \
+INFO_DESCRIPTION_BACKEND_DEBUG_MIN_DATA_SIZE_1340=Only show records whose data is no \
   smaller than the provided value
 INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_DATABASE_CONTAINERS_1341=List the database \
   containers for an entry container
-INFO_LABEL_DBTEST_BACKEND_ID_1342=Backend ID
+INFO_LABEL_BACKEND_DEBUG_BACKEND_ID_1342=Backend ID
 INFO_LABEL_DBTEST_DB_DIRECTORY_1343=Database Directory
-INFO_LABEL_DBTEST_BASE_DN_1344=Base DN
+INFO_LABEL_BACKEND_DEBUG_BASE_DN_1344=Base DN
 INFO_LABEL_DBTEST_JE_DATABASE_PREFIX_1345=JE Database Prefix
-INFO_LABEL_DBTEST_ENTRY_COUNT_1346=Entry Count
-ERR_DBTEST_NO_BACKENDS_FOR_ID_1347=None of the Directory Server \
+INFO_LABEL_BACKEND_DEBUG_ENTRY_COUNT_1346=Entry Count
+ERR_BACKEND_DEBUG_NO_BACKENDS_FOR_ID_1347=None of the Directory Server \
   backends are configured with the requested backend ID %s
-ERR_DBTEST_NO_ENTRY_CONTAINERS_FOR_BASE_DN_1348=None of the entry \
+ERR_BACKEND_DEBUG_NO_ENTRY_CONTAINERS_FOR_BASE_DN_1348=None of the entry \
   containers are configured with the requested base DN %s in backend %s
 ERR_DBTEST_NO_DATABASE_CONTAINERS_FOR_NAME_1349=No database container \
   exists with the requested name %s in entry container %s and backend %s
@@ -1892,22 +1888,22 @@
   while attempting to initialize the JE backend %s: %s
 ERR_DBTEST_ERROR_READING_DATABASE_1351=An unexpected error occurred \
   while attempting to read and/or decode records from the database: %s
-ERR_DBTEST_DECODE_BASE_DN_1352=Unable to decode base DN string "%s" as \
+ERR_BACKEND_DEBUG_DECODE_BASE_DN_1352=Unable to decode base DN string "%s" as \
   a valid distinguished name:  %s
 INFO_LABEL_DBTEST_DATABASE_NAME_1353=Database Name
 INFO_LABEL_DBTEST_DATABASE_TYPE_1354=Database Type
 INFO_LABEL_DBTEST_JE_DATABASE_NAME_1355=JE Database Name
-INFO_LABEL_DBTEST_JE_RECORD_COUNT_1356=Record Count
-INFO_LABEL_DBTEST_INDEX_NAME_1357=Index Name
-INFO_LABEL_DBTEST_INDEX_TYPE_1358=Index Type
-INFO_LABEL_DBTEST_INDEX_STATUS_1359=Index Valid
+INFO_LABEL_BACKEND_DEBUG_RECORD_COUNT_1356=Record Count
+INFO_LABEL_BACKEND_DEBUG_INDEX_NAME_1357=Index Name
+INFO_LABEL_BACKEND_DEBUG_INDEX_TYPE_1358=Index Type
+INFO_LABEL_BACKEND_DEBUG_INDEX_STATUS_1359=Index Valid
 INFO_LABEL_DBTEST_KEY_1360=Key
 INFO_LABEL_DBTEST_DATA_1361=Data
-WARN_DBTEST_CANNOT_UNLOCK_BACKEND_1362=An error occurred while \
+WARN_BACKEND_DEBUG_CANNOT_UNLOCK_BACKEND_1362=An error occurred while \
  attempting to release the shared lock for backend %s:  %s.  This lock should \
  automatically be cleared when the process exits, so no further action \
  should be required
-ERR_DBTEST_CANNOT_LOCK_BACKEND_1363=An error occurred while \
+ERR_BACKEND_DEBUG_CANNOT_LOCK_BACKEND_1363=An error occurred while \
  attempting to acquire a shared lock for backend %s:  %s.  This generally \
  means that some other process has exclusive access to this backend (e.g., a \
  restore or an LDIF import)
@@ -1926,7 +1922,7 @@
 INFO_LABEL_DBTEST_VLV_INDEX_LAST_SORT_KEYS_1371=Last Sort Keys
 ERR_DBTEST_CANNOT_DECODE_SIZE_1372=An error occurred while parsing the \
   min/max data size %s as a integer: %s
-ERR_DBTEST_MISSING_SUBCOMMAND_1374=A sub-command must be specified
+ERR_BACKEND_DEBUG_MISSING_SUBCOMMAND_1374=A sub-command must be specified
 INFO_CREATERC_USER_DESCRIPTION_1375=The name of the user account under which \
  the server should run
 INFO_CREATERC_JAVA_HOME_DESCRIPTION_1376=The path to the Java installation \
@@ -2430,7 +2426,7 @@
 ERR_WINDOWS_SERVICE_ENABLING_ERROR_STARTING_SERVER_1709=The Windows \
  Service was successfully configured but there was an error starting it.  \
  Error code starting Windows Service: %d
-INFO_DESCRIPTION_DBTEST_STATS_ONLY_1710=Do not display the JE data, \
+INFO_DESCRIPTION_BACKEND_DEBUG_STATS_ONLY_1710=Do not display backend data, \
 just statistics
 INFO_TIMEOUT_PLACEHOLDER_1711={timeout}
 INFO_DESCRIPTION_CONNECTION_TIMEOUT_1712=Maximum length of time (in \
@@ -2570,6 +2566,49 @@
 '%s' to avoid compatibility issues
 ERR_UPGRADE_DSJAVAPROPERTIES_FAILED_1853=The dsjavaproperties tool failed to run. \
 Please rerun dsjavaproperties manually
+INFO_DESCRIPTION_BACKEND_TOOL_SUBCMD_LIST_ROOT_CONTAINERS_1854=List the root containers used by all backends
+INFO_DESCRIPTION_BACKEND_TOOL_SUBCMD_LIST_STORAGE_TREES_1855=List indexes for a root container storage. \
+  Depending on index size, this subcommand can generate lots of output
+INFO_DESCRIPTION_BACKEND_TOOL_SUBCMD_LIST_TREES_1866=List indexes for an entry container \
+  This subcommand may take a long time to complete, as it reads all data for all indexes
+INFO_DESCRIPTION_BACKEND_TOOL_SUBCMD_DUMP_TREE_1857=Dump records from an index decoding keys and values. \
+  Depending on index size, this subcommand can generate lots of output
+INFO_DESCRIPTION_BACKEND_TOOL_SUBCMD_DUMP_STORAGE_TREE_1858=Dump records in hexadecimal format from an index using \
+  the storage engine. Depending on index size, this subcommand can generate lots of output
+INFO_LABEL_BACKEND_TOOL_STORAGE_TREE_NAME_1861=Index Storage Name
+ERR_BACKEND_TOOL_ERROR_READING_ENTRY_CONTAINERS_1863=An error occurred while gathering entry containers: %s
+ERR_BACKEND_TOOL_ERROR_LISTING_TREES_1864=An error occurred while listing indexes: %s
+ERR_BACKEND_TOOL_ERROR_INITIALIZING_BACKEND_1865=An unexpected error occurred \
+  while attempting to initialize the backend %s: %s
+ERR_BACKEND_TOOL_ERROR_READING_TREE_1866=An unexpected error occurred \
+  while attempting to read and/or decode records from an index: %s
+INFO_LABEL_BACKEND_TOOL_INDEX_UNDEFINED_RECORD_COUNT_1867=Over Entry Limit
+ERR_BACKEND_TOOL_NO_TREE_FOR_NAME_1868=No index exists with the requested name %s in entry container %s and backend %s
+ERR_BACKEND_TOOL_ONLY_ONE_MIN_KEY_1869=Cannot specify a minimum key both as a string and as an hexadecimal string
+ERR_BACKEND_TOOL_ONLY_ONE_MAX_KEY_1870=Cannot specify a maximum key both as a string and as an hexadecimal string
+ERR_BACKEND_TOOL_PROCESSING_ARGUMENT_1871=An error occurred while processing arguments: %s
+ERR_BACKEND_TOOL_EXECUTING_COMMAND_1872=An error occurred while trying to execute %s: %s
+INFO_LABEL_BACKEND_TOOL_TOTAL_KEYS_1873=Total Keys
+INFO_LABEL_BACKEND_TOOL_KEYS_SIZE_1874=Keys Size
+INFO_LABEL_BACKEND_TOOL_VALUES_SIZE_1875=Values Size
+INFO_LABEL_BACKEND_TOOL_TOTAL_SIZES_1876=Total Size
+INFO_DESCRIPTION_BACKEND_TOOL_USE_SI_UNITS_1877=Uses SI Units for printing sizes
+INFO_DESCRIPTION_BACKEND_TOOL_SUBCMD_SINGLE_LINE_1878=Write hexadecimal data on a single line instead of pretty format
+INFO_LABEL_BACKEND_TOOL_STORAGE_1879=Storage
+INFO_LABEL_BACKEND_TOOL_TOTAL_1880=%nTotal: %d%n
+ERR_BACKEND_TOOL_CANNOT_CONFIGURE_BACKEND_1881=Cannot configure backend %s: %s
+INFO_LABEL_BACKEND_TOOL_INDEX_1882=%nIndex: %s%n
+INFO_LABEL_BACKEND_TOOL_OVER_INDEX_LIMIT_KEYS_1883=Over index-entry-limit keys: %s%n
+INFO_LABEL_BACKEND_TOOL_TOTAL_RECORDS_1884=%nTotal Records: %d%n
+INFO_LABEL_BACKEND_TOOL_TOTAL_KEY_SIZE_AND_AVG_1885=Total / Average Key Size: %d bytes / %d bytes%n
+INFO_LABEL_BACKEND_TOOL_TOTAL_DATA_SIZE_AND_AVG_1886=Total / Average Data Size: %d bytes / %d bytes%n
+ERR_BACKEND_TOOL_CURSOR_AT_KEY_NUMBER_1887=At key number %d, %s:
+INFO_LABEL_BACKEND_TOOL_KEY_FORMAT_1888=Key (len %d):
+INFO_LABEL_BACKEND_TOOL_VALUE_FORMAT_1889=Value (len %d):
+ERR_BACKEND_TOOL_DECODER_NOT_AVAILABLE_1890=Data decoder for printing is not available, should use hex dump
+ERR_BACKEND_TOOL_NO_TREE_FOR_NAME_IN_STORAGE_1891=No storage index exists with the requested name %s in backend %s
+INFO_LABEL_BACKEND_TOOL_BACKEND_TREE_NAME_1892=Index Backend Name
+INFO_DESCRIPTION_BACKEND_TOOL_1893=This utility can be used to debug a backend
 
 # Upgrade tasks
 INFO_UPGRADE_TASK_6869_SUMMARY_10000=Fixing de-DE collation matching rule OID
@@ -2625,7 +2664,7 @@
 REF_SHORT_DESC_BASE64_15001=encode and decode base64 strings
 REF_SHORT_DESC_CONTROL_PANEL_15002=start the OpenDJ graphical admin interface
 REF_SHORT_DESC_CREATE_RC_SCRIPT_15003=script to manage OpenDJ as a service on UNIX
-REF_SHORT_DESC_DBTEST_15004=gather OpenDJ backend database debugging information
+REF_SHORT_DESC_DBTEST_15004=gather OpenDJ backend JE database debugging information
 REF_SHORT_DESC_DSJAVAPROPERTIES_15005=apply OpenDJ Java home and JVM settings
 REF_SHORT_DESC_DSREPLICATION_15006=manage OpenDJ directory data replication
 REF_SHORT_DESC_ENCODE_PASSWORD_15007=encode a password with an OpenDJ storage scheme
@@ -2653,6 +2692,7 @@
 REF_SHORT_DESC_VERIFY_INDEX_15029=check index for consistency or errors
 REF_SHORT_DESC_WINDOWS_SERVICE_15030=register OpenDJ as a Windows Service
 UPGRADE_TASK_DELETE_FILE_10035=Removing file '%s'
+REF_SHORT_DESC_BACKEND_TOOL_15031=gather OpenDJ backend debugging information
 
 # Supplements to descriptions for generated reference documentation.
 SUPPLEMENT_DESCRIPTION_DBTEST_SUBCMD_LIST_INDEX_STATUS_20001=\
@@ -2677,3 +2717,5 @@
  have permissions to access it.
 ERR_SEARCH_INVALID_DEREFERENCE_POLICY_20014=Invalid deref alias specified: %s
 ERR_FILE_NOT_FULLY_READABLE_20015=Could not completely read file '%s'
+SUPPLEMENT_DESCRIPTION_BACKEND_TOOL_SUBCMD_LIST_INDEX_STATUS_20016=\
+  <xinclude:include href="variablelist-backendtool-index-status.xml" />

--
Gitblit v1.10.0