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
f20ed0ed
Commit
f20ed0ed
authored
8 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Added the eos::wfe::Wrapper message
parent
91b3a97a
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
eos/messages/eos_messages.proto
+53
-26
53 additions, 26 deletions
eos/messages/eos_messages.proto
xroot_plugins/WriteNotificationMsgCmd.cpp
+1
-1
1 addition, 1 deletion
xroot_plugins/WriteNotificationMsgCmd.cpp
xroot_plugins/XrdCtaFilesystem.cpp
+1
-1
1 addition, 1 deletion
xroot_plugins/XrdCtaFilesystem.cpp
with
55 additions
and
28 deletions
eos/messages/eos_messages.proto
+
53
−
26
View file @
f20ed0ed
syntax
=
"proto3"
;
package
eos
.
wfe
;
message
i
d
{
message
I
d
{
fixed64
n
=
1
;
// identity number
string
name
=
2
;
// identity name
}
message
c
hecksum
{
message
C
hecksum
{
string
value
=
1
;
//< checksum value
string
name
=
2
;
//< checksum name
}
message
c
lock
{
message
C
lock
{
fixed64
sec
=
1
;
//< seconds of a clock
fixed64
nsec
=
2
;
//< nanoseconds of a clock
}
message
m
d
{
message
M
d
{
fixed64
fid
=
1
;
//< file/container id
fixed64
pid
=
2
;
//< parent id
c
lock
ctime
=
3
;
//< change time
c
lock
mtime
=
4
;
//< modification time
c
lock
btime
=
5
;
//< birth time
c
lock
ttime
=
6
;
//< tree modification time
i
d
owner
=
7
;
//< ownership
C
lock
ctime
=
3
;
//< change time
C
lock
mtime
=
4
;
//< modification time
C
lock
btime
=
5
;
//< birth time
C
lock
ttime
=
6
;
//< tree modification time
I
d
owner
=
7
;
//< ownership
fixed64
size
=
8
;
//< size
c
hecksum
cks
=
9
;
//< checksum information
C
hecksum
cks
=
9
;
//< checksum information
sfixed32
mode
=
10
;
//< mode
string
lpath
=
11
;
//< logical path
map
<
string
,
string
>
xattr
=
12
;
//< xattribute map
};
message
s
ecurity
{
message
S
ecurity
{
string
host
=
1
;
//< client host
string
app
=
2
;
//< app string
string
name
=
3
;
//< sec name
...
...
@@ -39,44 +39,71 @@ message security {
string
grps
=
5
;
//< security grps
}
message
c
lient
{
i
d
user
=
1
;
//< acting client
s
ecurity
sec
=
2
;
//< client security information
message
C
lient
{
I
d
user
=
1
;
//< acting client
S
ecurity
sec
=
2
;
//< client security information
}
message
s
ervice
{
message
S
ervice
{
string
name
=
1
;
//< name of the service
string
url
=
2
;
//< access url of the service
}
message
w
orkflow
{
message
W
orkflow
{
string
event
=
1
;
//< event
string
queue
=
2
;
//< queue
string
wfname
=
3
;
//< workflow
string
vpath
=
4
;
//< vpath
s
ervice
instance
=
5
;
//< instance information
S
ervice
instance
=
5
;
//< instance information
fixed64
timestamp
=
6
;
//< event timestamp
}
message
n
otification
{
w
orkflow
wf
=
1
;
//< workflow
message
N
otification
{
W
orkflow
wf
=
1
;
//< workflow
string
turl
=
2
;
//< transport URL
c
lient
cli
=
3
;
//< client information
m
d
file
=
4
;
//< file meta data
m
d
directory
=
5
;
//< directory meta data
C
lient
cli
=
3
;
//< client information
M
d
file
=
4
;
//< file meta data
M
d
directory
=
5
;
//< directory meta data
}
message
x
attr
{
message
X
attr
{
enum
Operation
{
GET
=
0
;
ADD
=
1
;
SET
=
2
;
DELETE
=
3
;}
fixed64
fid
=
1
;
//< file id
map
<
string
,
string
>
xattrs
=
2
;
//< xattribute map
Operation
op
=
3
;
//< operation to execute for this xattr map
}
message
t
apereplica
{
enum
Status
{
OFFTAPE
=
0
;
ONTAPE
=
1
;
ONTAPESAVE
=
2
;}
message
T
apereplica
{
enum
Status
{
OFFTAPE
=
0
;
ONTAPE
=
1
;
ONTAPESAVE
=
2
;}
fixed64
fid
=
1
;
//< file id
Status
status
=
2
;
//< state state for file ID
fixed64
size
=
3
;
//< File size as recorded on tape for cross check
checksum
cks
=
4
;
//< File checksum as computer while writing to tape
Checksum
cks
=
4
;
//< File checksum as computer while writing to tape
}
// The following message is used to wrap all messages sent between EOS and its
// peers.
//
// This wrapper message allows new message types to be added to the protocol in
// the future.
//
// This wrapper message also allows EOS peers to receive non-EOS messages as
// long as the following two conditions are met:
// 1. The peer uses a wrapper message with exactly the same (simple) structure.
// 2. No two message types use the same numeric tag value.
//
// The structure of this message is based on the "Union Types" section of the
// following Google protocol buffers web page:
//
// https://developers.google.com/protocol-buffers/docs/techniques
//
// A protocol buffer parser cannot determine a message type based solely on its
// contents. The type field of this wrapper message provides the required
// metadata.
message
Wrapper
{
enum
Type
{
NOTIFICATION
=
0
;
XATTR
=
1
;
TAPEREPLICA
=
2
;}
Type
type
=
1
;
Notification
notification
=
2
;
Xattr
xattr
=
3
;
Tapereplica
tapereplica
=
4
;
}
This diff is collapsed.
Click to expand it.
xroot_plugins/WriteNotificationMsgCmd.cpp
+
1
−
1
View file @
f20ed0ed
...
...
@@ -55,7 +55,7 @@ int WriteNotificationMsgCmd::exceptionThrowingMain(const int argc, char *const *
return
0
;
}
eos
::
wfe
::
n
otification
notification
;
eos
::
wfe
::
N
otification
notification
;
notification
.
mutable_wf
()
->
set_event
(
"notification_workflow_event"
);
notification
.
mutable_wf
()
->
set_queue
(
"notification_workflow_queue"
);
notification
.
mutable_wf
()
->
set_wfname
(
"notification_workflow_wfname"
);
...
...
This diff is collapsed.
Click to expand it.
xroot_plugins/XrdCtaFilesystem.cpp
+
1
−
1
View file @
f20ed0ed
...
...
@@ -99,7 +99,7 @@ int XrdCtaFilesystem::FSctl(const int cmd, XrdSfsFSctl &args, XrdOucErrInfo &eIn
}
const
std
::
string
query
(
args
.
Arg1
,
args
.
Arg1Len
);
eos
::
wfe
::
n
otification
notification
;
eos
::
wfe
::
N
otification
notification
;
if
(
!
notification
.
ParseFromString
(
query
))
{
eInfo
.
setErrInfo
(
EINVAL
,
"Failed to parse notification message"
);
return
SFS_ERROR
;
...
...
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