Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HdbTdbArchivingServers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango controls archiving
HdbTdbArchivingServers
Commits
fdc63bbd
Commit
fdc63bbd
authored
8 months ago
by
gwen-soleil
Browse files
Options
Downloads
Patches
Plain Diff
add logging
parent
d6b1d008
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
hdbarchiver/src/main/java/org/tango/archiving/collector/mode/ArchivingContextList.java
+11
-7
11 additions, 7 deletions
.../tango/archiving/collector/mode/ArchivingContextList.java
with
11 additions
and
7 deletions
hdbarchiver/src/main/java/org/tango/archiving/collector/mode/ArchivingContextList.java
+
11
−
7
View file @
fdc63bbd
package
org.tango.archiving.collector.mode
;
import
fr.soleil.tango.archiving.infra.tango.ArchivingConfig
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.Collection
;
import
java.util.HashSet
;
...
...
@@ -9,28 +11,30 @@ import java.util.Set;
import
java.util.concurrent.ConcurrentHashMap
;
public
class
ArchivingContextList
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ArchivingContextList
.
class
);
private
final
Map
<
Integer
,
ArchivingContext
>
contextList
=
new
ConcurrentHashMap
<>();
public
final
Set
<
String
>
pauseContext
(
int
contextId
)
{
Set
<
String
>
attributes
=
new
HashSet
<>();
if
(
contextList
.
containsKey
(
contextId
))
{
ArchivingContext
context
=
contextList
.
get
(
contextId
);
context
.
setActive
(
true
);
return
context
.
getAttributeConfigMap
().
keySet
();
}
else
{
return
new
HashSet
<>();
attributes
=
context
.
getAttributeConfigMap
().
keySet
();
logger
.
debug
(
"pausing context {} for {}"
,
contextList
,
attributes
);
}
return
attributes
;
}
public
final
Collection
<
ArchivingConfig
>
resumeContext
(
int
contextId
)
{
Collection
<
ArchivingConfig
>
attributes
=
new
HashSet
<>();
if
(
contextList
.
containsKey
(
contextId
))
{
ArchivingContext
context
=
contextList
.
get
(
contextId
);
context
.
setActive
(
false
);
return
context
.
getAttributeConfigMap
().
values
();
}
else
{
return
new
HashSet
<>();
attributes
=
context
.
getAttributeConfigMap
().
values
();
logger
.
debug
(
"resuming context {} for {}"
,
contextList
,
attributes
);
}
return
attributes
;
}
public
final
void
removeAttribute
(
String
attributeName
)
{
...
...
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