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
bf2deaa0
Commit
bf2deaa0
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[EOS-CTA] Makes Catalogue,Backend,Scheduler,Log Context members of Service Provider
parent
ab6350d5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xroot_plugins/XrdSsiCtaServiceProvider.cpp
+10
-7
10 additions, 7 deletions
xroot_plugins/XrdSsiCtaServiceProvider.cpp
xroot_plugins/XrdSsiCtaServiceProvider.hpp
+10
-6
10 additions, 6 deletions
xroot_plugins/XrdSsiCtaServiceProvider.hpp
with
20 additions
and
13 deletions
xroot_plugins/XrdSsiCtaServiceProvider.cpp
+
10
−
7
View file @
bf2deaa0
...
...
@@ -24,7 +24,6 @@
#include
"rdbms/Login.hpp"
#include
"catalogue/CatalogueFactory.hpp"
#include
"common/Configuration.hpp"
#include
"scheduler/OStoreDB/OStoreDBWithAgent.hpp"
#include
"objectstore/BackendFactory.hpp"
#include
"objectstore/BackendPopulator.hpp"
#include
"common/log/StdoutLogger.hpp"
...
...
@@ -59,21 +58,25 @@ bool XrdSsiCtaServiceProvider::Init(XrdSsiLogger *logP, XrdSsiCluster *clsP, con
std
::
cout
<<
"[DEBUG] Called Init("
<<
cfgFn
<<
","
<<
parms
<<
")"
<<
std
::
endl
;
#endif
// Instantiate the catalogue
const
cta
::
rdbms
::
Login
catalogueLogin
=
cta
::
rdbms
::
Login
::
parseFile
(
"/etc/cta/cta_catalogue_db.conf"
);
const
uint64_t
nbConns
=
10
;
const
uint64_t
nbArchiveFileListingConns
=
2
;
std
::
unique_ptr
<
cta
::
catalogue
::
Catalogue
>
my_catalogue
=
cta
::
catalogue
::
CatalogueFactory
::
create
(
catalogueLogin
,
nbConns
,
nbArchiveFileListingConns
);
m_catalogue_ptr
=
cta
::
catalogue
::
CatalogueFactory
::
create
(
catalogueLogin
,
nbConns
,
nbArchiveFileListingConns
);
// Instantiate the backend
cta
::
common
::
Configuration
ctaConf
(
"/etc/cta/cta-frontend.conf"
);
std
::
string
backend_str
=
ctaConf
.
getConfEntString
(
"ObjectStore"
,
"BackendPath"
,
nullptr
);
std
::
unique_ptr
<
cta
::
objectstore
::
Backend
>
backend
(
cta
::
objectstore
::
BackendFactory
::
createBackend
(
backend_str
));
cta
::
objectstore
::
BackendPopulator
backendPopulator
(
*
backend
,
"Frontend"
);
cta
::
OStoreDBWithAgent
scheddb
(
*
backend
,
backendPopulator
.
getAgentReference
());
m_backend_ptr
=
cta
::
objectstore
::
BackendFactory
::
createBackend
(
backend_str
);
// Instantiate the scheduler
m_scheduler_ptr
=
cta
::
make_unique
<
cta
::
Scheduler
>
(
*
my_catalogue
,
scheddb
,
5
,
2
*
1000
*
1000
);
cta
::
objectstore
::
BackendPopulator
backendPopulator
(
*
m_backend_ptr
,
"Frontend"
);
cta
::
OStoreDBWithAgent
scheddb
(
*
m_backend_ptr
,
backendPopulator
.
getAgentReference
());
m_scheduler_ptr
=
cta
::
make_unique
<
cta
::
Scheduler
>
(
*
m_catalogue_ptr
,
scheddb
,
5
,
2
*
1000
*
1000
);
// Instantiate the logger
...
...
This diff is collapsed.
Click to expand it.
xroot_plugins/XrdSsiCtaServiceProvider.hpp
+
10
−
6
View file @
bf2deaa0
...
...
@@ -20,7 +20,9 @@
#define __XRD_SSI_CTA_SERVICE_PROVIDER_H
#include
<XrdSsi/XrdSsiProvider.hh>
#include
"scheduler/Scheduler.hpp"
#include
"scheduler/OStoreDB/OStoreDBWithAgent.hpp"
...
...
@@ -71,20 +73,22 @@ public:
XrdSsiProvider
::
rStat
QueryResource
(
const
char
*
rName
,
const
char
*
contact
=
0
)
override
;
/*!
* Get a reference to the
Log Context
for this Service
* Get a reference to the
Scheduler
for this Service
*/
cta
::
log
::
LogContext
&
getLogContext
()
{
return
*
m_
log_context
_ptr
;
}
cta
::
Scheduler
&
getScheduler
()
{
return
*
m_
scheduler
_ptr
;
}
/*!
* Get a reference to the
Scheduler
for this Service
* Get a reference to the
Log Context
for this Service
*/
cta
::
Scheduler
&
getScheduler
()
{
return
*
m_
scheduler
_ptr
;
}
cta
::
log
::
LogContext
&
getLogContext
()
{
return
*
m_
log_context
_ptr
;
}
private
:
std
::
unique_ptr
<
cta
::
log
::
LogContext
>
m_log_context_ptr
;
//!< Log Context for this Service
std
::
unique_ptr
<
cta
::
Scheduler
>
m_scheduler_ptr
;
//!< Scheduler for this Service
std
::
unique_ptr
<
cta
::
catalogue
::
Catalogue
>
m_catalogue_ptr
;
//!< Catalogue for the Service
std
::
unique_ptr
<
cta
::
objectstore
::
Backend
>
m_backend_ptr
;
//!< Backend for the Service
std
::
unique_ptr
<
cta
::
Scheduler
>
m_scheduler_ptr
;
//!< Scheduler for the Service
std
::
unique_ptr
<
cta
::
log
::
LogContext
>
m_log_context_ptr
;
//!< Log Context for the Service
};
#endif
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