-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SO-2127 snomed rf2 importer issues #122
Merged
Merged
Changes from 9 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
54b1ff8
SO-2127: fixing issues with RF2 importer
cmark 3fe1824
SO-1782: store taxonomy defect information in data objects...
cmark 0a46423
SO-2127: fix NPE when getting datatype for cd member rows
cmark c44cee9
SO-2127: skip cycle detection during import
cmark df2aa25
SO-2127: improve performance of in-memory ID service
cmark ce44373
SO-2127: extract relevant taxonomy information for nodes and edges...
cmark fb31a71
SO-2127: support bulk methods in import time component lookup impls
cmark 7ebd046
SO-2127: refactor RF2 importer to support batch processing
cmark 9613dd5
SO-2127: disable error reporting functionality
cmark 923c222
SO-2127: batch RF2 processing improvements
cmark d38dcf8
SO-2127: get temp CDOResource outside the for loop (lang.refset import)
cmark 0f9b4a1
SO-2127: remove unnecessary setId calls from member importers
cmark 6de7228
Merge remote-tracking branch 'origin/develop' into issue/SO-2127-snom…
cmark 51b9bc3
SO-2127: fix concrete domain member index entry building
cmark 0331d77
SO-2127: use log message arguments instead of string concatenation
cmark c59ecd7
SO-2127: run index purge/optimize before creating version...
cmark 9b96893
SO-2127: remove commit notification from notification queue
cmark a01efba
SO-2127: enqueue commit notifications when enabled in tx context
cmark 59e33b5
SO-2127: remove temporary resource form lang. refset importer
cmark 35eefec
SO-2127: change importer logger names to snomed.importer.rf2
cmark f7a3f56
SO-2127: reduce document load times during import
cmark 8934bf7
SO-2127: rename constant from ON to TAB_SPLITTER
cmark 07770db
SO-2127: fix comments in import time lookup services
cmark d2f5bce
SO-2127: include stack trace in log messages
cmark d3e48b6
SO-2127: use rows.clear instead of recreating List instance
cmark 4105458
SO-2127: simplify processing of rows
cmark e3e04ed
SO-2127: rename component creation template methods
cmark efecf53
SO-2127: generate available identifiers in bulk load method for symmetry
cmark 1b80174
SO-2127: avoid setting core component identifier twice
cmark b780da1
SO-2127: rename field extended to hasMapTargetDescription
cmark File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -403,7 +403,7 @@ private CellProcessor[] createValidatingCellProcessors() { | |
} | ||
|
||
private ImportAction handlePreImportException(final SuperCSVException e) { | ||
log("Exception caught while reading release file. Continuing with next row. {}", e.getMessage()); | ||
log("Exception caught while reading release file. Continuing with next row.", e); | ||
importContext.getLogger().warn("Exception caught while reading release file. Continuing with next row.", e); | ||
return ImportAction.CONTINUE; | ||
} | ||
|
@@ -437,7 +437,7 @@ private ComponentImportEntry getOrCreateImportEntry(final Map<String, ComponentI | |
try { | ||
sliceStream = new FileOutputStream(sliceFile); | ||
} catch (final FileNotFoundException e) { | ||
log("SNOMED CT import failed. Couldn't open output file '{}' for writing. {}", sliceFile.getAbsolutePath(), e.getMessage()); | ||
log("SNOMED CT import failed. Couldn't open output file '{}' for writing.", sliceFile.getAbsolutePath(), e); | ||
throw new ImportException("Couldn't open output file '" + sliceFile.getAbsolutePath() + "' for writing.", e); | ||
} | ||
|
||
|
@@ -534,7 +534,7 @@ public final void doImport(final SubMonitor subMonitor, final AbstractImportUnit | |
// process batch loaded rows and commit them | ||
importRows(rows); | ||
// reinit rows array | ||
rows = Lists.newArrayListWithExpectedSize(COMMIT_EVERY_NUM_ELEMENTS); | ||
rows.clear(); | ||
if (ImportAction.BREAK.equals(commit(subMonitor, effectiveTimeKey))) { | ||
break; | ||
} | ||
|
@@ -557,8 +557,9 @@ protected int getImportWorkUnits(final int recordCount) { | |
} | ||
|
||
private ImportAction handleImportException(final Throwable e) { | ||
log("Exception caught while importing row from release file. Continuing with next row. {}", e.getMessage()); | ||
importContext.getLogger().warn("Exception caught while importing row from release file. Continuing with next row.", e); | ||
final String message = "Exception caught while importing row from release file. Continuing with next row."; | ||
log(message, e); | ||
importContext.getLogger().warn(message, e); | ||
return ImportAction.CONTINUE; | ||
} | ||
|
||
|
@@ -633,13 +634,13 @@ protected void preCommit(final InternalCDOTransaction transaction) throws Snowow | |
} | ||
|
||
private ImportAction checkCommitException(final SnowowlServiceException e) { | ||
log("SNOMED CT import failed. Caught exception while import, aborting. {}", e.getMessage()); | ||
log("SNOMED CT import failed. Caught exception while import, aborting. {}", e); | ||
importContext.getLogger().warn("Caught exception while import, aborting.", e); | ||
return ImportAction.BREAK; | ||
} | ||
|
||
private ImportAction checkCommitException(final CommitException e) { | ||
log("SNOMED CT import failed. Caught exception while import, aborting. {}", e.getMessage()); | ||
log("SNOMED CT import failed. Caught exception while import, aborting. {}", e); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (also here) |
||
importContext.getLogger().warn("Caught exception while import, aborting.", e); | ||
handleCommitException(); | ||
return ImportAction.BREAK; | ||
|
@@ -665,10 +666,9 @@ private final void importRows(List<T> rows) { | |
final Map<String, C> existingComponents = loadComponents(rowsToImport.keySet()).stream().collect(Collectors.toMap(getComponentIdMapper(), c -> c)); | ||
// create or update components | ||
final Collection<C> componentsToAttach = newHashSet(); | ||
for (Entry<String, T> rowToImport : rowsToImport.entrySet()) { | ||
final String componentId = rowToImport.getKey(); | ||
for (final String componentId : rowsToImport.keySet()) { | ||
final T row = rowsToImport.get(componentId); | ||
C component = existingComponents.get(componentId); | ||
final T row = rowToImport.getValue(); | ||
if (component == null) { | ||
// XXX some RF2 rows might already introduced the component with just the ID | ||
component = getOrCreateNew(componentId, componentsToAttach); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder should be removed from this format string.