opendj-sdk/opendj3-server-dev/src/messages/messages/jeb.properties
@@ -164,8 +164,8 @@ NOTE_JEB_IMPORT_CLOSING_DATABASE_93=Flushing data to disk NOTE_JEB_IMPORT_FINAL_STATUS_94=Processed %d entries, imported %d, skipped \ %d, rejected %d and migrated %d in %d seconds (average rate %.1f/sec) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Processed %d entries, skipped %d, rejected \ %d, and migrated %d (recent rate %.1f/sec) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Processed %d entries, skipped %d \ and rejected %d (recent rate %.1f/sec) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=Free memory = %d MB, Cache miss \ rate = %.1f/entry NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=Checked %d records and found %d \ opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_ca_ES.properties
@@ -9,7 +9,7 @@ NOTE_JEB_IMPORT_THREAD_COUNT_89=Comptador de fils d'execuci\u00f3 importats: %d fils d'execuci\u00f3 ERR_IMPORT_LDIF_LACK_MEM_90=Mem\u00f2ria lliure insuficient per realitzar la importaci\u00f3. Com a m\u00ednim es necessiten %dMB de mem\u00f2ria lliure NOTE_JEB_IMPORT_FINAL_STATUS_94=Processades %d entrades, importades %d, omeses %d, rebutjades %d i migrades %d en %d segons (mitja percentatge %.1f/sec) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Processades %d entrades, omeses %d, rebutjades %d, i migrades %d (percentatge recent %.1f/sec) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Processades %d entrades, omeses %d, i rebutjades %d (percentatge recent %.1f/sec) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=Mem\u00f2ria lliure = %d MB, percentatge de p\u00e8rdues de la mem. cache = %.1f/entada NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=Comprovats %d registres i trobats %d error(s) en %d segons (mitja percentatge %.1f/sec) NOTE_JEB_IMPORT_LDIF_PHASE_TWO_REPORT_154=\u00cdndex %s: bytes restants = %d, mitja de processament de claus = %.1f/sec opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_de.properties
@@ -107,7 +107,7 @@ ERR_IMPORT_LDIF_LACK_MEM_90=Unzureichender freier Speicher (%d Byte) f\u00fcr den Import. Es sind mindestens %d Byte freier Speicher erforderlich NOTE_JEB_IMPORT_CLOSING_DATABASE_93=Daten werden auf Datentr\u00e4ger ausgegeben NOTE_JEB_IMPORT_FINAL_STATUS_94=%d Eintr\u00e4ge verarbeitet, %d importiert, %d \u00fcbersprungen, %d abgelehnt und %d migriert in %d Sekunden (durchschnittl. Rate %.1f/Sek.) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=%d Eintr\u00e4ge verarbeitet, %d \u00fcbersprungen, %d abgelehnt und %d migriert (letzte Rate %.1f/Sek.) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=%d Eintr\u00e4ge verarbeitet, %d \u00fcbersprungen und %d abgelehnt (letzte Rate %.1f/Sek.) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=Freier Speicher = %d MB, Cachefehlerrate = %.1f/Eintrag NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=%d Datens\u00e4tze \u00fcberpr\u00fcft und %d Fehler in %d Sekunden gefunden (durchschnittl. Rate %.1f/Sek.) INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT_102=Anzahl der Datens\u00e4tze, die auf mehrere Eintr\u00e4ge verweisen: %d opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_es.properties
@@ -107,7 +107,7 @@ ERR_IMPORT_LDIF_LACK_MEM_90=La memoria libre es insuficiente (%d bytes) para realizar una importaci\u00f3n. Se requiere un m\u00ednimo de %d bytes de memoria libre NOTE_JEB_IMPORT_CLOSING_DATABASE_93=Vaciando datos en el disco NOTE_JEB_IMPORT_FINAL_STATUS_94=Se han procesado %d entradas, importado %d, omitido %d, rechazado %d y migrado %d en %d segundos (velocidad media %.1f/s) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Se han procesado %d entradas, omitido %d, rechazado %d y migrado %d (velocidad reciente %.1f/s) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Se han procesado %d entradas, omitido %d y rechazado %d (velocidad reciente %.1f/s) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=Memoria libre: %d MB, tasa de faltas de la cach\u00e9 = %.1f/entrada NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=Se han comprobado %d registros y encontrado %d error(es) en %d segundos (velocidad media %.1f/s) INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT_102=N\u00famero de registros que hacen referencia a m\u00e1s de una entrada: %d opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_fr.properties
@@ -107,7 +107,7 @@ ERR_IMPORT_LDIF_LACK_MEM_90=M\u00e9moire disponible insuffisante (%d\u00a0octets) pour r\u00e9aliser l'importation. Vous devez disposer d'au moins %d\u00a0octets de m\u00e9moire disponible NOTE_JEB_IMPORT_CLOSING_DATABASE_93=Vidage des donn\u00e9es vers le disque NOTE_JEB_IMPORT_FINAL_STATUS_94=Entr\u00e9es\u00a0: %d trait\u00e9es, %d import\u00e9es, %d ignor\u00e9es, %d rejet\u00e9es et %d migr\u00e9es en %d secondes (taux moyen %.1f/sec) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Entr\u00e9es\u00a0: %d trait\u00e9es, %d ignor\u00e9es, %d rejet\u00e9es et %d migr\u00e9es (taux r\u00e9cent %.1f/sec) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Entr\u00e9es\u00a0: %d trait\u00e9es, %d ignor\u00e9es et %d rejet\u00e9es (taux r\u00e9cent %.1f/sec) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=M\u00e9moire libre = %d Mo, taux d'\u00e9chec d'acc\u00e8s au cache = %.1f/entr\u00e9e NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=Enregistrements\u00a0: %d v\u00e9rifi\u00e9s et %d erreurs trouv\u00e9es en %d secondes (taux moyen %.1f/sec) INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT_102=Nombre d'enregistrements r\u00e9f\u00e9ren\u00e7ant plus d'une entr\u00e9e\u00a0: %d opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_ja.properties
@@ -107,7 +107,7 @@ ERR_IMPORT_LDIF_LACK_MEM_90=\u30a4\u30f3\u30dd\u30fc\u30c8\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u7a7a\u304d\u30e1\u30e2\u30ea\u30fc\u304c\u8db3\u308a\u307e\u305b\u3093 (%d \u30d0\u30a4\u30c8)\u3002\u5c11\u306a\u304f\u3068\u3082 %d \u30d0\u30a4\u30c8\u306e\u7a7a\u304d\u30e1\u30e2\u30ea\u30fc\u304c\u5fc5\u8981\u3067\u3059 NOTE_JEB_IMPORT_CLOSING_DATABASE_93=\u30c7\u30fc\u30bf\u3092\u30c7\u30a3\u30b9\u30af\u306b\u30d5\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u3044\u307e\u3059 NOTE_JEB_IMPORT_FINAL_STATUS_94=%6$d \u79d2\u3067 %1$d \u500b\u306e\u30a8\u30f3\u30c8\u30ea\u3092\u51e6\u7406\u3057\u3001%2$d \u500b\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001%3$d \u500b\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3001%4$d \u500b\u3092\u62d2\u5426\u3057\u3001%5$d \u500b\u3092\u79fb\u884c\u3057\u307e\u3057\u305f (\u5e73\u5747\u30ec\u30fc\u30c8 %7$.1f \u500b/\u79d2) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=%d \u500b\u306e\u30a8\u30f3\u30c8\u30ea\u3092\u51e6\u7406\u3057\u3001%d \u500b\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3001%d \u500b\u3092\u62d2\u5426\u3057\u3001%d \u500b\u3092\u79fb\u884c\u3057\u307e\u3057\u305f (\u6700\u65b0\u306e\u30ec\u30fc\u30c8 %.1f \u500b/\u79d2) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=%d \u500b\u306e\u30a8\u30f3\u30c8\u30ea\u3092\u51e6\u7406\u3057\u3001%d \u500b\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3001%d \u500b\u3092\u62d2\u5426\u3057\u3001 (\u6700\u65b0\u306e\u30ec\u30fc\u30c8 %.1f \u500b/\u79d2) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=\u7a7a\u304d\u30e1\u30e2\u30ea\u30fc = %dM \u30d0\u30a4\u30c8\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u30df\u30b9\u30ec\u30fc\u30c8 = %.1f \u500b/\u30a8\u30f3\u30c8\u30ea NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=%3$d \u79d2\u3067 %1$d \u500b\u306e\u30ec\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3057\u3001%2$d \u500b\u306e\u30a8\u30e9\u30fc\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f (\u5e73\u5747\u30ec\u30fc\u30c8 %4$.1f \u500b/\u79d2) INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT_102=\u8907\u6570\u306e\u30a8\u30f3\u30c8\u30ea\u3092\u53c2\u7167\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u6570: %d opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_ko.properties
@@ -105,7 +105,7 @@ NOTE_JEB_IMPORT_THREAD_COUNT_89=\uac00\uc838\uc624\uae30 \uc2a4\ub808\ub4dc \uac1c\uc218: %d\uac1c \uc2a4\ub808\ub4dc NOTE_JEB_IMPORT_CLOSING_DATABASE_93=\ub514\uc2a4\ud06c\uc5d0 \ub370\uc774\ud130\ub97c \ud50c\ub7ec\uc2dc\ud569\ub2c8\ub2e4. NOTE_JEB_IMPORT_FINAL_STATUS_94=\ucc98\ub9ac\ub41c \ud56d\ubaa9 \uc218: %d, \uac00\uc838\uc628 \ud56d\ubaa9 \uc218: %d, \uac74\ub108\ub6f4 \ud56d\ubaa9 \uc218: %d, \uac70\ubd80\ub41c \ud56d\ubaa9 \uc218: %d, \ub9c8\uc774\uadf8\ub808\uc774\uc158\ub41c \ud56d\ubaa9 \uc218: %d, \uc18c\uc694 \uc2dc\uac04: %d\ucd08(\ud3c9\uade0 \uc18d\ub3c4 %.1f/\ucd08) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=\ucc98\ub9ac\ub41c \ud56d\ubaa9 \uc218: %d, \uac74\ub108\ub6f4 \ud56d\ubaa9 \uc218: %d, \uac70\ubd80\ub41c \ud56d\ubaa9 \uc218: %d, \ub9c8\uc774\uadf8\ub808\uc774\uc158\ub41c \ud56d\ubaa9 \uc218: %d(\ucd5c\uc2e0 \uc18d\ub3c4 %.1f/\ucd08) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=\ucc98\ub9ac\ub41c \ud56d\ubaa9 \uc218: %d, \uac74\ub108\ub6f4 \ud56d\ubaa9 \uc218: %d, \uac70\ubd80\ub41c \ud56d\ubaa9 \uc218: %d(\ucd5c\uc2e0 \uc18d\ub3c4 %.1f/\ucd08) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=\uc0ac\uc6a9 \uac00\ub2a5\ud55c \uba54\ubaa8\ub9ac = %dMB, \uce90\uc2dc \ub204\ub77d \ube44\uc728 = %.1f/\ud56d\ubaa9 NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=\ud655\uc778\ub41c \ub808\ucf54\ub4dc \uc218: %d, \ubc1c\uacac\ub41c \uc624\ub958 \uc218: %d, \uc18c\uc694 \uc2dc\uac04: %d\ucd08(\ud3c9\uade0 \uc18d\ub3c4 %.1f/\ucd08) INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT_102=\uc5ec\ub7ec \ud56d\ubaa9\uc744 \ucc38\uc870\ud558\ub294 \ub808\ucf54\ub4dc \uc218: %d opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_pl.properties
@@ -9,6 +9,6 @@ NOTE_JEB_IMPORT_FINAL_STATUS_94=Przetworzono %d wpis\u00f3w, zaimportowano %d, pomini\u0119to %d, odrzucono %d, zmigrowano %d w przeci\u0105gu %d sekund (\u015brednio %.1f/sec) NOTE_JEB_IMPORT_MIGRATION_START_157=Migruj\u0119 %s wpis\u00f3w dla bazy DN %s NOTE_JEB_IMPORT_STARTING_173=%s rozpoczyna import (kompilacja %s, R%d) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Przetworzono %d wpis\u00f3w, pomini\u0119to %d, odrzucono %d, zmigrowano %d (ostatnia \u015brednia %.1f/sec) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=Przetworzono %d wpis\u00f3w, pomini\u0119to %d, odrzucono %d (ostatnia \u015brednia %.1f/sec) NOTE_JEB_BACKEND_STARTED_42=Baza danych %s zawieraj\u0105ca %d wpis\u00f3w wystratowa\u0142a NOTE_JEB_IMPORT_LDIF_BUFFER_CHECKPOINTS_187=Wykonano punkt\u00f3w kontrolnych: %d opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_zh_CN.properties
@@ -107,7 +107,7 @@ ERR_IMPORT_LDIF_LACK_MEM_90=\u6ca1\u6709\u8db3\u591f\u53ef\u7528\u5185\u5b58\uff08%d \u5b57\u8282\uff09\u4ee5\u6267\u884c\u5bfc\u5165\u3002\u81f3\u5c11\u9700\u8981 %d \u5b57\u8282\u7684\u53ef\u7528\u5185\u5b58 NOTE_JEB_IMPORT_CLOSING_DATABASE_93=\u6b63\u5728\u5c06\u6570\u636e\u5237\u65b0\u5230\u78c1\u76d8\u4e2d NOTE_JEB_IMPORT_FINAL_STATUS_94=\u5728 %6$d \u79d2\u5185\uff0c\u5904\u7406\u4e86 %1$d \u4e2a\u6761\u76ee\uff0c\u5bfc\u5165\u4e86 %2$d \u4e2a\u6761\u76ee\uff0c\u8df3\u8fc7\u4e86 %3$d \u4e2a\u6761\u76ee\uff0c\u62d2\u7edd\u4e86 %4$d \u4e2a\u6761\u76ee\uff0c\u5e76\u8fc1\u79fb\u4e86 %5$d \u4e2a\u6761\u76ee\uff08\u5e73\u5747\u901f\u7387\u4e3a %7$.1f\u4e2a/\u79d2\uff09 NOTE_JEB_IMPORT_PROGRESS_REPORT_96=\u5904\u7406\u4e86 %d \u4e2a\u6761\u76ee\uff0c\u8df3\u8fc7\u4e86 %d \u4e2a\u6761\u76ee\uff0c\u62d2\u7edd\u4e86 %d \u4e2a\u6761\u76ee\uff0c\u5e76\u8fc1\u79fb\u4e86 %d \u4e2a\u6761\u76ee\uff08\u6700\u65b0\u901f\u7387\u4e3a %.1f\u4e2a/\u79d2\uff09 NOTE_JEB_IMPORT_PROGRESS_REPORT_96=\u5904\u7406\u4e86 %d \u4e2a\u6761\u76ee\uff0c\u8df3\u8fc7\u4e86 %d \u4e2a\u6761\u76ee\uff0c\u5e76\u62d2\u7edd\u4e86 %d \u4e2a\u6761\u76ee\uff08\u6700\u65b0\u901f\u7387\u4e3a %.1f\u4e2a/\u79d2\uff09 NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=\u53ef\u7528\u5185\u5b58 = %d MB\uff0c\u7f13\u5b58\u672a\u547d\u4e2d\u7387 = %.1f\u4e2a/\u6761\u76ee NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=\u5728 %3$d \u79d2\u5185\uff0c\u68c0\u67e5\u4e86 %1$d \u4e2a\u8bb0\u5f55\u5e76\u627e\u5230\u4e86 %2$d \u4e2a\u9519\u8bef\uff08\u5e73\u5747\u901f\u7387\u4e3a %4$.1f\u4e2a/\u79d2\uff09 INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT_102=\u5f15\u7528\u591a\u4e2a\u6761\u76ee\u7684\u8bb0\u5f55\u6570\uff1a%d \u4e2a opendj-sdk/opendj3-server-dev/src/messages/messages/jeb_zh_TW.properties
@@ -105,7 +105,7 @@ NOTE_JEB_IMPORT_THREAD_COUNT_89=\u532f\u5165\u57f7\u884c\u7dd2\u8a08\u6578: %d \u500b\u57f7\u884c\u7dd2 NOTE_JEB_IMPORT_CLOSING_DATABASE_93=\u6b63\u5728\u5c07\u8cc7\u6599\u6e05\u9664\u81f3\u78c1\u789f NOTE_JEB_IMPORT_FINAL_STATUS_94=\u5728 %6$d \u79d2\u4e2d\u8655\u7406\u4e86 %1$d \u500b\u9805\u76ee\uff0c\u532f\u5165 %2$d \u500b\u3001\u7565\u904e %3$d \u500b\u3001\u62d2\u7d55 %4$d \u500b\u3001\u9077\u79fb %5$d \u500b\u9805\u76ee (\u5e73\u5747\u901f\u7387 %.1f \u500b/\u79d2) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=\u5df2\u8655\u7406 %d \u500b\u9805\u76ee\uff0c\u7565\u904e %d \u500b\u3001\u62d2\u7d55 %d \u500b\u3001\u9077\u79fb %d \u500b\u9805\u76ee (\u6700\u8fd1\u901f\u7387 %.1f \u500b/\u79d2) NOTE_JEB_IMPORT_PROGRESS_REPORT_96=\u5df2\u8655\u7406 %d \u500b\u9805\u76ee\uff0c\u7565\u904e %d \u500b\u3001\u62d2\u7d55 %d \u500b (\u6700\u8fd1\u901f\u7387 %.1f \u500b/\u79d2) NOTE_JEB_IMPORT_CACHE_AND_MEMORY_REPORT_97=\u53ef\u7528\u8a18\u61b6\u9ad4 = %d MB\uff0c\u5feb\u53d6\u907a\u5931\u7387 = %.1f MB/\u9805\u76ee NOTE_JEB_VERIFY_CLEAN_FINAL_STATUS_101=\u5728 %3$d \u79d2\u4e2d\u6aa2\u67e5\u4e86 %1$d \u7b46\u8a18\u9304\uff0c\u627e\u5230 %2$d \u500b\u932f\u8aa4 (\u5e73\u5747\u901f\u7387 %.1f \u500b/\u79d2) INFO_JEB_VERIFY_MULTIPLE_REFERENCE_COUNT_102=\u53c3\u7167\u591a\u500b\u9805\u76ee\u7684\u8a18\u9304\u6578: %d opendj-sdk/opendj3-server-dev/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java
@@ -26,6 +26,14 @@ */ package org.opends.server.backends.jeb.importLDIF; import static com.sleepycat.je.EnvironmentConfig.*; import static org.opends.messages.JebMessages.*; import static org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType.*; import static org.opends.server.util.DynamicConstants.*; import static org.opends.server.util.ServerConstants.*; import static org.opends.server.util.StaticUtils.*; import java.io.*; import java.nio.ByteBuffer; import java.util.*; @@ -47,6 +55,8 @@ import org.opends.server.api.DiskSpaceMonitorHandler; import org.opends.server.backends.jeb.*; import org.opends.server.backends.jeb.RebuildConfig.RebuildMode; import org.opends.server.backends.jeb.RootContainer; import org.opends.server.backends.jeb.VLVIndex; import org.opends.server.core.DirectoryServer; import org.opends.server.extensions.DiskSpaceMonitor; import org.opends.server.types.*; @@ -57,14 +67,6 @@ import com.sleepycat.je.*; import com.sleepycat.util.PackedInteger; import static com.sleepycat.je.EnvironmentConfig.*; import static org.opends.messages.JebMessages.*; import static org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType.*; import static org.opends.server.util.DynamicConstants.*; import static org.opends.server.util.ServerConstants.*; import static org.opends.server.util.StaticUtils.*; /** * This class provides the engine that performs both importing of LDIF files and * the rebuilding of indexes. @@ -874,10 +876,12 @@ logger.info(NOTE_JEB_IMPORT_THREAD_COUNT, threadCount); initializeSuffixes(); setIndexesTrusted(false); long startTime = System.currentTimeMillis(); final long startTime = System.currentTimeMillis(); phaseOne(); isPhaseOneDone = true; long phaseOneFinishTime = System.currentTimeMillis(); final long phaseOneFinishTime = System.currentTimeMillis(); if (!skipDNValidation) { tmpEnv.shutdown(); @@ -886,22 +890,24 @@ { throw new InterruptedException("Import processing canceled."); } long phaseTwoTime = System.currentTimeMillis(); final long phaseTwoTime = System.currentTimeMillis(); phaseTwo(); if (isCanceled) { throw new InterruptedException("Import processing canceled."); } long phaseTwoFinishTime = System.currentTimeMillis(); final long phaseTwoFinishTime = System.currentTimeMillis(); setIndexesTrusted(true); switchContainers(); recursiveDelete(tempDir); long finishTime = System.currentTimeMillis(); long importTime = finishTime - startTime; float rate = 0; final long finishTime = System.currentTimeMillis(); final long importTime = finishTime - startTime; logger.info(NOTE_JEB_IMPORT_PHASE_STATS, importTime / 1000, (phaseOneFinishTime - startTime) / 1000, (phaseTwoFinishTime - phaseTwoTime) / 1000); float rate = 0; if (importTime > 0) { rate = 1000f * reader.getEntriesRead() / importTime; @@ -3779,8 +3785,7 @@ long entriesIgnored = reader.getEntriesIgnored(); long entriesRejected = reader.getEntriesRejected(); float rate = 1000f * deltaCount / deltaTime; logger.info(NOTE_JEB_IMPORT_PROGRESS_REPORT, entriesRead, entriesIgnored, entriesRejected, 0, rate); logger.info(NOTE_JEB_IMPORT_PROGRESS_REPORT, entriesRead, entriesIgnored, entriesRejected, rate); try { Runtime runTime = Runtime.getRuntime(); opendj-sdk/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/RootContainer.java
@@ -36,6 +36,8 @@ import java.io.File; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import org.forgerock.i18n.LocalizableMessage; @@ -73,17 +75,52 @@ public class RootContainer implements ConfigurationChangeListener<PersistitBackendCfg> { private static final class ImportProgress implements Runnable { private final LDIFReader reader; private long previousCount; private long previousTime; public ImportProgress(LDIFReader reader) { this.reader = reader; } @Override public void run() { long latestCount = reader.getEntriesRead() + 0; long deltaCount = latestCount - previousCount; long latestTime = System.currentTimeMillis(); long deltaTime = latestTime - previousTime; if (deltaTime == 0) { return; } long entriesRead = reader.getEntriesRead(); long entriesIgnored = reader.getEntriesIgnored(); long entriesRejected = reader.getEntriesRejected(); float rate = 1000f * deltaCount / deltaTime; logger.info(NOTE_JEB_IMPORT_PROGRESS_REPORT, entriesRead, entriesIgnored, entriesRejected, rate); previousCount = latestCount; previousTime = latestTime; } } private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); private static final int IMPORT_PROGRESS_INTERVAL = 10000; private static final int KB = 1024; /** The JE database environment. */ private PersistItStorage storage; // FIXME JNR do not hardcode here /** The backend configuration. */ private PersistitBackendCfg config; private final File backendDirectory; /** The backend to which this entry root container belongs. */ private final Backend<?> backend; /** The backend configuration. */ private PersistitBackendCfg config; /** The database environment monitor for this JE environment. */ private DatabaseEnvironmentMonitor monitor; @@ -96,9 +133,6 @@ /** The compressed schema manager for this backend. */ private JECompressedSchema compressedSchema; private File backendDirectory; /** * Creates a new RootContainer object. Each root container represents a JE @@ -136,6 +170,8 @@ try { open(); ScheduledThreadPoolExecutor timerService = new ScheduledThreadPoolExecutor(1); try { final LDIFReader reader; @@ -145,12 +181,13 @@ } catch (Exception e) { LocalizableMessage m = ERR_LDIF_BACKEND_CANNOT_CREATE_LDIF_READER.get( stackTraceToSingleLineString(e)); throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), m, e); LocalizableMessage m = ERR_LDIF_BACKEND_CANNOT_CREATE_LDIF_READER.get(stackTraceToSingleLineString(e)); throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), m, e); } long importCount = 0; final long startTime = System.currentTimeMillis(); timerService.scheduleAtFixedRate(new ImportProgress(reader), IMPORT_PROGRESS_INTERVAL, IMPORT_PROGRESS_INTERVAL, TimeUnit.MILLISECONDS); while (true) { final Entry entry; @@ -166,10 +203,8 @@ { if (!le.canContinueReading()) { LocalizableMessage m = ERR_LDIF_BACKEND_ERROR_READING_LDIF .get(stackTraceToSingleLineString(le)); throw new DirectoryException( DirectoryServer.getServerErrorResultCode(), m, le); LocalizableMessage m = ERR_LDIF_BACKEND_ERROR_READING_LDIF.get(stackTraceToSingleLineString(le)); throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), m, le); } continue; } @@ -187,6 +222,7 @@ try { ec.addEntry(entry, null); importCount++; } catch (DirectoryException e) { @@ -213,12 +249,26 @@ } } } return new LDIFImportResult(reader.getEntriesRead(), reader.getEntriesRejected(), reader.getEntriesIgnored()); final long finishTime = System.currentTimeMillis(); waitForShutdown(timerService); final long importTime = finishTime - startTime; float rate = 0; if (importTime > 0) { rate = 1000f * reader.getEntriesRead() / importTime; } logger.info(NOTE_JEB_IMPORT_FINAL_STATUS, reader.getEntriesRead(), importCount, reader.getEntriesIgnored(), reader.getEntriesRejected(), 0, importTime / 1000, rate); return new LDIFImportResult(reader.getEntriesRead(), reader.getEntriesRejected(), reader.getEntriesIgnored()); } finally { close(); // if not already stopped, then stop it waitForShutdown(timerService); } } catch (DirectoryException e) @@ -229,17 +279,21 @@ catch (OpenDsException e) { logger.traceException(e); throw new DirectoryException(getServerErrorResultCode(), e.getMessageObject()); throw new DirectoryException(getServerErrorResultCode(), e.getMessageObject()); } catch (Exception e) { logger.traceException(e); throw new DirectoryException(getServerErrorResultCode(), LocalizableMessage.raw(e.getMessage())); throw new DirectoryException(getServerErrorResultCode(), LocalizableMessage.raw(e.getMessage())); } } private void waitForShutdown(ScheduledThreadPoolExecutor timerService) throws InterruptedException { timerService.shutdown(); timerService.awaitTermination(20, TimeUnit.SECONDS); } private void removeFiles() throws StorageRuntimeException { if (!backendDirectory.isDirectory())