| | |
| | | private Backend backend; |
| | | |
| | | /** |
| | | * The database container to be verified within the backend. |
| | | */ |
| | | private Container container; |
| | | |
| | | /** |
| | | * The configuration of the JE backend. |
| | | */ |
| | | private Config config; |
| | |
| | | // Open a container read-only. |
| | | String containerName = |
| | | BackendImpl.getContainerName(verifyConfig.getBaseDN()); |
| | | container = new Container(env, containerName); |
| | | Container container = new Container(env, containerName); |
| | | EntryContainer entryContainer = |
| | | new EntryContainer(backend, config, container); |
| | | entryContainer.openReadOnly(); |
| | |
| | | status == OperationStatus.SUCCESS; |
| | | status = cursor.getNext(key, data, LockMode.DEFAULT)) |
| | | { |
| | | EntryID entryID = null; |
| | | EntryID entryID; |
| | | try |
| | | { |
| | | entryID = new EntryID(key); |
| | |
| | | { |
| | | keyCount++; |
| | | |
| | | Entry entry = null; |
| | | Entry entry; |
| | | try |
| | | { |
| | | entry = JebFormat.entryFromDatabase(data.getData()); |
| | |
| | | continue; |
| | | } |
| | | |
| | | EntryID entryID = null; |
| | | EntryID entryID; |
| | | try |
| | | { |
| | | entryID = new EntryID(data); |
| | |
| | | continue; |
| | | } |
| | | |
| | | Entry entry = null; |
| | | Entry entry; |
| | | try |
| | | { |
| | | entry = id2entry.get(null, entryID); |
| | |
| | | { |
| | | keyCount++; |
| | | |
| | | EntryID entryID = null; |
| | | EntryID entryID; |
| | | try |
| | | { |
| | | entryID = new EntryID(key); |
| | |
| | | continue; |
| | | } |
| | | |
| | | EntryIDSet entryIDList = null; |
| | | EntryIDSet entryIDList; |
| | | try |
| | | { |
| | | JebFormat.entryIDListFromDatabase(data.getData()); |
| | |
| | | assert debugException(CLASS_NAME, "iterateID2Children", e); |
| | | errorCount++; |
| | | System.err.printf("File id2children has malformed ID list " + |
| | | "for ID %d:%n%s%n", |
| | | "for ID %s:%n%s%n", |
| | | entryID, |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | continue; |
| | |
| | | |
| | | if (entryIDList.isDefined()) |
| | | { |
| | | Entry entry = null; |
| | | Entry entry; |
| | | try |
| | | { |
| | | entry = id2entry.get(null, entryID); |
| | |
| | | |
| | | for (EntryID id : entryIDList) |
| | | { |
| | | Entry childEntry = null; |
| | | Entry childEntry; |
| | | try |
| | | { |
| | | childEntry = id2entry.get(null, id); |
| | |
| | | { |
| | | keyCount++; |
| | | |
| | | EntryID entryID = null; |
| | | EntryID entryID; |
| | | try |
| | | { |
| | | entryID = new EntryID(key); |
| | |
| | | continue; |
| | | } |
| | | |
| | | EntryIDSet entryIDList = null; |
| | | EntryIDSet entryIDList; |
| | | try |
| | | { |
| | | JebFormat.entryIDListFromDatabase(data.getData()); |
| | |
| | | assert debugException(CLASS_NAME, "iterateID2Subtree", e); |
| | | errorCount++; |
| | | System.err.printf("File id2subtree has malformed ID list " + |
| | | "for ID %d:%n%s%n", |
| | | "for ID %s:%n%s%n", |
| | | entryID, |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | continue; |
| | |
| | | |
| | | if (entryIDList.isDefined()) |
| | | { |
| | | Entry entry = null; |
| | | Entry entry; |
| | | try |
| | | { |
| | | entry = id2entry.get(null, entryID); |
| | |
| | | |
| | | for (EntryID id : entryIDList) |
| | | { |
| | | Entry subordEntry = null; |
| | | Entry subordEntry; |
| | | try |
| | | { |
| | | subordEntry = id2entry.get(null, id); |
| | |
| | | Long counter = hashMap.get(octetString); |
| | | if (counter == null) |
| | | { |
| | | counter = new Long(1); |
| | | counter = 1L; |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | keyCount++; |
| | | |
| | | EntryIDSet entryIDList = null; |
| | | EntryIDSet entryIDList; |
| | | try |
| | | { |
| | | JebFormat.entryIDListFromDatabase(data.getData()); |
| | |
| | | } |
| | | prevID = id; |
| | | |
| | | Entry entry = null; |
| | | Entry entry; |
| | | try |
| | | { |
| | | entry = id2entry.get(null, id); |
| | |
| | | class ProgressTask extends TimerTask |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.backends.jeb.VerifyJob.ProgressTask"; |
| | | |
| | | /** |
| | | * The number of records that had been processed at the time of the |
| | | * previous progress report. |
| | | */ |
| | |
| | | |
| | | prevEnvStats = envStats; |
| | | } |
| | | catch (DatabaseException e) {} |
| | | catch (DatabaseException e) |
| | | { |
| | | debugException(CLASS_NAME, "run", e); |
| | | } |
| | | |
| | | |
| | | previousCount = latestCount; |
| | | previousTime = latestTime; |
| | | } |
| | | }; |
| | | } |
| | | } |