| | |
| | | } |
| | | else |
| | | { |
| | | for (Index index : indexMap.values()) |
| | | { |
| | | index.closeCursor(); |
| | | } |
| | | if (!isCanceled) |
| | | { |
| | | logger.info(NOTE_JEB_IMPORT_LDIF_INDEX_CLOSE, indexMgr.getBufferFileName()); |
| | |
| | | dnKey.setData(key); |
| | | index.insert(dnKey, idSet, dnValue); |
| | | } |
| | | index.closeCursor(); |
| | | if (clearMap) |
| | | { |
| | | map.clear(); |
| | |
| | | found = true; |
| | | LocalDBIndexCfg indexCfg = cfg.getLocalDBIndex(idx); |
| | | SortedSet<IndexType> indexType = indexCfg.getIndexType(); |
| | | if (indexType.contains(EQUALITY)) |
| | | { |
| | | indexCount++; |
| | | } |
| | | if (indexType.contains(ORDERING)) |
| | | { |
| | | indexCount++; |
| | | } |
| | | if (indexType.contains(PRESENCE)) |
| | | { |
| | | indexCount++; |
| | | } |
| | | if (indexType.contains(SUBSTRING)) |
| | | { |
| | | indexCount++; |
| | | } |
| | | if (indexType.contains(APPROXIMATE)) |
| | | if (indexType.contains(EQUALITY) |
| | | || indexType.contains(ORDERING) |
| | | || indexType.contains(PRESENCE) |
| | | || indexType.contains(SUBSTRING) |
| | | || indexType.contains(APPROXIMATE)) |
| | | { |
| | | indexCount++; |
| | | } |
| | |
| | | * |
| | | * @return The total number for entries to process. |
| | | */ |
| | | public long getTotEntries() |
| | | public long getTotalEntries() |
| | | { |
| | | return this.totalEntries; |
| | | } |
| | |
| | | * progress report. |
| | | */ |
| | | private long previousProcessed; |
| | | |
| | | /** |
| | | * The time in milliseconds of the previous progress report. |
| | | */ |
| | | /** The time in milliseconds of the previous progress report. */ |
| | | private long previousTime; |
| | | |
| | | /** |
| | | * The environment statistics at the time of the previous report. |
| | | */ |
| | | /** The environment statistics at the time of the previous report. */ |
| | | private EnvironmentStats prevEnvStats; |
| | | |
| | | /** |
| | |
| | | long deltaCount = entriesProcessed - previousProcessed; |
| | | float rate = 1000f * deltaCount / deltaTime; |
| | | float completed = 0; |
| | | if (rebuildManager.getTotEntries() > 0) |
| | | if (rebuildManager.getTotalEntries() > 0) |
| | | { |
| | | completed = 100f * entriesProcessed / rebuildManager.getTotEntries(); |
| | | completed = 100f * entriesProcessed / rebuildManager.getTotalEntries(); |
| | | } |
| | | logger.info(NOTE_JEB_REBUILD_PROGRESS_REPORT, completed, entriesProcessed, |
| | | rebuildManager.getTotEntries(), rate); |
| | | rebuildManager.getTotalEntries(), rate); |
| | | try |
| | | { |
| | | Runtime runtime = Runtime.getRuntime(); |
| | |
| | | * progress report. |
| | | */ |
| | | private long previousCount; |
| | | |
| | | /** |
| | | * The time in milliseconds of the previous progress report. |
| | | */ |
| | | /** The time in milliseconds of the previous progress report. */ |
| | | private long previousTime; |
| | | |
| | | /** |
| | | * The environment statistics at the time of the previous report. |
| | | */ |
| | | /** The environment statistics at the time of the previous report. */ |
| | | private EnvironmentStats previousStats; |
| | | |
| | | /** Determines if eviction has been detected. */ |
| | | private boolean evicting; |
| | | |
| | | /** Entry count when eviction was detected. */ |
| | | private long evictionEntryCount; |
| | | |
| | | /** |
| | | * Create a new import progress task. |
| | | */ |
| | | /** Create a new import progress task. */ |
| | | public FirstPhaseProgressTask() |
| | | { |
| | | previousTime = System.currentTimeMillis(); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * The action to be performed by this timer task. |
| | | */ |
| | | /** The action to be performed by this timer task. */ |
| | | @Override |
| | | public void run() |
| | | { |
| | |
| | | * progress report. |
| | | */ |
| | | private long previousCount; |
| | | |
| | | /** |
| | | * The time in milliseconds of the previous progress report. |
| | | */ |
| | | /** The time in milliseconds of the previous progress report. */ |
| | | private long previousTime; |
| | | |
| | | /** |
| | | * The environment statistics at the time of the previous report. |
| | | */ |
| | | /** The environment statistics at the time of the previous report. */ |
| | | private EnvironmentStats previousStats; |
| | | |
| | | /** Determines if eviction has been detected. */ |
| | | private boolean evicting; |
| | | |
| | | private long latestCount; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * The action to be performed by this timer task. |
| | | */ |
| | | /** The action to be performed by this timer task. */ |
| | | @Override |
| | | public void run() |
| | | { |