Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
adapt
ace
Commits
5a7c41f0
Commit
5a7c41f0
authored
Apr 04, 2017
by
Michael Ritter
Browse files
Update items if an audit fails; log the type of audit failure
parent
68528448
Changes
1
Show whitespace changes
Inline
Side-by-side
ace-am/src/main/java/edu/umiacs/ace/monitor/audit/AuditThread.java
View file @
5a7c41f0
...
...
@@ -348,7 +348,6 @@ public final class AuditThread extends Thread implements CancelCallback {
private
void
performAudit
()
{
// 1. Setup audit
//TODO Clean up filtering creation
PathFilter
filter
=
new
SimpleFilter
(
coll
);
Date
startDate
=
new
Date
();
...
...
@@ -400,6 +399,10 @@ public final class AuditThread extends Thread implements CancelCallback {
iterableItems
.
cancel
();
}
// 4. Clean up, set local inactive
lastFileSeen
=
"looking for missed items"
;
setInactiveBefore
(
startDate
);
if
(
cancel
||
abortException
!=
null
)
{
return
;
}
...
...
@@ -412,14 +415,9 @@ public final class AuditThread extends Thread implements CancelCallback {
batch
=
null
;
}
// 4. Clean up, set local inactive
lastFileSeen
=
"looking for missed items"
;
setInactiveBefore
(
startDate
);
// harvest remote collections
lastFileSeen
=
"comparing to peer sites"
;
compareToPeers
();
}
private
void
generateAuditReport
()
{
...
...
@@ -451,7 +449,7 @@ public final class AuditThread extends Thread implements CancelCallback {
if
(
abortException
instanceof
InterruptedException
||
abortException
.
getCause
()
instanceof
InterruptedException
)
{
LOG
.
trace
(
"Audit ending with Interrupt"
);
logManager
.
persistCollectionEvent
(
LogEnum
.
FILE_AUDIT_
FINISH
,
logManager
.
persistCollectionEvent
(
LogEnum
.
FILE_AUDIT_
ABORT
,
"Audit Interrupted"
,
em
);
}
else
{
LOG
.
error
(
"Uncaught exception in audit thread"
,
abortException
);
...
...
@@ -459,12 +457,12 @@ public final class AuditThread extends Thread implements CancelCallback {
String
message
=
Strings
.
exceptionAsString
(
abortException
);
logManager
.
persistCollectionEvent
(
LogEnum
.
SYSTEM_ERROR
,
message
,
em
);
logManager
.
persistCollectionEvent
(
LogEnum
.
FILE_AUDIT_
FINISH
,
logManager
.
persistCollectionEvent
(
LogEnum
.
FILE_AUDIT_
ABORT
,
"Uncaught audit thread exception "
,
em
);
}
}
else
if
(
cancel
)
{
logManager
.
persistCollectionEvent
(
LogEnum
.
FILE_AUDIT_
FINISH
,
logManager
.
persistCollectionEvent
(
LogEnum
.
FILE_AUDIT_
CANCEL
,
"Audit interrupted by user or token registration"
,
em
);
LOG
.
trace
(
"Audit ending on cancel request"
);
}
else
{
...
...
@@ -746,7 +744,7 @@ public final class AuditThread extends Thread implements CancelCallback {
}
private
void
setInactiveBefore
(
Date
d
)
{
if
(
baseItemPathList
!=
null
||
cancel
||
abortException
!=
null
)
{
if
(
baseItemPathList
!=
null
)
{
return
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment