Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
b40274e8
Commit
b40274e8
authored
7 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Added Scheduler::checkAndGetNextArchiveFileId()
parent
17506630
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scheduler/Scheduler.cpp
+21
-0
21 additions, 0 deletions
scheduler/Scheduler.cpp
scheduler/Scheduler.hpp
+22
-0
22 additions, 0 deletions
scheduler/Scheduler.hpp
with
43 additions
and
0 deletions
scheduler/Scheduler.cpp
+
21
−
0
View file @
b40274e8
...
...
@@ -84,6 +84,27 @@ void Scheduler::authorizeAdmin(const common::dataStructures::SecurityIdentity &c
lc
.
log
(
log
::
INFO
,
"In Scheduler::authorizeAdmin(): success."
);
}
//------------------------------------------------------------------------------
// checkAndGetNextArchiveFileId
//------------------------------------------------------------------------------
uint64_t
Scheduler
::
checkAndGetNextArchiveFileId
(
const
std
::
string
&
instanceName
,
const
std
::
string
&
storageClassName
,
const
common
::
dataStructures
::
UserIdentity
&
user
,
log
::
LogContext
&
lc
)
{
cta
::
utils
::
Timer
t
;
const
uint64_t
archiveFileId
=
m_catalogue
.
checkAndGetNextArchiveFileId
(
instanceName
,
storageClassName
,
user
);
const
auto
catalogueTime
=
t
.
secs
();
const
auto
schedulerDbTime
=
catalogueTime
;
log
::
ScopedParamContainer
spc
(
lc
);
spc
.
add
(
"instanceName"
,
instanceName
)
.
add
(
"storageClass"
,
storageClassName
)
.
add
(
"fileId"
,
archiveFileId
)
.
add
(
"catalogueTime"
,
catalogueTime
)
.
add
(
"schedulerDbTime"
,
schedulerDbTime
);
lc
.
log
(
log
::
INFO
,
"Checked request and got next archive file ID"
);
return
archiveFileId
;
}
//------------------------------------------------------------------------------
// queueArchive
//------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
scheduler/Scheduler.hpp
+
22
−
0
View file @
b40274e8
...
...
@@ -87,6 +87,28 @@ public:
*/
void
ping
(
log
::
LogContext
&
lc
);
/**
* Checks the specified archival could take place and returns a new and
* unique archive file identifier that can be used by a new archive file
* within the catalogue.
*
* @param diskInstanceName The name of the disk instance to which the
* storage class belongs.
* @param storageClassName The name of the storage class of the file to be
* archived. The storage class name is only guaranteed to be unique within
* its disk instance. The storage class name will be used by the Catalogue
* to determine the destination tape pool for each tape copy.
* @param user The user for whom the file is to be archived. This will be
* used by the Catalogue to determine the mount policy to be used when
* archiving the file.
* @return The new archive file identifier.
*/
uint64_t
checkAndGetNextArchiveFileId
(
const
std
::
string
&
diskInstanceName
,
const
std
::
string
&
storageClassName
,
const
common
::
dataStructures
::
UserIdentity
&
user
,
log
::
LogContext
&
lc
);
/**
* Queue an archive request and return the CTA file ID.
* Throws a UserError exception in case of wrong request parameters (ex. no route to tape)
...
...
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