Commit 855e3eda authored by Eric Cano's avatar Eric Cano
Browse files

bug #85949: RFE: Add bulk messages to tapegatewayd/tapebridged protocol

Updated the bulk protocol between tape gateway and implemented the handling in the tape gateway.
parent 0062492f
......@@ -88,6 +88,8 @@ void castor::io::StreamFileMigrationReportListCnv::createRep(castor::IAddress* a
ad->stream() << obj->type();
ad->stream() << obj->mountTransactionId();
ad->stream() << obj->aggregatorTransactionId();
ad->stream() << obj->fseqSet();
ad->stream() << obj->fseq();
ad->stream() << obj->id();
}
......@@ -107,6 +109,12 @@ castor::IObject* castor::io::StreamFileMigrationReportListCnv::createObj(castor:
u_signed64 aggregatorTransactionId;
ad->stream() >> aggregatorTransactionId;
object->setAggregatorTransactionId(aggregatorTransactionId);
bool fseqSet;
ad->stream() >> fseqSet;
object->setFseqSet(fseqSet);
int fseq;
ad->stream() >> fseq;
object->setFseq(fseq);
u_signed64 id;
ad->stream() >> id;
object->setId(id);
......
......@@ -40,6 +40,8 @@
//------------------------------------------------------------------------------
castor::tape::tapegateway::FileMigrationReportList::FileMigrationReportList() throw() :
GatewayMessage(),
m_fseqSet(false),
m_fseq(0),
m_id(0) {
}
......@@ -74,6 +76,8 @@ void castor::tape::tapegateway::FileMigrationReportList::print(std::ostream& str
// Call print on the parent class(es)
this->GatewayMessage::print(stream, indent, alreadyPrinted);
// Output of all members
stream << indent << "fseqSet : " << (m_fseqSet ? "Yes" : "No") << std::endl;
stream << indent << "fseq : " << m_fseq << std::endl;
stream << indent << "id : " << m_id << std::endl;
alreadyPrinted.insert(this);
{
......
......@@ -100,6 +100,38 @@ namespace castor {
/*********************************/
/* End of IObject abstract class */
/*********************************/
/**
* Get the value of m_fseqSet
* @return the value of m_fseqSet
*/
bool fseqSet() const {
return m_fseqSet;
}
/**
* Set the value of m_fseqSet
* @param new_var the new value of m_fseqSet
*/
void setFseqSet(bool new_var) {
m_fseqSet = new_var;
}
/**
* Get the value of m_fseq
* @return the value of m_fseq
*/
int fseq() const {
return m_fseq;
}
/**
* Set the value of m_fseq
* @param new_var the new value of m_fseq
*/
void setFseq(int new_var) {
m_fseq = new_var;
}
/**
* Get the value of m_id
* The id of this object
......@@ -182,6 +214,10 @@ namespace castor {
private:
bool m_fseqSet;
int m_fseq;
/// The id of this object
u_signed64 m_id;
......
/* This file was generated by ./TapeGatewayDlfMessagesCodeGenerator on Thu Aug 11 15:03:21 WEDT 2011
/* This file was generated by ./TapeGatewayDlfMessagesCodeGenerator on Tue Sep 20 11:20:22 WEDT 2011
*/
/******************************************************************************
......@@ -150,7 +150,11 @@ WORKER_REPACK_UNCONFIRMED_STALE_FILE=114, /* "Worker: segment to repack is gone,
WORKER_REPACK_FILE_REMOVED=115, /* "Worker: file no found on segment update for repack" */
WORKER_FAIL_NOTIFICATION_FOR_FILE=116, /* "Worker: received end notification error report for file" */
CHECKER_CANNOT_RELEASE_TAPE=117, /* "VdqmRequestsChecker: cannot release BUSY tape after end transaction" */
VMGR_GATEWAY_HELPER_RETRYING=118 /* "VmgrTapeGatewayHelper::TapeInfo: will retry VMGR query" */
VMGR_GATEWAY_HELPER_RETRYING=118, /* "VmgrTapeGatewayHelper::TapeInfo: will retry VMGR query" */
WORKER_MIG_REPORT_LIST_RECEIVED=119, /* "Worker: received a migration report list" */
WORKER_MIG_REPORT_LIST_PROCESSED=120, /* "Worker: finished processing a migration report list" */
WORKER_REC_REPORT_LIST_RECEIVED=121, /* "Worker: received a recall report list" */
WORKER_REC_REPORT_LIST_PROCESSED=122 /* "Worker: finished processing a recall report list" */
}; // enum TapeGatewayDlfMessages
} // namespace tapegateway
} // namespace tape
......
/* This file was generated by ./TapeGatewayDlfMessagesCodeGenerator on Thu Aug 11 15:03:21 WEDT 2011
/* This file was generated by ./TapeGatewayDlfMessagesCodeGenerator on Tue Sep 20 11:20:22 WEDT 2011
*/
/******************************************************************************
......@@ -147,4 +147,8 @@ castor::dlf::Message castor::tape::tapegateway::TapeGatewayDaemon::s_dlfMessages
{WORKER_FAIL_NOTIFICATION_FOR_FILE, "Worker: received end notification error report for file"},
{CHECKER_CANNOT_RELEASE_TAPE, "VdqmRequestsChecker: cannot release BUSY tape after end transaction"},
{VMGR_GATEWAY_HELPER_RETRYING, "VmgrTapeGatewayHelper::TapeInfo: will retry VMGR query"},
{WORKER_MIG_REPORT_LIST_RECEIVED, "Worker: received a migration report list"},
{WORKER_MIG_REPORT_LIST_PROCESSED, "Worker: finished processing a migration report list"},
{WORKER_REC_REPORT_LIST_RECEIVED, "Worker: received a recall report list"},
{WORKER_REC_REPORT_LIST_PROCESSED, "Worker: finished processing a recall report list"},
{-1, ""}};
......@@ -115,4 +115,8 @@
115,WORKER_REPACK_FILE_REMOVED,"Worker: file no found on segment update for repack"
116,WORKER_FAIL_NOTIFICATION_FOR_FILE,"Worker: received end notification error report for file"
117,CHECKER_CANNOT_RELEASE_TAPE,"VdqmRequestsChecker: cannot release BUSY tape after end transaction"
118,VMGR_GATEWAY_HELPER_RETRYING,"VmgrTapeGatewayHelper::TapeInfo: will retry VMGR query"
\ No newline at end of file
118,VMGR_GATEWAY_HELPER_RETRYING,"VmgrTapeGatewayHelper::TapeInfo: will retry VMGR query"
119,WORKER_MIG_REPORT_LIST_RECEIVED,"Worker: received a migration report list"
120,WORKER_MIG_REPORT_LIST_PROCESSED,"Worker: finished processing a migration report list"
121,WORKER_REC_REPORT_LIST_RECEIVED,"Worker: received a recall report list"
122,WORKER_REC_REPORT_LIST_PROCESSED,"Worker: finished processing a recall report list"
\ No newline at end of file
......@@ -35,6 +35,7 @@
#include "castor/server/IThread.hpp"
#include "castor/tape/net/Constants.hpp"
#include "castor/tape/utils/ShutdownBoolFunctor.hpp"
#include "castor/tape/tapegateway/FileMigratedNotificationStruct.hpp"
namespace castor {
......@@ -89,8 +90,18 @@ namespace tapegateway{
castor::IObject* handleEndWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw();
castor::IObject* handleFailWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw();
castor::IObject* handleFileFailWorker (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw();
castor::IObject* handleFileMigrationReportList (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw();
castor::IObject* handleFileRecallReportList (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw();
castor::IObject* handleFilesToMigrateListRequest (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw();
castor::IObject* handleFilesToRecallListRequest (castor::IObject& obj, castor::tape::tapegateway::ITapeGatewaySvc& oraSvc, requesterInfo& requester ) throw();
utils::ShutdownBoolFunctor m_shuttingDown;
// Utility class for sorting migration reports in fseq order.
class FileMigratedFseqComparator { public:
bool operator()(const FileMigratedNotificationStruct *a, const FileMigratedNotificationStruct *b) const
{ return a->fseq() < b->fseq(); }
} m_fileMigratedFseqComparator;
};
} // end of tapegateway
......
......@@ -28,13 +28,15 @@
<UML:DataType stereotype="131663" isSpecification="false" isLeaf="false" visibility="public" namespace="130844" xmi.id="153395" isRoot="false" isAbstract="false" name="unsigned char" />
<UML:DataType stereotype="131663" isSpecification="false" isLeaf="false" visibility="public" namespace="130844" xmi.id="133771" isRoot="false" isAbstract="false" name="int" />
<UML:DataType stereotype="131663" isSpecification="false" isLeaf="false" visibility="public" namespace="130844" xmi.id="131665" isRoot="false" isAbstract="false" name="u_signed64" />
<UML:DataType stereotype="131663" isSpecification="false" isLeaf="false" visibility="public" namespace="130844" xmi.id="153392" isRoot="false" isAbstract="false" name="bool" />
<UML:DataType stereotype="131663" isSpecification="false" isLeaf="false" visibility="public" namespace="130844" xmi.id="153391" isRoot="false" isAbstract="false" name="IObject*" />
</UML:Namespace.ownedElement>
</UML:Package>
<UML:Package isSpecification="false" isLeaf="false" visibility="public" namespace="1" xmi.id="2103" isRoot="false" isAbstract="false" name="castor" >
<UML:Namespace.ownedElement>
<UML:Interface stereotype="53499" comment="Base class for all objects Implements the id methods" isSpecification="false" isLeaf="false" visibility="public" namespace="2103" xmi.id="960" isRoot="false" isAbstract="true" name="IObject" >
<UML:Interface stereotype="53499" comment="Base class for all objects
Implements the id methods" isSpecification="false" isLeaf="false" visibility="public" namespace="2103" xmi.id="960" isRoot="false" isAbstract="true" name="IObject" >
<UML:Classifier.feature>
<UML:Operation comment="Sets the id of the object" isSpecification="false" isLeaf="false" visibility="public" xmi.id="961" isRoot="false" isAbstract="true" isQuery="false" name="setId" >
<UML:BehavioralFeature.parameter>
......@@ -354,6 +356,10 @@
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="DTC53p2pEoO4" xmi.id="FilesToRecallList_xmiid" isRoot="false" isAbstract="false" name="FilesToRecallList" >
</UML:Class>
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="DTC53p2pEoO4" xmi.id="FileMigrationReportList_xmiid" isRoot="false" isAbstract="false" name="FileMigrationReportList" >
<UML:Classifier.feature>
<UML:Attribute isSpecification="false" visibility="public" xmi.id="01FileMigrationReportList_fseqSet_xmiid" type="153392" name="fseqSet" />
<UML:Attribute isSpecification="false" visibility="public" xmi.id="02FileMigrationReportList_fseq_xmiid" type="133771" name="fseq" />
</UML:Classifier.feature>
</UML:Class>
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="DTC53p2pEoO4" xmi.id="FileRecallReportList_xmiid" isRoot="false" isAbstract="false" name="FileRecallReportList" >
</UML:Class>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment