Revision 37bd2647
Added by Katja Luther about 12 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiDescriptionExport.java | ||
---|---|---|
43 | 43 |
import eu.etaxonomy.cdm.io.common.mapping.out.DbTextDataMapper; |
44 | 44 |
import eu.etaxonomy.cdm.io.common.mapping.out.IdMapper; |
45 | 45 |
import eu.etaxonomy.cdm.io.common.mapping.out.MethodMapper; |
46 |
//import eu.etaxonomy.cdm.io.profiler.ProfilerController; |
|
46 | 47 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
47 | 48 |
import eu.etaxonomy.cdm.model.common.Extension; |
48 | 49 |
import eu.etaxonomy.cdm.model.common.ExtensionType; |
... | ... | |
60 | 61 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
61 | 62 |
import eu.etaxonomy.cdm.model.location.TdwgArea; |
62 | 63 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
63 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
64 |
|
|
64 | 65 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
65 | 66 |
/** |
66 | 67 |
* The export class for {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase DescriptionElements}.<p> |
... | ... | |
191 | 192 |
logger.info("Started new transaction. Fetching some " + pluralString + " (max: " + limit + ") ..."); |
192 | 193 |
List<String> propPath = Arrays.asList(new String[]{"descriptions.elements.*"}); |
193 | 194 |
|
195 |
logger.warn("Start snapshot, before starting loop"); |
|
196 |
//ProfilerController.memorySnapshot(); |
|
194 | 197 |
//taxon descriptions |
195 | 198 |
int partitionCount = 0; |
196 | 199 |
while ((list = getNextTaxonPartition(Taxon.class, limit, partitionCount++, propPath )) != null ) { |
197 | 200 |
|
198 | 201 |
logger.info("Fetched " + list.size() + " " + pluralString + ". Exporting..."); |
199 |
|
|
202 |
logger.warn("Start snapshot, beginning of loop, fetched " + list.size() + " " + pluralString); |
|
203 |
//ProfilerController.memorySnapshot(); |
|
200 | 204 |
|
201 | 205 |
for (Taxon taxon : list) { |
202 | 206 |
countTaxa++; |
... | ... | |
213 | 217 |
// Start transaction |
214 | 218 |
txStatus = startTransaction(true); |
215 | 219 |
logger.info("Started new transaction. Fetching some " + pluralString + " (max: " + limit + ") for description import ..."); |
220 |
logger.warn("Start snapshot, end of loop"); |
|
221 |
//ProfilerController.memorySnapshot(); |
|
216 | 222 |
} |
217 | 223 |
|
218 | 224 |
// //name descriptions |
... | ... | |
254 | 260 |
logger.info("Others: " + countOthers); |
255 | 261 |
|
256 | 262 |
} |
263 |
|
|
264 |
list = null; |
|
257 | 265 |
// Commit transaction |
258 | 266 |
commitTransaction(txStatus); |
259 | 267 |
logger.debug("Committed transaction."); |
... | ... | |
449 | 457 |
if (taxonNameList.size() == 0) { |
450 | 458 |
logger.info("No names left to fetch."); |
451 | 459 |
} |
460 |
taxonNameList = null; |
|
452 | 461 |
// Commit transaction |
453 | 462 |
commitTransaction(txStatus); |
454 | 463 |
logger.debug("Committed transaction."); |
Also available in: Unified diff
fixes in PESI-Export