Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
ff901e61
Commit
ff901e61
authored
7 years ago
by
gakin
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-5161 : Better verbose logging for attachments
SVN: 38209
parent
5b8ab7b8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/EntitySynchronizer.java
+14
-13
14 additions, 13 deletions
...ugins/sync/harvester/synchronizer/EntitySynchronizer.java
with
14 additions
and
13 deletions
datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/EntitySynchronizer.java
+
14
−
13
View file @
ff901e61
...
...
@@ -239,11 +239,11 @@ public class EntitySynchronizer
verboseLogEntityOperations
(
builder
.
getDetails
());
}
//
MultiKeyMap<String, String> newEntities = new MultiKeyMap<String, String>();
MultiKeyMap
<
String
,
String
>
newEntities
=
new
MultiKeyMap
<
String
,
String
>();
if
(
config
.
isDryRun
()
==
false
)
{
AtomicEntityOperationResult
operationResult
=
service
.
performEntityOperations
(
builder
.
getDetails
());
//
newEntities = getNewEntities(builder);
newEntities
=
getNewEntities
(
builder
);
operationLog
.
info
(
"Entity operation result: "
+
operationResult
);
}
operationLog
.
info
(
"\n"
);
...
...
@@ -253,8 +253,9 @@ public class EntitySynchronizer
if
(
config
.
isVerbose
())
{
verboseLogProcessAttachments
(
attachmentHoldersToProcess
);
//
newEntities
verboseLogProcessAttachments
(
attachmentHoldersToProcess
,
newEntities
);
}
List
<
String
>
notSyncedAttachmentsHolders
=
new
ArrayList
<
String
>();
if
(
config
.
isDryRun
()
==
false
)
{
...
...
@@ -348,22 +349,22 @@ public class EntitySynchronizer
}
}
private
void
verboseLogProcessAttachments
(
List
<
IncomingEntity
<?>>
attachmentHoldersToProcess
)
//
MultiKeyMap<String, String> newEntities
private
void
verboseLogProcessAttachments
(
List
<
IncomingEntity
<?>>
attachmentHoldersToProcess
,
MultiKeyMap
<
String
,
String
>
newEntities
)
{
if
(
attachmentHoldersToProcess
.
isEmpty
()
==
false
)
{
operationLog
.
info
(
"-------Attachments for the following entities will be processed-------"
);
for
(
IncomingEntity
<?>
holder
:
attachmentHoldersToProcess
)
{
//
// the following is done to not list holders in the log when they are just being created and have no attachments
//
// updated ones will logged because the attachments might have been deleted.
//
if (newEntities.containsKey(holder.getEntityKind().getLabel(), holder.getPermID()) == true)
//
{
//
if (holder.hasAttachments() == false)
//
{
//
continue;
//
}
//
}
// the following is done to not list holders in the log when they are just being created and have no attachments
// updated ones will logged because the attachments might have been deleted.
if
(
newEntities
.
containsKey
(
holder
.
getEntityKind
().
getLabel
(),
holder
.
getPermID
())
==
true
)
{
if
(
holder
.
hasAttachments
()
==
false
)
{
continue
;
}
}
operationLog
.
info
(
holder
.
getIdentifer
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment