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
e618c95f
Commit
e618c95f
authored
Jul 28, 2014
by
Steven Murray
Browse files
Replaced NotifyDriveBeforeMountStarted with more specific messages
parent
70689f36
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
castor/legacymsg/VmgrProxy.hpp
View file @
e618c95f
...
...
@@ -45,27 +45,27 @@ public:
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
*
* @param vid The volume identifier of the mounted tape.
* @param
* @param
jid The ID of the process that mounted the tape.
*/
virtual
void
tapeMountedForRead
(
const
std
::
string
&
vid
,
uint32_t
jid
)
=
0
;
virtual
void
tapeMountedForRead
(
const
std
::
string
&
vid
,
const
uint32_t
jid
)
=
0
;
/**
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
*
* @param vid The volume identifier of the mounted tape.
* @param
* @param
jid The ID of the process that mounted the tape.
*/
virtual
void
tapeMountedForWrite
(
const
std
::
string
&
vid
,
uint32_t
jid
)
=
0
;
virtual
void
tapeMountedForWrite
(
const
std
::
string
&
vid
,
const
uint32_t
jid
)
=
0
;
/**
* Gets information from vmgrd about the specified tape
*
* @param vid
The volume identifier of the tape.
* @
param reply The structure containing t
he reply from vmgrd
* @param vid The volume identifier of the tape.
* @
return T
he reply from
the
vmgrd
daemon.
*/
virtual
void
queryTape
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoMsgBody
&
reply
)
=
0
;
virtual
legacymsg
::
VmgrTapeInfoMsgBody
queryTape
(
const
std
::
string
&
vid
)
=
0
;
};
// class VmgrProxy
...
...
castor/legacymsg/VmgrProxyDummy.cpp
View file @
e618c95f
...
...
@@ -30,20 +30,22 @@ castor::legacymsg::VmgrProxyDummy::~VmgrProxyDummy() throw() {
//------------------------------------------------------------------------------
// tapeMountedForRead
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyDummy
::
tapeMountedForRead
(
const
std
::
string
&
vid
,
uint32_t
jid
)
{
void
castor
::
legacymsg
::
VmgrProxyDummy
::
tapeMountedForRead
(
const
std
::
string
&
vid
,
const
uint32_t
jid
)
{
}
//------------------------------------------------------------------------------
// tapeMountedForWrite
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyDummy
::
tapeMountedForWrite
(
const
std
::
string
&
vid
,
uint32_t
jid
)
{
void
castor
::
legacymsg
::
VmgrProxyDummy
::
tapeMountedForWrite
(
const
std
::
string
&
vid
,
const
uint32_t
jid
)
{
}
//------------------------------------------------------------------------------
// getTapeInfo
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyDummy
::
queryTape
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoMsgBody
&
reply
)
{
castor
::
legacymsg
::
VmgrTapeInfoMsgBody
castor
::
legacymsg
::
VmgrProxyDummy
::
queryTape
(
const
std
::
string
&
vid
)
{
legacymsg
::
VmgrTapeInfoMsgBody
reply
;
return
reply
;
}
castor/legacymsg/VmgrProxyDummy.hpp
View file @
e618c95f
...
...
@@ -43,25 +43,25 @@ public:
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
*
* @param vid The volume identifier of the mounted tape.
* @param
* @param
jid The ID of the process that mounted the tape.
*/
void
tapeMountedForRead
(
const
std
::
string
&
vid
,
uint32_t
jid
);
void
tapeMountedForRead
(
const
std
::
string
&
vid
,
const
uint32_t
jid
);
/**
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
*
* @param vid The volume identifier of the mounted tape.
* @param
* @param
jid The ID of the process that mounted the tape.
*/
void
tapeMountedForWrite
(
const
std
::
string
&
vid
,
uint32_t
jid
);
void
tapeMountedForWrite
(
const
std
::
string
&
vid
,
const
uint32_t
jid
);
/**
* Gets information from vmgrd about the specified tape
*
* @param vid
The volume identifier of the tape.
* @
param reply The structure containing t
he reply from vmgrd
* @param vid The volume identifier of the tape.
* @
return T
he reply from
the
vmgrd
daemon.
*/
void
queryTape
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoMsgBody
&
reply
);
legacymsg
::
VmgrTapeInfoMsgBody
queryTape
(
const
std
::
string
&
vid
);
};
// class VmgrProxyDummy
...
...
castor/legacymsg/VmgrProxyTcpIp.cpp
View file @
e618c95f
...
...
@@ -117,7 +117,8 @@ castor::legacymsg::MessageHeader castor::legacymsg::VmgrProxyTcpIp::readRcReplyM
//-----------------------------------------------------------------------------
// writeDriveStatusMsg
//-----------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
writeTapeMountNotificationMsg
(
const
int
fd
,
const
legacymsg
::
VmgrTapeMountedMsgBody
&
body
)
{
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
writeTapeMountNotificationMsg
(
const
int
fd
,
const
legacymsg
::
VmgrTapeMountedMsgBody
&
body
)
{
char
buf
[
REQBUFSZ
];
const
size_t
len
=
legacymsg
::
marshal
(
buf
,
body
);
...
...
@@ -134,7 +135,8 @@ void castor::legacymsg::VmgrProxyTcpIp::writeTapeMountNotificationMsg(const int
//------------------------------------------------------------------------------
// setDriveStatus
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
sendNotificationAndReceiveReply
(
const
legacymsg
::
VmgrTapeMountedMsgBody
&
body
)
{
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
sendNotificationAndReceiveReply
(
const
legacymsg
::
VmgrTapeMountedMsgBody
&
body
)
{
castor
::
utils
::
SmartFd
fd
(
connectToVmgr
());
writeTapeMountNotificationMsg
(
fd
.
get
(),
body
);
readVmgrRcReply
(
fd
.
get
());
...
...
@@ -143,8 +145,8 @@ void castor::legacymsg::VmgrProxyTcpIp::sendNotificationAndReceiveReply(const le
//------------------------------------------------------------------------------
// tapeMountedForRead
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
tapeMountedForRead
(
const
std
::
string
&
vid
,
uint32_t
jid
)
{
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
tapeMountedForRead
(
const
std
::
string
&
vid
,
const
uint32_t
jid
)
{
try
{
castor
::
legacymsg
::
VmgrTapeMountedMsgBody
msg
;
msg
.
uid
=
geteuid
();
...
...
@@ -165,8 +167,8 @@ void castor::legacymsg::VmgrProxyTcpIp::tapeMountedForRead(const std::string &vi
//------------------------------------------------------------------------------
// tapeMountedForWrite
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
tapeMountedForWrite
(
const
std
::
string
&
vid
,
uint32_t
jid
)
{
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
tapeMountedForWrite
(
const
std
::
string
&
vid
,
const
uint32_t
jid
)
{
try
{
castor
::
legacymsg
::
VmgrTapeMountedMsgBody
msg
;
msg
.
uid
=
geteuid
();
...
...
@@ -205,33 +207,39 @@ int castor::legacymsg::VmgrProxyTcpIp::connectToVmgr() const {
//------------------------------------------------------------------------------
// marshalQueryTapeRequest
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
marshalQueryTapeRequest
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoRqstMsgBody
&
request
,
char
*
buf
,
size_t
bufLen
,
size_t
&
totalLen
)
{
size_t
castor
::
legacymsg
::
VmgrProxyTcpIp
::
marshalQueryTapeRequest
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoRqstMsgBody
&
request
,
char
*
buf
,
size_t
bufLen
)
{
try
{
totalLen
=
legacymsg
::
marshal
(
buf
,
bufLen
,
request
);
return
legacymsg
::
marshal
(
buf
,
bufLen
,
request
);
}
catch
(
castor
::
exception
::
Exception
&
ne
)
{
castor
::
exception
::
Exception
ex
;
ex
.
getMessage
()
<<
"Failed to marshal request for tape information: vid="
<<
vid
<<
". Reason: "
<<
ne
.
getMessage
().
str
();
throw
ex
;
}
}
//------------------------------------------------------------------------------
// sendQueryTapeRequest
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
sendQueryTapeRequest
(
const
std
::
string
&
vid
,
const
int
fd
,
char
*
buf
,
size_t
totalLen
)
{
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
sendQueryTapeRequest
(
const
std
::
string
&
vid
,
const
int
fd
,
char
*
buf
,
size_t
totalLen
)
{
try
{
io
::
writeBytes
(
fd
,
m_netTimeout
,
totalLen
,
buf
);
}
catch
(
castor
::
exception
::
Exception
&
ne
)
{
castor
::
exception
::
Exception
ex
;
ex
.
getMessage
()
<<
"Failed to send request for tape information to the VMGR: vid="
<<
vid
<<
". Reason: "
<<
ne
.
getMessage
().
str
();
throw
ex
;
}
}
//------------------------------------------------------------------------------
// receiveQueryTapeReplyHeader
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
receiveQueryTapeReplyHeader
(
const
std
::
string
&
vid
,
const
int
fd
,
legacymsg
::
MessageHeader
&
replyHeader
)
{
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
receiveQueryTapeReplyHeader
(
const
std
::
string
&
vid
,
const
int
fd
,
legacymsg
::
MessageHeader
&
replyHeader
)
{
const
size_t
bufLen
=
12
;
// Magic + type + len
size_t
len
=
bufLen
;
char
buf
[
bufLen
];
...
...
@@ -252,8 +260,10 @@ void castor::legacymsg::VmgrProxyTcpIp::receiveQueryTapeReplyHeader(const std::s
//------------------------------------------------------------------------------
// handleErrorReply
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
handleErrorReply
(
const
std
::
string
&
vid
,
const
int
fd
,
legacymsg
::
MessageHeader
&
replyHeader
)
{
castor
::
exception
::
Exception
castor
::
legacymsg
::
VmgrProxyTcpIp
::
handleErrorReply
(
const
std
::
string
&
vid
,
const
int
fd
,
const
legacymsg
::
MessageHeader
&
replyHeader
)
{
// Length of body buffer = Length of message buffer - length of header
char
bodyBuf
[
VMGR_REPLY_BUFSIZE
-
3
*
sizeof
(
uint32_t
)];
...
...
@@ -272,7 +282,7 @@ void castor::legacymsg::VmgrProxyTcpIp::handleErrorReply(const std::string &vid,
castor
::
exception
::
Exception
ex
;
ex
.
getMessage
()
<<
"Failed to receive error string from VMGR: reqType=MSG_ERR: vid="
<<
vid
<<
". Reason: "
<<
ne
.
getMessage
().
str
();
throw
n
e
;
throw
e
x
;
}
// Ensure the error string is null terminated
...
...
@@ -282,7 +292,7 @@ void castor::legacymsg::VmgrProxyTcpIp::handleErrorReply(const std::string &vid,
castor
::
exception
::
Exception
ex
;
ex
.
getMessage
()
<<
"Received an error string from the VMGR: reqType=MSG_ERR: vid="
<<
vid
<<
": VMGR error string="
<<
bodyBuf
;
throw
ex
;
return
ex
;
}
//------------------------------------------------------------------------------
...
...
@@ -330,7 +340,8 @@ void castor::legacymsg::VmgrProxyTcpIp::handleDataReply(const std::string &vid,
//------------------------------------------------------------------------------
// queryTape
//------------------------------------------------------------------------------
void
castor
::
legacymsg
::
VmgrProxyTcpIp
::
queryTape
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoMsgBody
&
reply
)
{
castor
::
legacymsg
::
VmgrTapeInfoMsgBody
castor
::
legacymsg
::
VmgrProxyTcpIp
::
queryTape
(
const
std
::
string
&
vid
)
{
try
{
castor
::
utils
::
SmartFd
fd
(
connectToVmgr
());
...
...
@@ -342,8 +353,8 @@ void castor::legacymsg::VmgrProxyTcpIp::queryTape(const std::string &vid, legacy
request
.
side
=
0
;
// HARDCODED side
char
buf
[
VMGR_REQUEST_BUFSIZE
];
size_t
totalLen
=
0
;
marshalQueryTapeRequest
(
vid
,
request
,
buf
,
VMGR_REQUEST_BUFSIZE
,
totalLen
);
const
size_t
totalLen
=
marshalQueryTapeRequest
(
vid
,
request
,
buf
,
VMGR_REQUEST_BUFSIZE
);
sendQueryTapeRequest
(
vid
,
fd
.
get
(),
buf
,
totalLen
);
legacymsg
::
MessageHeader
replyHeader
;
receiveQueryTapeReplyHeader
(
vid
,
fd
.
get
(),
replyHeader
);
...
...
@@ -357,7 +368,6 @@ void castor::legacymsg::VmgrProxyTcpIp::queryTape(const std::string &vid, legacy
ex
.
getMessage
()
<<
"VMGR unexpectedly wishes to keep the connection open: reqType=VMGR_IRC: vid="
<<
vid
;
throw
ex
;
}
break
;
// The VMGR has returned an error code
case
VMGR_RC
:
...
...
@@ -366,17 +376,21 @@ void castor::legacymsg::VmgrProxyTcpIp::queryTape(const std::string &vid, legacy
ex
.
getMessage
()
<<
"Received an error code from the VMGR: reqType=VMGR_RC: vid="
<<
vid
<<
": VMGR error code="
<<
replyHeader
.
lenOrStatus
;
throw
ex
;
}
break
;
// The VMGR has returned an error string
case
MSG_ERR
:
handleErrorReply
(
vid
,
fd
.
get
(),
replyHeader
);
break
;
{
castor
::
exception
::
Exception
ex
=
handleErrorReply
(
vid
,
fd
.
get
(),
replyHeader
);
throw
ex
;
}
// The VMGR returned the tape information
case
MSG_DATA
:
handleDataReply
(
vid
,
fd
.
get
(),
replyHeader
,
reply
);
break
;
{
legacymsg
::
VmgrTapeInfoMsgBody
reply
;
handleDataReply
(
vid
,
fd
.
get
(),
replyHeader
,
reply
);
return
reply
;
}
// The VMGR returned an unknown message type
default:
...
...
@@ -385,7 +399,6 @@ void castor::legacymsg::VmgrProxyTcpIp::queryTape(const std::string &vid, legacy
ex
.
getMessage
()
<<
"Received an unkown message type from the VMGR: reqType="
<<
replyHeader
.
reqType
<<
": vid="
<<
vid
;
throw
ex
;
}
break
;
}
}
catch
(
castor
::
exception
::
Exception
&
ne
)
{
...
...
castor/legacymsg/VmgrProxyTcpIp.hpp
View file @
e618c95f
...
...
@@ -61,25 +61,25 @@ public:
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
*
* @param vid The volume identifier of the mounted tape.
* @param
* @param
jid The ID of the process that mounted the tape.
*/
void
tapeMountedForRead
(
const
std
::
string
&
vid
,
uint32_t
jid
);
/**
void
tapeMountedForRead
(
const
std
::
string
&
vid
,
const
uint32_t
jid
);
/**
* Notifies the vmgrd daemon that the specified tape has been mounted for read.
*
* @param vid The volume identifier of the mounted tape.
* @param
* @param
jid The ID of the process that mounted the tape.
*/
void
tapeMountedForWrite
(
const
std
::
string
&
vid
,
uint32_t
jid
);
void
tapeMountedForWrite
(
const
std
::
string
&
vid
,
const
uint32_t
jid
);
/**
/**
* Gets information from vmgrd about the specified tape
*
* @param vid
The volume identifier of the tape.
* @
param reply The structure containing t
he reply from vmgrd
* @param vid The volume identifier of the tape.
* @
return T
he reply from
the
vmgrd
daemon.
*/
void
queryTape
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoMsgBody
&
reply
);
legacymsg
::
VmgrTapeInfoMsgBody
queryTape
(
const
std
::
string
&
vid
);
private:
...
...
@@ -147,9 +147,10 @@ private:
*
* @param request Source request
* @param buf Destination buffer
* @
param totalLen
Total length of bytes marshaled
* @
return
Total length of bytes marshaled
*/
void
marshalQueryTapeRequest
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoRqstMsgBody
&
request
,
char
*
buf
,
size_t
bufLen
,
size_t
&
totalLen
);
size_t
marshalQueryTapeRequest
(
const
std
::
string
&
vid
,
legacymsg
::
VmgrTapeInfoRqstMsgBody
&
request
,
char
*
buf
,
size_t
bufLen
);
/**
* Send the request out to the VMGR
...
...
@@ -158,7 +159,8 @@ private:
* @param buf Source buffer
* @param totalLen Buffer length
*/
void
sendQueryTapeRequest
(
const
std
::
string
&
vid
,
const
int
fd
,
char
*
buf
,
size_t
totalLen
);
void
sendQueryTapeRequest
(
const
std
::
string
&
vid
,
const
int
fd
,
char
*
buf
,
size_t
totalLen
);
/**
* Receives the header of the reply coming from the VMGR
...
...
@@ -166,15 +168,19 @@ private:
* @param fd File descriptor of the connection
* @param replyHeader Destination structure for the header
*/
void
receiveQueryTapeReplyHeader
(
const
std
::
string
&
vid
,
const
int
fd
,
legacymsg
::
MessageHeader
&
replyHeader
);
void
receiveQueryTapeReplyHeader
(
const
std
::
string
&
vid
,
const
int
fd
,
legacymsg
::
MessageHeader
&
replyHeader
);
/**
* Function that receives and handles the error string coming from the VMGR
*
* @param fd File descriptor of the connection
* @param replyHeader Reply header
* @return The error string from the VMGR converted into a CASTOR
* exception.
*/
void
handleErrorReply
(
const
std
::
string
&
vid
,
const
int
fd
,
legacymsg
::
MessageHeader
&
replyHeader
);
castor
::
exception
::
Exception
handleErrorReply
(
const
std
::
string
&
vid
,
const
int
fd
,
const
legacymsg
::
MessageHeader
&
replyHeader
);
/**
* Function that receives and unmarshals the reply data coming from the VMGR
...
...
castor/messages/CMakeLists.txt
View file @
e618c95f
...
...
@@ -7,17 +7,25 @@ add_library(castormessages SHARED
Header.pb.cc
Heartbeat.pb.cc
messages.cpp
NotifyDrive.pb.cc
MigrationJobFromTapeGateway.pb.cc
MigrationJobFromWriteTp.pb.cc
NbFilesOnTape.pb.cc
ProcessCrashed.pb.cc
ProcessExited.pb.cc
RecallJobFromReadTp.pb.cc
RecallJobFromTapeGateway.pb.cc
ReplyContainer.cpp
StopProcessForker.pb.cc
TapeMountedForMigration.pb.cc
TapeMountedForRecall.pb.cc
TapeserverProxy.cpp
TapeserverProxyDummy.cpp
TapeserverProxyDummyFactory.cpp
TapeserverProxyFactory.cpp
TapeserverProxyZmq.cpp
TapeserverProxyZmqFactory.cpp
TapeUnmountStarted.pb.cc
TapeUnmounted.pb.cc
)
target_link_libraries
(
castormessages protobuf ssl
)
...
...
castor/messages/Constants.hpp
View file @
e618c95f
...
...
@@ -33,11 +33,15 @@ namespace castor {
enum
{
ReturnValue
,
Heartbeat
,
NotifyDriveBeforeMountStarted
,
NotifyDriveTapeMounted
,
NotifyDriveUnmountStarted
,
NotifyDriveTapeUnmounted
,
NotifyDriveBeforeMountStartedAnswer
,
MigrationJobFromTapeGateway
,
MigrationJobFromWriteTp
,
NbFilesOnTape
,
RecallJobFromReadTp
,
RecallJobFromTapeGateway
,
TapeMountedForMigration
,
TapeMountedForRecall
,
TapeUnmountStarted
,
TapeUnmounted
};
};
struct
protocolVersion
{
...
...
@@ -46,4 +50,4 @@ namespace castor {
};
};
}
}
\ No newline at end of file
}
castor/messages/MigrationJobFromTapeGateway.pb.cc
0 → 100644
View file @
e618c95f
// Generated by the protocol buffer compiler. DO NOT EDIT!
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include
"MigrationJobFromTapeGateway.pb.h"
#include
<google/protobuf/stubs/once.h>
#include
<google/protobuf/io/coded_stream.h>
#include
<google/protobuf/wire_format_lite_inl.h>
#include
<google/protobuf/descriptor.h>
#include
<google/protobuf/reflection_ops.h>
#include
<google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
namespace
castor
{
namespace
messages
{
namespace
{
const
::
google
::
protobuf
::
Descriptor
*
MigrationJobFromTapeGateway_descriptor_
=
NULL
;
const
::
google
::
protobuf
::
internal
::
GeneratedMessageReflection
*
MigrationJobFromTapeGateway_reflection_
=
NULL
;
}
// namespace
void
protobuf_AssignDesc_MigrationJobFromTapeGateway_2eproto
()
{
protobuf_AddDesc_MigrationJobFromTapeGateway_2eproto
();
const
::
google
::
protobuf
::
FileDescriptor
*
file
=
::
google
::
protobuf
::
DescriptorPool
::
generated_pool
()
->
FindFileByName
(
"MigrationJobFromTapeGateway.proto"
);
GOOGLE_CHECK
(
file
!=
NULL
);
MigrationJobFromTapeGateway_descriptor_
=
file
->
message_type
(
0
);
static
const
int
MigrationJobFromTapeGateway_offsets_
[
2
]
=
{
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
MigrationJobFromTapeGateway
,
vid_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
MigrationJobFromTapeGateway
,
unitname_
),
};
MigrationJobFromTapeGateway_reflection_
=
new
::
google
::
protobuf
::
internal
::
GeneratedMessageReflection
(
MigrationJobFromTapeGateway_descriptor_
,
MigrationJobFromTapeGateway
::
default_instance_
,
MigrationJobFromTapeGateway_offsets_
,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
MigrationJobFromTapeGateway
,
_has_bits_
[
0
]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
MigrationJobFromTapeGateway
,
_unknown_fields_
),
-
1
,
::
google
::
protobuf
::
DescriptorPool
::
generated_pool
(),
::
google
::
protobuf
::
MessageFactory
::
generated_factory
(),
sizeof
(
MigrationJobFromTapeGateway
));
}
namespace
{
GOOGLE_PROTOBUF_DECLARE_ONCE
(
protobuf_AssignDescriptors_once_
);
inline
void
protobuf_AssignDescriptorsOnce
()
{
::
google
::
protobuf
::
GoogleOnceInit
(
&
protobuf_AssignDescriptors_once_
,
&
protobuf_AssignDesc_MigrationJobFromTapeGateway_2eproto
);
}
void
protobuf_RegisterTypes
(
const
::
std
::
string
&
)
{
protobuf_AssignDescriptorsOnce
();
::
google
::
protobuf
::
MessageFactory
::
InternalRegisterGeneratedMessage
(
MigrationJobFromTapeGateway_descriptor_
,
&
MigrationJobFromTapeGateway
::
default_instance
());
}
}
// namespace
void
protobuf_ShutdownFile_MigrationJobFromTapeGateway_2eproto
()
{
delete
MigrationJobFromTapeGateway
::
default_instance_
;
delete
MigrationJobFromTapeGateway_reflection_
;
}
void
protobuf_AddDesc_MigrationJobFromTapeGateway_2eproto
()
{
static
bool
already_here
=
false
;
if
(
already_here
)
return
;
already_here
=
true
;
GOOGLE_PROTOBUF_VERIFY_VERSION
;
::
google
::
protobuf
::
DescriptorPool
::
InternalAddGeneratedFile
(
"
\n
!MigrationJobFromTapeGateway.proto
\022\017
cas"
"tor.messages
\"
<
\n\033
MigrationJobFromTapeGate"
"way
\022\013\n\003
vid
\030\001
\002
(
\t\022\020\n\010
unitname
\030\002
\002
(
\t
"
,
114
);
::
google
::
protobuf
::
MessageFactory
::
InternalRegisterGeneratedFile
(
"MigrationJobFromTapeGateway.proto"
,
&
protobuf_RegisterTypes
);
MigrationJobFromTapeGateway
::
default_instance_
=
new
MigrationJobFromTapeGateway
();
MigrationJobFromTapeGateway
::
default_instance_
->
InitAsDefaultInstance
();
::
google
::
protobuf
::
internal
::
OnShutdown
(
&
protobuf_ShutdownFile_MigrationJobFromTapeGateway_2eproto
);
}
// Force AddDescriptors() to be called at static initialization time.
struct
StaticDescriptorInitializer_MigrationJobFromTapeGateway_2eproto
{
StaticDescriptorInitializer_MigrationJobFromTapeGateway_2eproto
()
{
protobuf_AddDesc_MigrationJobFromTapeGateway_2eproto
();
}
}
static_descriptor_initializer_MigrationJobFromTapeGateway_2eproto_
;
// ===================================================================
const
::
std
::
string
MigrationJobFromTapeGateway
::
_default_vid_
;
const
::
std
::
string
MigrationJobFromTapeGateway
::
_default_unitname_
;
#ifndef _MSC_VER
const
int
MigrationJobFromTapeGateway
::
kVidFieldNumber
;
const
int
MigrationJobFromTapeGateway
::
kUnitnameFieldNumber
;
#endif // !_MSC_VER
MigrationJobFromTapeGateway
::
MigrationJobFromTapeGateway
()
:
::
google
::
protobuf
::
Message
()
{
SharedCtor
();
}
void
MigrationJobFromTapeGateway
::
InitAsDefaultInstance
()
{
}
MigrationJobFromTapeGateway
::
MigrationJobFromTapeGateway
(
const
MigrationJobFromTapeGateway
&
from
)
:
::
google
::
protobuf
::
Message
()
{
SharedCtor
();
MergeFrom
(
from
);
}
void
MigrationJobFromTapeGateway
::
SharedCtor
()
{
_cached_size_
=
0
;
vid_
=
const_cast
<
::
std
::
string
*>
(
&
_default_vid_
);
unitname_
=
const_cast
<
::
std
::
string
*>
(
&
_default_unitname_
);
::
memset
(
_has_bits_
,
0
,
sizeof
(
_has_bits_
));
}
MigrationJobFromTapeGateway
::~
MigrationJobFromTapeGateway
()
{
SharedDtor
();
}
void
MigrationJobFromTapeGateway
::
SharedDtor
()
{
if
(
vid_
!=
&
_default_vid_
)
{
delete
vid_
;
}
if
(
unitname_
!=
&
_default_unitname_
)
{
delete
unitname_
;
}
if
(
this
!=
default_instance_
)
{
}
}
void
MigrationJobFromTapeGateway
::
SetCachedSize
(
int
size
)
const
{
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN
();
_cached_size_
=
size
;
GOOGLE_SAFE_CONCURRENT_WRITES_END
();
}
const
::
google
::
protobuf
::
Descriptor
*
MigrationJobFromTapeGateway
::
descriptor
()
{
protobuf_AssignDescriptorsOnce
();
return
MigrationJobFromTapeGateway_descriptor_
;
}
const
MigrationJobFromTapeGateway
&
MigrationJobFromTapeGateway
::
default_instance
()
{
if
(
default_instance_
==
NULL
)
protobuf_AddDesc_MigrationJobFromTapeGateway_2eproto
();
return
*
default_instance_
;
}
MigrationJobFromTapeGateway
*
MigrationJobFromTapeGateway
::
default_instance_
=
NULL
;
MigrationJobFromTapeGateway
*
MigrationJobFromTapeGateway
::
New
()
const
{
return
new
MigrationJobFromTapeGateway
;
}
void
MigrationJobFromTapeGateway
::
Clear
()
{
if
(
_has_bits_
[
0
/
32
]
&
(
0xffu
<<
(
0
%
32
)))
{
if
(
_has_bit
(
0
))
{
if
(
vid_
!=
&
_default_vid_
)
{
vid_
->
clear
();
}
}
if
(
_has_bit
(
1
))
{
if
(
unitname_
!=
&
_default_unitname_
)
{
unitname_
->
clear
();
}
}
}
::
memset
(
_has_bits_
,
0
,
sizeof
(
_has_bits_
));
mutable_unknown_fields
()
->
Clear
();
}
bool
MigrationJobFromTapeGateway
::
MergePartialFromCodedStream
(
::
google
::
protobuf
::
io
::
CodedInputStream
*
input
)
{
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::
google
::
protobuf
::
uint32
tag
;
while
((
tag
=
input
->
ReadTag
())
!=
0
)
{
switch
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagFieldNumber
(
tag
))
{
// required string vid = 1;
case
1
:
{
if
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
GetTagWireType
(
tag
)
==