| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.messages.BackendMessages.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | |
| | | { |
| | | if(lowerName.length() < 5) |
| | | { |
| | | LocalizableMessage msg = ERR_JEB_VLV_INDEX_NOT_CONFIGURED.get(lowerName); |
| | | throw new JebException(msg); |
| | | throw new JebException(ERR_VLV_INDEX_NOT_CONFIGURED.get(lowerName)); |
| | | } |
| | | |
| | | VLVIndex vlvIndex = |
| | | entryContainer.getVLVIndex(lowerName.substring(4)); |
| | | if(vlvIndex == null) |
| | | { |
| | | LocalizableMessage msg = ERR_JEB_VLV_INDEX_NOT_CONFIGURED.get(lowerName.substring(4)); |
| | | throw new JebException(msg); |
| | | throw new JebException(ERR_VLV_INDEX_NOT_CONFIGURED.get(lowerName.substring(4))); |
| | | } |
| | | |
| | | vlvIndexList.add(vlvIndex); |
| | |
| | | AttributeType attrType = DirectoryServer.getAttributeType(lowerName); |
| | | if (attrType == null) |
| | | { |
| | | LocalizableMessage msg = ERR_JEB_ATTRIBUTE_INDEX_NOT_CONFIGURED.get(index); |
| | | throw new JebException(msg); |
| | | throw new JebException(ERR_ATTRIBUTE_INDEX_NOT_CONFIGURED.get(index)); |
| | | } |
| | | AttributeIndex attrIndex = entryContainer.getAttributeIndex(attrType); |
| | | if (attrIndex == null) |
| | | { |
| | | LocalizableMessage msg = ERR_JEB_ATTRIBUTE_INDEX_NOT_CONFIGURED.get(index); |
| | | throw new JebException(msg); |
| | | throw new JebException(ERR_ATTRIBUTE_INDEX_NOT_CONFIGURED.get(index)); |
| | | } |
| | | attrIndexList.add(attrIndex); |
| | | } |
| | |
| | | |
| | | if (cleanMode) |
| | | { |
| | | logger.info(NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS, keyCount, errorCount, totalTime / 1000, rate); |
| | | logger.info(NOTE_VERIFY_CLEAN_FINAL_STATUS, keyCount, errorCount, totalTime / 1000, rate); |
| | | |
| | | if (multiReferenceCount > 0) |
| | | { |
| | |
| | | |
| | | if (logger.isDebugEnabled()) |
| | | { |
| | | logger.debug(INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT, multiReferenceCount); |
| | | logger.debug(INFO_JEB_VERIFY_ENTRY_LIMIT_EXCEEDED_COUNT, entryLimitExceededCount); |
| | | logger.debug(INFO_JEB_VERIFY_AVERAGE_REFERENCE_COUNT, averageEntryReferences); |
| | | logger.debug(INFO_JEB_VERIFY_MAX_REFERENCE_COUNT, maxEntryPerValue); |
| | | logger.debug(INFO_VERIFY_MULTIPLE_REFERENCE_COUNT, multiReferenceCount); |
| | | logger.debug(INFO_VERIFY_ENTRY_LIMIT_EXCEEDED_COUNT, entryLimitExceededCount); |
| | | logger.debug(INFO_VERIFY_AVERAGE_REFERENCE_COUNT, averageEntryReferences); |
| | | logger.debug(INFO_VERIFY_MAX_REFERENCE_COUNT, maxEntryPerValue); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | logger.info(NOTE_JEB_VERIFY_FINAL_STATUS, keyCount, errorCount, totalTime/1000, rate); |
| | | logger.info(NOTE_VERIFY_FINAL_STATUS, keyCount, errorCount, totalTime/1000, rate); |
| | | if (entryLimitMap.size() > 0) |
| | | { |
| | | logger.debug(INFO_JEB_VERIFY_ENTRY_LIMIT_STATS_HEADER); |
| | | logger.debug(INFO_VERIFY_ENTRY_LIMIT_STATS_HEADER); |
| | | |
| | | for (Map.Entry<Index,HashMap<ByteString,Long>> mapEntry : |
| | | entryLimitMap.entrySet()) |
| | |
| | | medianValue = values[x]; |
| | | } |
| | | |
| | | logger.debug(INFO_JEB_VERIFY_ENTRY_LIMIT_STATS_ROW, index, values.length, values[0], |
| | | logger.debug(INFO_VERIFY_ENTRY_LIMIT_STATS_ROW, index, values.length, values[0], |
| | | values[values.length-1], medianValue); |
| | | } |
| | | } |
| | |
| | | |
| | | float rate = 1000f*deltaCount / deltaTime; |
| | | |
| | | logger.info(NOTE_JEB_VERIFY_PROGRESS_REPORT, latestCount, totalCount, errorCount, rate); |
| | | logger.info(NOTE_VERIFY_PROGRESS_REPORT, latestCount, totalCount, errorCount, rate); |
| | | |
| | | try |
| | | { |
| | |
| | | cacheMissRate = nCacheMiss/(float)deltaCount; |
| | | } |
| | | |
| | | logger.debug(INFO_JEB_VERIFY_CACHE_AND_MEMORY_REPORT, freeMemory, cacheMissRate); |
| | | logger.debug(INFO_CACHE_AND_MEMORY_REPORT, freeMemory, cacheMissRate); |
| | | |
| | | prevEnvStats = envStats; |
| | | } |