DataStoreHandler

DataStore is the service for inserting accounting reports (rows) in the Accounting DB

This service CAN be duplicated iff the first is a “master” and all the others are slaves. See the information about DataStore Helpers.
DataStore options
DataStore
{
  Port = 9133
  # Run compaction, has to be True for Master, False for others
  RunBucketing = True
  Authorization
  {
    Default = authenticated
    compactDB = ServiceAdministrator
    deleteType = ServiceAdministrator
    registerType = ServiceAdministrator
    setBucketsLength = ServiceAdministrator
    regenerateBuckets = ServiceAdministrator
  }
}
class DIRAC.AccountingSystem.Service.DataStoreHandler.DataStoreHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

DISET implementation of service for inserting records in accountingDB.

exception ConnectionError(msg)

Bases: exceptions.Exception

__init__(msg)

x.__init__(…) initializes x; see help(type(x)) for signature

args
message
__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
export_commit(typeName, startTime, endTime, valuesList)

Add a record for a type

export_commitRegisters(entriesList)

Add a record for a type

export_compactDB()

Compact the db by grouping buckets

export_deleteType(typeName)

Delete accounting type and ALL its contents. VERY DANGEROUS! (Only for all powerful admins) (Bow before me for I am admin! :)

static export_echo(data)

This method is used for testing performance of the service

Parameters:data (str) – data to be sent back to the caller
Returns:S_OK, Value is the input data
export_getRegisteredTypes()

Get a list of registered types (Only for all powerful admins) (Bow before me for I am admin! :)

export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters:fromMaster (bool) – flag to refresh from the master configuration service
export_regenerateBuckets(typeName)

Recalculate buckets. (Only for all powerful admins) (Bow before me for I am admin! :)

export_registerType(typeName, definitionKeyFields, definitionAccountingFields, bucketsLength)

Register a new type. (Only for all powerful admins) (Bow before me for I am admin! :)

export_remove(typeName, startTime, endTime, valuesList)

Remove a record for a type

export_removeRegisters(entriesList)

Remove a record for a type

export_setBucketsLength(typeName, bucketsLength)

Change the buckets Length. (Only for all powerful admins) (Bow before me for I am admin! :)

classmethod getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:Value for serviceSection/optionName in the CS being defaultValue the default
getRemoteAddress()

Get the address of the remote peer.

Returns:Address of remote peer.
getRemoteCredentials()

Get the credentials of the remote peer.

Returns:Credentials dictionary of remote peer.
initialize()

Initialize this instance of the handler (to be overwritten)

classmethod initializeHandler(svcInfoDict)
srv_disconnect(trid=None)
classmethod srv_disconnectClient(trid)
srv_getActionTuple()
classmethod srv_getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:Value for serviceSection/optionName in the CS being defaultValue the default
srv_getClientSetup()
srv_getClientVO()
srv_getClientVersion()
srv_getFormattedRemoteCredentials()
classmethod srv_getMonitor()
srv_getRemoteAddress()

Get the address of the remote peer.

Returns:Address of remote peer.
srv_getRemoteCredentials()

Get the credentials of the remote peer.

Returns:Credentials dictionary of remote peer.
classmethod srv_getServiceName()
srv_getTransportID()
classmethod srv_getURL()
classmethod srv_msgCreate(msgName)
srv_msgReply(msgObj)
classmethod srv_msgSend(trid, msgObj)
transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)
transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileId, token, fileHelper)
types_commit = [<type 'basestring'>, <type 'datetime.datetime'>, <type 'datetime.datetime'>, <type 'list'>]
types_commitRegisters = [<type 'list'>]
types_compactDB = []
types_deleteType = [<type 'basestring'>]
types_echo = [<type 'basestring'>]
types_getRegisteredTypes = []
types_ping = []
types_refreshConfiguration = [<type 'bool'>]
types_regenerateBuckets = [<type 'basestring'>]
types_registerType = [<type 'basestring'>, <type 'list'>, <type 'list'>, <type 'list'>]
types_remove = [<type 'basestring'>, <type 'datetime.datetime'>, <type 'datetime.datetime'>, <type 'list'>]
types_removeRegisters = [<type 'list'>]
types_setBucketsLength = [<type 'basestring'>, <type 'list'>]