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
8f580dc7
Commit
8f580dc7
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
Integrates submodule v0.7
parent
48715a52
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmdline/CtaAdminCmd.cpp
+7
-21
7 additions, 21 deletions
cmdline/CtaAdminCmd.cpp
cmdline/CtaAdminCmd.hpp
+6
-6
6 additions, 6 deletions
cmdline/CtaAdminCmd.hpp
xrootd-ssi-protobuf-interface
+1
-1
1 addition, 1 deletion
xrootd-ssi-protobuf-interface
with
14 additions
and
28 deletions
cmdline/CtaAdminCmd.cpp
+
7
−
21
View file @
8f580dc7
...
...
@@ -141,7 +141,6 @@ CtaAdminCmd::CtaAdminCmd(int argc, const char *const *const argv) :
void
CtaAdminCmd
::
send
()
const
{
// Validate the Protocol Buffer
try
{
validateCmd
(
m_request
.
admincmd
());
}
catch
(
std
::
runtime_error
&
ex
)
{
...
...
@@ -149,22 +148,23 @@ void CtaAdminCmd::send() const
}
// Get socket address of CTA Frontend endpoint
cta
::
cmdline
::
Configuration
cliConf
(
"/etc/cta/cta-cli.conf"
);
std
::
string
endpoint
=
cliConf
.
getFrontendHostAndPort
();
// Obtain a Service Provider
// Set configuration options
XrdSsiPb
::
Config
config
;
config
.
set
(
"response_bufsize"
,
StreamBufferSize
);
config
.
set
(
"request_timeout"
,
DefaultRequestTimeout
);
config
.
getEnv
(
"request_timeout"
,
"XRD_REQUESTTIMEOUT"
);
XrdSsiPbServiceType
cta_service
(
endpoint
,
Resource
,
StreamBufferSize
,
GetRequestTimeout
());
// Obtain a Service Provider
XrdSsiPbServiceType
cta_service
(
endpoint
,
Resource
,
config
);
// Send the Request to the Service and get a Response
cta
::
xrd
::
Response
response
;
auto
stream_future
=
cta_service
.
Send
(
m_request
,
response
);
// Handle responses
switch
(
response
.
type
())
{
using
namespace
cta
::
xrd
;
...
...
@@ -288,20 +288,6 @@ void CtaAdminCmd::throwUsage(const std::string &error_txt) const
throw
std
::
runtime_error
(
help
.
str
());
}
int
CtaAdminCmd
::
GetRequestTimeout
()
const
{
const
char
*
request_timeout_str
=
::
getenv
(
"XRD_REQUESTTIMEOUT"
);
int
request_timeout
=
request_timeout_str
==
nullptr
?
DefaultRequestTimeout
:
atoi
(
request_timeout_str
);
// Use default if XRD_REQUESTTIMEOUT is not a valid positive integer
if
(
request_timeout
<=
0
)
request_timeout
=
DefaultRequestTimeout
;
return
request_timeout
;
}
}}
// namespace cta::admin
...
...
This diff is collapsed.
Click to expand it.
cmdline/CtaAdminCmd.hpp
+
6
−
6
View file @
8f580dc7
...
...
@@ -58,13 +58,13 @@ private:
/*
* Member variables
*/
const
std
::
string
Resource
=
"/ctafrontend"
;
//!< XRootD SSI Resource name
const
in
t
StreamBufferSize
=
1024
;
//!< Buffer size for Data/Stream Responses
const
in
t
DefaultRequestTimeout
=
10
;
//!< Default Request Timeout. Can be overridden by
//!< XRD_REQUESTTIMEOUT environment variable.
const
std
::
string
Resource
=
"/ctafrontend"
;
//!< XRootD SSI Resource name
const
std
::
str
in
g
StreamBufferSize
=
"
1024
"
;
//!< Buffer size for Data/Stream Responses
const
std
::
str
in
g
DefaultRequestTimeout
=
"
10
"
;
//!< Default Request Timeout. Can be overridden by
//!< XRD_REQUESTTIMEOUT environment variable.
std
::
string
m_execname
;
//!< Executable name of this program
cta
::
xrd
::
Request
m_request
;
//!< Protocol Buffer for the command and parameters
std
::
string
m_execname
;
//!< Executable name of this program
cta
::
xrd
::
Request
m_request
;
//!< Protocol Buffer for the command and parameters
static
constexpr
const
char
*
const
LOG_SUFFIX
=
"CtaAdminCmd"
;
//!< Identifier for log messages
};
...
...
This diff is collapsed.
Click to expand it.
xrootd-ssi-protobuf-interface
@
abdb1339
Subproject commit
bb95ae8b5acfc8424b6a5537a5738bd92b4dfb2a
Subproject commit
abdb133901fb9451a27e941910a5a2228117ce99
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