Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
cb707179
Commit
cb707179
authored
Nov 05, 2015
by
Eric Cano
Browse files
Added missing support for BackendFactory in CTA xroot plugin.
parent
c08adc26
Changes
2
Hide whitespace changes
Inline
Side-by-side
xroot_plugins/XrdCtaFilesystem.cpp
View file @
cb707179
...
...
@@ -39,6 +39,7 @@
#include
"XrdSec/XrdSecEntity.hh"
#include
"XrdVersion.hh"
#include
"objectstore/RootEntry.hpp"
#include
"objectstore/BackendFactory.hpp"
#include
<memory>
#include
<iostream>
...
...
@@ -257,12 +258,18 @@ void XrdProFilesystem::EnvInfo(XrdOucEnv *envP)
XrdProFilesystem
::
XrdProFilesystem
()
:
m_ns
(
castor
::
common
::
CastorConfiguration
::
getConfig
().
getConfEntString
(
"TapeServer"
,
"MockNameServerPath"
)),
m_remoteStorage
(
castor
::
common
::
CastorConfiguration
::
getConfig
().
getConfEntString
(
"TapeServer"
,
"EOSRemoteHostAndPort"
)),
m_backend
(
castor
::
common
::
CastorConfiguration
::
getConfig
().
getConfEntString
(
"TapeServer"
,
"ObjectStoreBackendPath"
)),
m_backendPopulator
(
m_backend
),
m_scheddb
(
m_backend
,
m_backendPopulator
.
getAgent
()),
m_backend
(
cta
::
objectstore
::
BackendFactory
::
createBackend
(
castor
::
common
::
CastorConfiguration
::
getConfig
().
getConfEntString
(
"TapeServer"
,
"ObjectStoreBackendPath"
))
.
release
()),
m_backendPopulator
(
*
m_backend
),
m_scheddb
(
*
m_backend
,
m_backendPopulator
.
getAgent
()),
m_scheduler
(
m_ns
,
m_scheddb
,
m_remoteStorage
)
{
m_backend
.
noDeleteOnExit
();
// If the backend is a VFS, make sure we don't delete it on exit.
// If not, nevermind.
try
{
dynamic_cast
<
cta
::
objectstore
::
BackendVFS
&>
(
*
m_backend
).
noDeleteOnExit
();
}
catch
(
std
::
bad_cast
&
){}
const
cta
::
SecurityIdentity
bootstrap_requester
;
try
{
m_scheduler
.
createAdminUserWithoutAuthorizingRequester
(
bootstrap_requester
,
cta
::
UserIdentity
(
getuid
(),
getgid
()),
"Bootstrap operator"
);
...
...
xroot_plugins/XrdCtaFilesystem.hpp
View file @
cb707179
...
...
@@ -72,7 +72,7 @@ protected:
/**
* The VFS backend for the objectstore DB
*/
cta
::
objectstore
::
Backend
VFS
m_backend
;
std
::
unique_ptr
<
cta
::
objectstore
::
Backend
>
m_backend
;
/**
* The object used to populate the backend
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment