Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
935d0ab6
Commit
935d0ab6
authored
5 years ago
by
Ashutosh Mestry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3796: Status Reporter display fix.
parent
d8cb94ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
StatusReporter.java
intg/src/main/java/org/apache/atlas/pc/StatusReporter.java
+9
-1
StatusReporterTest.java
...src/test/java/org/apache/atlas/pc/StatusReporterTest.java
+3
-0
No files found.
intg/src/main/java/org/apache/atlas/pc/StatusReporter.java
View file @
935d0ab6
...
@@ -98,7 +98,7 @@ public class StatusReporter<T, U> {
...
@@ -98,7 +98,7 @@ public class StatusReporter<T, U> {
private
U
acknowledged
(
Map
.
Entry
<
T
,
U
>
lookFor
)
{
private
U
acknowledged
(
Map
.
Entry
<
T
,
U
>
lookFor
)
{
U
ack
=
lookFor
.
getValue
();
U
ack
=
lookFor
.
getValue
();
producedItems
.
remove
(
lookFor
.
getKey
());
producedItems
.
remove
(
lookFor
.
getKey
());
processedSet
.
remove
(
lookFor
);
processedSet
.
remove
(
lookFor
.
getKey
()
);
return
ack
;
return
ack
;
}
}
...
@@ -107,4 +107,12 @@ public class StatusReporter<T, U> {
...
@@ -107,4 +107,12 @@ public class StatusReporter<T, U> {
lastAck
=
System
.
currentTimeMillis
();
lastAck
=
System
.
currentTimeMillis
();
return
b
;
return
b
;
}
}
public
int
getProducedCount
()
{
return
this
.
producedItems
.
size
();
}
public
int
getProcessedCount
()
{
return
this
.
processedSet
.
size
();
}
}
}
This diff is collapsed.
Click to expand it.
intg/src/test/java/org/apache/atlas/pc/StatusReporterTest.java
View file @
935d0ab6
...
@@ -82,6 +82,9 @@ public class StatusReporterTest {
...
@@ -82,6 +82,9 @@ public class StatusReporterTest {
extractResults
(
wi
,
statusReporter
);
extractResults
(
wi
,
statusReporter
);
assertEquals
(
statusReporter
.
ack
().
intValue
(),
(
maxItems
-
1
));
assertEquals
(
statusReporter
.
ack
().
intValue
(),
(
maxItems
-
1
));
wi
.
shutdown
();
wi
.
shutdown
();
assertEquals
(
statusReporter
.
getProducedCount
(),
0
);
assertEquals
(
statusReporter
.
getProcessedCount
(),
0
);
}
}
private
void
extractResults
(
WorkItemManager
<
Integer
,
WorkItemConsumer
>
wi
,
StatusReporter
<
Integer
,
Integer
>
statusReporter
)
{
private
void
extractResults
(
WorkItemManager
<
Integer
,
WorkItemConsumer
>
wi
,
StatusReporter
<
Integer
,
Integer
>
statusReporter
)
{
...
...
This diff is collapsed.
Click to expand it.
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