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
638504c0
Commit
638504c0
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[EOS-CTA] Cleans up debugging code
parent
64ff6404
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmdline/EosCtaStub.cpp
+5
-40
5 additions, 40 deletions
cmdline/EosCtaStub.cpp
xroot_ssi_pb/XrdSsiPbRequest.h
+0
-3
0 additions, 3 deletions
xroot_ssi_pb/XrdSsiPbRequest.h
xroot_ssi_pb/XrdSsiPbRequestProc.h
+0
-21
0 additions, 21 deletions
xroot_ssi_pb/XrdSsiPbRequestProc.h
with
5 additions
and
64 deletions
cmdline/EosCtaStub.cpp
+
5
−
40
View file @
638504c0
...
...
@@ -260,30 +260,7 @@ void XrdSsiPbRequestCallback<eos::wfe::Response>::operator()(const eos::wfe::Res
using
namespace
std
;
std
::
cout
<<
"MetadataCallback():"
<<
std
::
endl
;
eos
::
wfe
::
Response
test
;
test
.
set_rsp_type
(
eos
::
wfe
::
Response
::
EXCEPTION_RSP
);
test
.
mutable_exception
()
->
set_code
(
eos
::
wfe
::
Exception
::
PB_PARSE_ERR
);
test
.
mutable_exception
()
->
set_message
(
"m_request.ParseFromArray() failed"
);
std
::
string
test_str
;
google
::
protobuf
::
util
::
MessageToJsonString
(
test
,
&
test_str
);
std
::
cerr
<<
test_str
<<
std
::
endl
;
#if 0
switch(metadata.rsp_type())
{
case eos::wfe::Response::EXCEPTION_RSP:
cerr << "EXCEPTION" << endl;
if(metadata.has_exception()) cerr << "has_exception" << endl;
cout << "code = " << metadata.exception().code() << endl;
cout << "message = " << metadata.exception().message() << endl;
break;
case eos::wfe::Response::XATTR_RSP: cerr << "XATTR" << endl; break;
case eos::wfe::Response::TAPEREPLICA_RSP: cerr << "TAPEREPLICA" << endl; break;
default: cerr << "Unknown metadata type" << endl; break;
}
OutputJsonString
(
&
metadata
);
#endif
}
...
...
@@ -315,13 +292,6 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
OutputJsonString
(
&
notification
);
}
eos
::
wfe
::
Response
test
;
test
.
set_rsp_type
(
eos
::
wfe
::
Response
::
EXCEPTION_RSP
);
test
.
mutable_exception
()
->
set_code
(
eos
::
wfe
::
Exception
::
PB_PARSE_ERR
);
test
.
mutable_exception
()
->
set_message
(
"m_request.ParseFromArray() failed"
);
OutputJsonString
(
&
test
);
XrdSsiPbRequestCallback
<
eos
::
wfe
::
Response
>
cb
;
cb
(
test
);
// Obtain a Service Provider
...
...
@@ -335,14 +305,12 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
cta_service
.
send
(
notification
);
#if 0
// Wait for the response callback.
// Wait for the response callback.
std::cout << "Request sent, going to sleep..." << std::endl;
std
::
cout
<<
"Request sent, going to sleep..."
<<
std
::
endl
;
// When test_ssi_service goes out-of-scope, the Service will try to shut down, but will wait
// for outstanding Requests to be processed
// When test_ssi_service goes out-of-scope, the Service will try to shut down, but will wait
// for outstanding Requests to be processed
int
wait_secs
=
5
;
...
...
@@ -352,8 +320,7 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
sleep
(
1
);
}
std::cout << "All done, exiting." << std::endl;
#endif
std
::
cout
<<
"done, exiting."
<<
std
::
endl
;
// Send output to stdout or stderr?
...
...
@@ -363,8 +330,6 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
// Optional: Delete all global objects allocated by libprotobuf
sleep
(
5
);
google
::
protobuf
::
ShutdownProtobufLibrary
();
return
0
;
...
...
This diff is collapsed.
Click to expand it.
xroot_ssi_pb/XrdSsiPbRequest.h
+
0
−
3
View file @
638504c0
...
...
@@ -164,9 +164,6 @@ bool XrdSsiPbRequest<RequestType, MetadataType, AlertType>::ProcessResponse(cons
if
(
metadata_len
>
0
)
{
std
::
string
dump_buffer
(
metadata_buffer
,
metadata_len
);
std
::
cout
<<
"Metadata len is "
<<
metadata_len
<<
std
::
endl
;
DumpBuffer
(
dump_buffer
);
// Deserialize the metadata
MetadataType
metadata
;
...
...
This diff is collapsed.
Click to expand it.
xroot_ssi_pb/XrdSsiPbRequestProc.h
+
0
−
21
View file @
638504c0
...
...
@@ -23,8 +23,6 @@
#include
"XrdSsiPbException.h"
#include
"XrdSsiPbAlert.h"
#include
"../frontend/test_util.h"
//! Error codes that the framework knows about
...
...
@@ -119,7 +117,6 @@ void RequestProc<RequestType, MetadataType, AlertType>::Execute()
if
(
m_request
.
ParseFromArray
(
request_buffer
,
request_len
))
{
#if 0
// Perform the requested action
ExecuteAction
();
...
...
@@ -134,7 +131,6 @@ void RequestProc<RequestType, MetadataType, AlertType>::Execute()
}
else
{
#endif
// Return an error to the client
HandleError
(
PB_PARSE_ERR
,
"m_request.ParseFromArray() failed"
);
...
...
@@ -150,23 +146,6 @@ void RequestProc<RequestType, MetadataType, AlertType>::Execute()
{
throw
XrdSsiPbException
(
"m_metadata.SerializeToString() failed"
);
}
std
::
cout
<<
"Metadata len is "
<<
m_metadata_str
.
size
()
<<
std
::
endl
;
DumpBuffer
(
m_metadata_str
);
int
bufsz
=
m_metadata
.
ByteSize
();
std
::
cout
<<
"Buf len is "
<<
bufsz
<<
std
::
endl
;
char
*
buf
=
new
char
[
bufsz
];
m_metadata
.
SerializeToArray
((
void
*
)
buf
,
bufsz
);
std
::
string
tmp_str
(
buf
,
bufsz
);
m_metadata_str
=
tmp_str
;
DumpBuffer
(
m_metadata_str
);
// Parse the string we just serialized
std
::
cerr
<<
"Parse the serialized string"
<<
std
::
endl
;
MetadataType
test
;
test
.
ParseFromString
(
m_metadata_str
);
OutputJsonString
(
&
test
);
// Send the Metadata
...
...
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