當前位置: 首頁>>代碼示例>>C++>>正文


C++ BegLogLine函數代碼示例

本文整理匯總了C++中BegLogLine函數的典型用法代碼示例。如果您正苦於以下問題:C++ BegLogLine函數的具體用法?C++ BegLogLine怎麽用?C++ BegLogLine使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了BegLogLine函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: FlushSendBuffer

    inline iWARPEM_Status_t FlushSendBuffer()
    {
        int wlen = 0;
        mNeedsBufferFlush = false;

        pthread_spin_lock( &mAccessLock );
        size_t DataLen = mSendBuffer->GetDataLen();
        if( DataLen == 0)
        {
            BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                    << "Buffer is empty. Nothing to send."
                    << EndLogLine;
            pthread_spin_unlock( &mAccessLock );
            return IWARPEM_SUCCESS;
        }
        iWARPEM_Status_t status = mSendBuffer->FlushToSocket( mRouterConnFd, &wlen );
        BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                << "Sent " << (int)(wlen)
                << " payload: " << mSendBuffer->GetDataLen()
                << " socket: " << mRouterConnFd
                << EndLogLine;

#ifdef MULTIPLEX_STATISTICS
        mFlushCount++;
        mMsgAvg = (mMsgAvg * 0.9997) + (mMsgCount * 0.0003);
        BegLogLine( ( (mFlushCount & 0xfff) == 0 ) )
                << "average message count per send buffer:" << mMsgAvg
                << EndLogLine;

#endif
        ResetSendBuffer();
        pthread_spin_unlock( &mAccessLock );

        return status;
    }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:35,代碼來源:it_api_cnk_router_ep.hpp

示例2: RemoveClient

    iWARPEM_Status_t RemoveClient( iWARPEM_StreamId_t aClientId )
    {
        if( aClientId >= mMaxClientCount )
        {
            BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                    << "Requested client ID out of range [ 0 < " << aClientId << " < " << mMaxClientCount << " ]."
                    << EndLogLine;
            return IWARPEM_ERRNO_CONNECTION_RESET;
        }

        if( mClientCount < 1 )
        {
            BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                    << "No clients in ClientEP list."
                    << EndLogLine;
            return IWARPEM_ERRNO_CONNECTION_RESET;
        }

        if( mClientEPs[ aClientId ] == NULL )
        {
            BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                    << "Client ID: " << aClientId
                    << " is not a virtual connected ID for this RouterEP" << mRouterConnFd
                    << EndLogLine;
            return IWARPEM_ERRNO_CONNECTION_RESET;
        }
        mClientEPs[ aClientId ] = NULL;
        mClientCount--;

        BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                << "Removed client: " << aClientId
                << EndLogLine;

        return IWARPEM_SUCCESS;
    }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:35,代碼來源:it_api_cnk_router_ep.hpp

示例3: ExtractNextMessage

    iWARPEM_Status_t ExtractNextMessage( iWARPEM_Message_Hdr_t **aHdr, char **aData, iWARPEM_StreamId_t *aClientId )
    {
        iWARPEM_Status_t status = IWARPEM_SUCCESS;
        pthread_spin_lock( &mAccessLock );
        if( ! RecvDataAvailable() )
        {
            BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                    << "No data available in ReadBuffer. Reading new set of data."
                    << EndLogLine;
            switch( mReceiveBuffer->FillFromSocket( mRouterConnFd ) )
            {
            case IWARPEM_SUCCESS:
                break;
            default:
                status = IWARPEM_ERRNO_CONNECTION_RESET;
                BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                        << "Error while reading data from router endpoint."
                        << EndLogLine;
                pthread_spin_unlock( &mAccessLock );
                return status;
            }
        }
        pthread_spin_unlock( &mAccessLock );
        size_t rlen = sizeof( iWARPEM_Multiplexed_Msg_Hdr_t );
        iWARPEM_Multiplexed_Msg_Hdr_t *MultHdr = (iWARPEM_Multiplexed_Msg_Hdr_t*)mReceiveBuffer->GetHdrPtr( &rlen );
        AssertLogLine( rlen == sizeof( iWARPEM_Multiplexed_Msg_Hdr_t ) )
                << "Retrieval of HdrPtr failed: len=" << rlen
                << " expected=" << sizeof(iWARPEM_Multiplexed_Msg_Hdr_t)
                << EndLogLine;

        MultHdr->ClientID = ntohs( MultHdr->ClientID );
        *aClientId = MultHdr->ClientID;

        rlen = sizeof( iWARPEM_Message_Hdr_t );
        *aHdr = (iWARPEM_Message_Hdr_t*)mReceiveBuffer->GetHdrPtr( &rlen );
        AssertLogLine( rlen == sizeof( iWARPEM_Message_Hdr_t ) )
                << "Retrieval of HdrPtr failed: len=" << rlen
                << " expected=" << sizeof(iWARPEM_Multiplexed_Msg_Hdr_t)
                << EndLogLine;

        (*aHdr)->EndianConvert();

        rlen = (*aHdr)->mTotalDataLen;
        if( rlen )
            rlen = mReceiveBuffer->GetData( aData, &rlen );
        AssertLogLine( rlen == (*aHdr)->mTotalDataLen )
                << "Retrieval of HdrPtr failed: len=" << rlen
                << " expected=" << sizeof(iWARPEM_Multiplexed_Msg_Hdr_t)
                << EndLogLine;

        BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                << "Extracted new client message: "
                << " socket: " << mRouterConnFd
                << " client: " << MultHdr->ClientID
                << " MsgHdrSize: " << sizeof( iWARPEM_Multiplexed_Msg_Hdr_t )
                << " MsgPldSize: " << (*aHdr)->mTotalDataLen
                << " Processed: " << mReceiveBuffer->GetDataLen()
                << EndLogLine;
        return status;
    }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:60,代碼來源:it_api_cnk_router_ep.hpp

示例4: bzero

    ~iWARPEM_Multiplexed_Endpoint_t()
    {
        bzero( &mRouterInfo, sizeof( iWARPEM_Router_Info_t ));

        // go over all active EPs and flush/destroy them
        for( int i=0; i < mMaxClientCount; i++ )
            if( IsValidClient( i ) )
                RemoveClient( i );

        delete mClientEPs;
        delete mSendBuffer;
        delete mReceiveBuffer;
        pthread_spin_destroy( &mAccessLock );

        BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                << "Destroyed multiplexed router endpoint."
                << " socket: " << mRouterConnFd
                << EndLogLine;

#ifdef MULTIPLEX_STATISTICS
        BegLogLine( 1 )
                << "average message count per send buffer:" << mMsgAvg
                << EndLogLine;
#endif
    }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:25,代碼來源:it_api_cnk_router_ep.hpp

示例5: skv_bulk_insert_pack

static
int
skv_bulk_insert_pack( char *aRow, char *Key, int KeyLength, char *Value, int ValueLength )
{
  int TotalSize = 0;

  int* KeyPtr = (int *) &aRow[TotalSize];
  BegLogLine(SKV_CLIENT_ENDIAN_LOG)
    << "Endian-converting KeyLength from " << (void *) (intptr_t)KeyLength
    << EndLogLine ;
  *KeyPtr = htonl(KeyLength);
  TotalSize += sizeof(int);

  memcpy( &aRow[TotalSize],
          Key,
          KeyLength );

  TotalSize += KeyLength;

  int* ValuePtr = (int *) &aRow[TotalSize];
  BegLogLine(SKV_CLIENT_ENDIAN_LOG)
    << "Endian-converting ValueLength from " << (void *) (intptr_t)ValueLength
    << EndLogLine ;
  *ValuePtr = htonl(ValueLength);
  TotalSize += sizeof(int);

  memcpy( &aRow[TotalSize],
          Value,
          ValueLength );

  TotalSize += ValueLength;

  return TotalSize;
}
開發者ID:Scalable-Key-Value,項目名稱:code,代碼行數:34,代碼來源:skv_types.hpp

示例6: BegLogLine

  // ??? We should allow the user to set a compare function on skv_store_t
  // ??? Default behaviour should be lexicographical order
  bool
  operator<( const skv_store_t& aStore ) const
  {
    BegLogLine( SKV_STORE_T_LOG )
      << "skv_store_t::operator<():: Entering "
      << EndLogLine;

    int MinDataSize = min( mSize(), aStore.mSize() );

    AssertLogLine( mData != NULL )
      << "skv_store_t::operator<():: ERROR: "
      << " mData != NULL "
      << EndLogLine;

    AssertLogLine( aStore.mData != NULL )
      << "skv_store_t::operator<():: ERROR: "
      << " aStore.mData != NULL "
      << EndLogLine;

    int rc = memcmp( mData, aStore.mData, MinDataSize );

    BegLogLine( SKV_STORE_T_LOG )
      << "skv_store_t::operator<():: "
      << " MinDataSize: " << MinDataSize
      << " mSize: " << mSize()
      << " aStore.mSize: " << aStore.mSize()
      << " rc: " << rc
      << EndLogLine;

    return ( rc < 0 );
  }
開發者ID:Scalable-Key-Value,項目名稱:code,代碼行數:33,代碼來源:skv_types.hpp

示例7: FinalizeEPState

/***
 * skv_server_t::InitNewStateForEP::
 * Desc: Initiates the state for a new EP
 * input:
 * returns: SKV_SUCCESS or SKV_ERR_NO_EVENT
 ***/
skv_status_t
skv_server_network_event_manager_if_t::
FinalizeEPState( skv_server_epstate_map_t *aEPStateMap,
                 it_ep_handle_t aEP,
                 skv_server_ep_state_t* aStateForEP )
{
  AssertLogLine( aStateForEP != NULL )
    << "skv_server_t::FinalizeEPState(): ERROR: "
    << " aEP: " << (void *) aEP
    << EndLogLine;

  aStateForEP->Closing();

  skv_server_finalizable_associated_ep_state_list_t::iterator iter = aStateForEP->mAssociatedStateList->begin();
  skv_server_finalizable_associated_ep_state_list_t::iterator end  = aStateForEP->mAssociatedStateList->end();

  for( ; iter != end; iter++ )
  {
    switch( iter->mStateType )
    {
      case SKV_SERVER_FINALIZABLE_ASSOCIATED_EP_STATE_CREATE_CURSOR_TYPE:
      {
        skv_server_cursor_hdl_t ServCursorHdl = (skv_server_cursor_hdl_t) iter->mState;

        ServCursorHdl->Finalize();

        free( ServCursorHdl );

        break;
      }
      default:
        StrongAssertLogLine( 0 )
          << "FinalizeEPState(): ERROR:: "
          << " iter->mStateType: " << iter->mStateType
          << EndLogLine;
    }
  }

  aEPStateMap->erase( aEP );

  aStateForEP->Finalize();

  BegLogLine(SKV_SERVER_CLEANUP_LOG)
      << "free(aStateForEP= " << (void *) aStateForEP
      << " )"
      << EndLogLine ;

  bzero( aStateForEP, sizeof( skv_server_ep_state_t ) );
  delete aStateForEP;

  it_ep_free( aEP );

  BegLogLine( SKV_SERVER_CLEANUP_LOG )
    << "skv_server::FinalizeEPState(): completed "
    << EndLogLine;

  return SKV_SUCCESS;
}
開發者ID:BlueBrain,項目名稱:skv,代碼行數:64,代碼來源:skv_server_network_event_manager.cpp

示例8: insert_lookup_sequence

    static inline
    skv_status_t insert_lookup_sequence( skv_local_kv_t *aLocalKV,
                                         skv_server_ccb_t *aCommand,
                                         skv_cmd_RIU_req_t **aReq,
                                         skv_local_kv_cookie_t *aCookie,
                                         skv_lmr_triplet_t *aValueRep )
    {
        // we have copied all Req data into response buffer already at cmd init
        skv_cmd_RIU_req_t *Req = (skv_cmd_RIU_req_t *) aCommand->GetSendBuff();

        // convert only if it's the first time we arrive here...
        if( aCommand->GetCommandClass() == SKV_COMMAND_CLASS_IMMEDIATE )
            Req->EndianConvert() ;
        *aReq = Req;

        if( FlagBasedLock( aLocalKV, Req, aCommand ) != SKV_SUCCESS )
        {
            BegLogLine( ( SKV_SERVER_LOCK_LOG | SKV_SERVER_INSERT_LOG ) )
                    << "skv_server_insert_command_sm::Execute()::"
                    << " record is locked."
                    << EndLogLine;

            return SKV_ERRNO_RECORD_IS_LOCKED;
        }

        // Check if the key is in the buffer
        int KeySize = Req->mKeyValue.mKeySize;

        BegLogLine( SKV_SERVER_INSERT_LOG )
                << "skv_server_insert_command_sm:: Lookup with flags: " << (void*)( (uintptr_t)Req->mFlags & (SKV_COMMAND_RIU_INSERT_EXPANDS_VALUE
                        | SKV_COMMAND_RIU_INSERT_OVERWRITE_VALUE_ON_DUP
                        | SKV_COMMAND_RIU_UPDATE
                        | SKV_COMMAND_RIU_APPEND) )
                << EndLogLine;

        AssertLogLine( Req->mKeyValue.mKeySize >= 0 &&
                       Req->mKeyValue.mKeySize < SKV_KEY_LIMIT )
                << "skv_server_insert_command_sm:: Execute():: ERROR: "
                << "Req->mKeyValue.mKeySize: " << Req->mKeyValue.mKeySize
                << EndLogLine;

        AssertLogLine( (Req->mFlags & SKV_COMMAND_RIU_INSERT_KEY_FITS_IN_CTL_MSG) ||
                       (Req->mFlags & SKV_COMMAND_RIU_INSERT_KEY_VALUE_FIT_IN_CTL_MSG) )
                << "skv_server_insert_command_sm:: Execute():: ERROR: "
                << " Assume that key fits into the control message"
                << EndLogLine;

        // Check if the key exists
        return aLocalKV->Lookup( Req->mPDSId,
                                 Req->mKeyValue.mData,
                                 KeySize,
                                 Req->mFlags,
                                 aValueRep,
                                 aCookie );
    }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:55,代碼來源:skv_server_insert_command_sm.hpp

示例9: insert_sequence

    static inline
    skv_status_t insert_sequence( skv_local_kv_t *aLocalKV,
                                  skv_server_ep_state_t *aEPState,
                                  skv_server_ccb_t *aCommand,
                                  int aCommandOrdinal,
                                  skv_cmd_RIU_req_t *aReq,
                                  skv_status_t lookup_status,
                                  int *aSeqNo,
                                  int aMyRank,
                                  skv_lmr_triplet_t *aValueRepInStore )
    {
        skv_status_t status;
        skv_lmr_triplet_t ValueRepForRdmaRead;

        BegLogLine( SKV_SERVER_INSERT_LOG )
                << "skv_server_insert_command_sm::Execute():: Lookup returned: " << skv_status_to_string( lookup_status )
                << " will go for case: " << (void*)( (uintptr_t)aReq->mFlags & (SKV_COMMAND_RIU_INSERT_EXPANDS_VALUE
                        | SKV_COMMAND_RIU_INSERT_OVERWRITE_VALUE_ON_DUP
                        | SKV_COMMAND_RIU_UPDATE
                        | SKV_COMMAND_RIU_APPEND) )
                << EndLogLine;

#ifdef SKV_INSERT_DATA_LOG
        if( aReq->mFlags & SKV_COMMAND_RIU_INSERT_KEY_VALUE_FIT_IN_CTL_MSG )
        {
            HexDump FxString( &aReq->mKeyValue.mData[ aReq->mKeyValue.mKeySize ], aReq->mKeyValue.mValueSize );

            BegLogLine( 1 )
                    << "skv_server_insert_command_sm::insert_sequence(): "
                    << " Size: " << aReq->mKeyValue.mValueSize
                    << " FxString: " << FxString
                    << EndLogLine;
        }
        else
            BegLogLine( 1 )
                    << "skv_server_insert_command_sm::insert_sequence(): Data not in ctrl-msg. can't display."
                    << EndLogLine;
#endif

        skv_local_kv_cookie_t *cookie = &aCommand->mLocalKVCookie;
        cookie->Set( aCommandOrdinal, aEPState );
        status = aLocalKV->Insert( aReq,
                                   lookup_status,
                                   aValueRepInStore,
                                   &ValueRepForRdmaRead,
                                   cookie );
        BegLogLine( SKV_SERVER_INSERT_LOG )
                << "skv_server_insert_command_sm::insert_sequence():: Insert returned: " << skv_status_to_string( status )
                << EndLogLine;

        aValueRepInStore->Init( ValueRepForRdmaRead );

        return status;
    }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:54,代碼來源:skv_server_insert_command_sm.hpp

示例10: GetNextMessageType

    // needs to make sure to not change the status of the receive buffer
    iWARPEM_Status_t GetNextMessageType( iWARPEM_Msg_Type_t *aMsgType, iWARPEM_StreamId_t *aClient )
    {
        iWARPEM_Status_t status = IWARPEM_SUCCESS;
        pthread_spin_lock( &mAccessLock );
        if( ! RecvDataAvailable() )
        {
            BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                    << "No data available in ReadBuffer. Reading new set of data."
                    << EndLogLine;
            status = mReceiveBuffer->FillFromSocket( mRouterConnFd );
            switch( status )
            {
            case IWARPEM_SUCCESS:
                break;
            default:
                BegLogLine( 1 )
                        << "Error while reading data from router endpoint."
                        << EndLogLine;
                *aClient = IWARPEM_INVALID_CLIENT_ID;
                *aMsgType = iWARPEM_UNKNOWN_REQ_TYPE;
                pthread_spin_unlock( &mAccessLock );
                return status;
            }
        }
        pthread_spin_unlock( &mAccessLock );
        size_t hdrlen = sizeof( iWARPEM_Multiplexed_Msg_Hdr_t );
        iWARPEM_Multiplexed_Msg_Hdr_t *MultHdr = (iWARPEM_Multiplexed_Msg_Hdr_t*)mReceiveBuffer->GetHdrPtr( &hdrlen, 0 );
        AssertLogLine( hdrlen == sizeof( iWARPEM_Multiplexed_Msg_Hdr_t ) )
                << "Retrieval of HdrPtr failed: len=" << hdrlen
                << " expected=" << sizeof(iWARPEM_Multiplexed_Msg_Hdr_t)
                << EndLogLine;

        MultHdr->ClientID = be64toh( MultHdr->ClientID );
        *aClient = MultHdr->ClientID;

        // advance the hdr ptr ourselves to peek into MsgType without advancing the receive buffer ptr
        char *HdrData = (char*)MultHdr;
        HdrData += sizeof( iWARPEM_Multiplexed_Msg_Hdr_t );
        HdrData = (char*)mReceiveBuffer->AlignedHeaderPosition( HdrData );

        iWARPEM_Message_Hdr_t *MsgPtr = (iWARPEM_Message_Hdr_t*)HdrData;

        BegLogLine( FXLOG_IT_API_O_SOCKETS_MULTIPLEX_LOG )
                << "Retrieving msg_type: " << MsgPtr->mMsg_Type
                << " from client: " << *aClient
                << " [email protected]: " << (void*)(MsgPtr)
                << " len: " << MsgPtr->mTotalDataLen
                << EndLogLine;

        *aMsgType = MsgPtr->mMsg_Type;
        return status;
    }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:53,代碼來源:it_api_cnk_router_ep.hpp

示例11: BegLogLine

skv_status_t
skv_local_kv_asyncmem::PerformRetrieve( skv_local_kv_request_t *aReq )
{
  size_t TotalSize;
  skv_lmr_triplet_t StoredValueRep;
  skv_local_kv_retrieve_request_t *Retrieve = &aReq->mRequest.mRetrieve;

  skv_status_t status = mPDSManager.Retrieve( Retrieve->mPDSId,
                                              Retrieve->mKeyData,
                                              Retrieve->mKeySize,
                                              Retrieve->mValueOffset,
                                              Retrieve->mValueSize,
                                              Retrieve->mFlags,
                                              &StoredValueRep );

  int ValueOversize = 0;
  if (status == SKV_SUCCESS)
  {
    TotalSize = StoredValueRep.GetLen();
    ValueOversize = StoredValueRep.GetLen() - Retrieve->mValueSize;
    if( ValueOversize > 0 )
    {
      BegLogLine( SKV_LOCAL_KV_BACKEND_LOG )
        << "skv_local_kv_asyncmem:: ADJUSTING rdma_write length to match smaller client buffer"
        << " client: " << Retrieve->mValueSize
        << " store: " << StoredValueRep.GetLen()
        << EndLogLine;

      StoredValueRep.SetLenIfSmaller( Retrieve->mValueSize );
    }

    int RoomForData = ((skv_header_as_cmd_buffer_t*)aReq)->GetRoomForData( sizeof( skv_cmd_retrieve_value_rdma_write_ack_t) );

    if( RoomForData < StoredValueRep.GetLen() )
      status = SKV_ERRNO_NEED_DATA_TRANSFER;
  }
  else
    TotalSize = 0;

  BegLogLine( SKV_LOCAL_KV_BACKEND_LOG )
    << "skv_local_kv_asyncmem:: storing valueRep:" << StoredValueRep
    << " status:" << skv_status_to_string( status )
    << EndLogLine;

  status = InitKVRDMAEvent( aReq->mCookie,
                            &StoredValueRep,
                            TotalSize,
                            status );
  return status;
}
開發者ID:BlueBrain,項目名稱:skv,代碼行數:50,代碼來源:skv_local_kv_asyncmem.cpp

示例12: BegLogLine

skv_status_t
skv_local_kv_inmem::Retrieve( skv_pds_id_t aPDSId,
                              char* aKeyData,
                              int aKeySize,
                              int aValueOffset,
                              int aValueSize,
                              skv_cmd_RIU_flags_t aFlags,
                              skv_lmr_triplet_t* aStoredValueRep,
                              int *aTotalSize,
                              skv_local_kv_cookie_t *aCookie )
{
  skv_status_t status = mPDSManager.Retrieve( aPDSId,
                                              aKeyData,
                                              aKeySize,
                                              aValueOffset,
                                              aValueSize,
                                              aFlags,
                                              aStoredValueRep );
  int ValueOversize = 0;
  if ((status == SKV_SUCCESS) || (status == SKV_ERRNO_NEED_DATA_TRANSFER))
  {
    *aTotalSize = aStoredValueRep->GetLen();
    ValueOversize = aStoredValueRep->GetLen() - aValueSize;
    if( ValueOversize > 0 )
    {
      BegLogLine( SKV_LOCAL_KV_BACKEND_LOG )
        << "skv_local_kv_inmem:: ADJUSTING rdma_write length to match smaller client buffer"
        << " client: " << aValueSize
        << " store: " << aStoredValueRep->GetLen()
        << EndLogLine;

      aStoredValueRep->SetLenIfSmaller( aValueSize );
    }

    int RoomForData = ((skv_header_as_cmd_buffer_t*)aReq)->GetRoomForData( sizeof( skv_cmd_retrieve_value_rdma_write_ack_t) );

    if( RoomForData < StoredValueRep.GetLen() )
      status = SKV_ERRNO_NEED_DATA_TRANSFER;
  }
  else
    *aTotalSize = 0;

  BegLogLine( SKV_LOCAL_KV_BACKEND_LOG )
    << "skv_local_kv_inmem:: storing valueRep:" << *aStoredValueRep
    << " status:" << skv_status_to_string( status )
    << EndLogLine;

  return status;
}
開發者ID:BlueBrain,項目名稱:skv,代碼行數:49,代碼來源:skv_local_kv_inmem.cpp

示例13: skv_bulk_insert_get_key_value_refs

/***************************************************
 * Layout of the bulk row
 * { key_size, key, value_size, value }
 **************************************************/
static
int
skv_bulk_insert_get_key_value_refs( char *aRow, char **Key, int &KeyLength, char **Value, int & ValueLength )
{
  int Sint = sizeof(int);

  char * Cursor = aRow;

  int *klen = (int *) Cursor;
  BegLogLine(SKV_CLIENT_ENDIAN_LOG)
    << " &KeyLength= " << (void *) &KeyLength
    << " " << (long) &KeyLength
    << " klen= " << (void *) klen
    << " " << (long) klen
    << " " << EndLogLine ;
  int Starklen = *klen ;
  int LocalKeyLength = ntohl(Starklen) ;
  BegLogLine(SKV_CLIENT_ENDIAN_LOG)
    << "Endian-converted from " << (void *) (intptr_t)Starklen
    << " to " << LocalKeyLength
    << EndLogLine ;
  KeyLength = LocalKeyLength;
  BegLogLine(SKV_CLIENT_ENDIAN_LOG)
    << "Endian-converting KeyLength from " << (void *) (intptr_t)(*klen)
    << EndLogLine ;

  Cursor += Sint;
  *Key = Cursor;

  Cursor += KeyLength;

  int *vlen = (int *) Cursor;
  ValueLength = ntohl(*vlen);

  BegLogLine(SKV_CLIENT_ENDIAN_LOG)
    << "Endian-converting ValueLength from " << (void *) (intptr_t)(*vlen)
    << EndLogLine ;

  Cursor += Sint;
  *Value = Cursor;

  BegLogLine(SKV_CLIENT_ENDIAN_LOG)
    << "KeyLength=" << KeyLength
    << " ValueLength=" << ValueLength
    << EndLogLine ;

  return KeyLength + ValueLength + 2 * Sint;
}
開發者ID:Scalable-Key-Value,項目名稱:code,代碼行數:52,代碼來源:skv_types.hpp

示例14: InsertLocal

/****************************************************
 * Insert the record into local store.
 ****************************************************/
static inline
skv_status_t
InsertLocal( skv_cmd_RIU_req_t *aReq,
             char *aAddr,
             int aKeySize,
             int aTotalValueSize,
             skv_pds_manager_if_t *aPDSManager,
             int aMyRank )
{
  gSKVServerInsertInTreeStart.HitOE( SKV_SERVER_INSERT_TRACE,
                                     "SKVServerInsertInTree",
                                     aMyRank,
                                     gSKVServerInsertInTreeStart );

  skv_status_t status = aPDSManager->Insert( aReq->mPDSId,
                                             aAddr,
                                             aKeySize,
                                             aTotalValueSize );

  gSKVServerInsertInTreeFinis.HitOE( SKV_SERVER_INSERT_TRACE,
                                     "SKVServerInsertInTree",
                                     aMyRank,
                                     gSKVServerInsertInTreeFinis );

  BegLogLine( (SKV_LOCAL_KV_BACKEND_LOG && (status != SKV_SUCCESS )) )
    << "skv_local_kv_inmem::InsertLocal():: ERROR: "
    << " status: " << skv_status_to_string( status )
    << EndLogLine;

  return status;
}
開發者ID:BlueBrain,項目名稱:skv,代碼行數:34,代碼來源:skv_local_kv_inmem.cpp

示例15: Init

  skv_status_t Init( it_pz_handle_t aPZ_Hdl,
                     size_t aDataAreaSize,
                     size_t aDataChunkSize,
                     size_t aAlignment=sizeof(uintptr_t) )
  {
    StrongAssertLogLine( aDataAreaSize % aAlignment == 0 )
      << "skv_local_kv_rdma_data_buffer_t::Init(): Area size has to be multiple of Alignment"
      << " size=" << aDataAreaSize
      << " align=" << aAlignment
      << EndLogLine;

    mAlignment = aAlignment;
    size_t pad = sizeof( skv_lmr_wait_queue_t) - (sizeof( skv_lmr_wait_queue_t ) % aAlignment);
    if( pad==aAlignment ) pad = 0;
    mHeadSpace = sizeof( skv_lmr_wait_queue_t) + pad;

    mDataArea = new char[ aDataAreaSize ];
    StrongAssertLogLine( mDataArea != NULL )
      << "skv_local_kv_rdma_data_buffer_t::Init(): Failed to allocate data area of size: " << aDataAreaSize
      << EndLogLine;

    mChunkSize = aDataChunkSize;

    it_mem_priv_t privs     = (it_mem_priv_t) ( IT_PRIV_LOCAL | IT_PRIV_REMOTE );
    it_lmr_flag_t lmr_flags = IT_LMR_FLAG_NON_SHAREABLE;
    it_lmr_handle_t lmr;
    it_rmr_context_t rmr;

    it_status_t itstatus = it_lmr_create( aPZ_Hdl,
                                          mDataArea,
                                          NULL,
                                          aDataAreaSize,
                                          IT_ADDR_MODE_ABSOLUTE,
                                          privs,
                                          lmr_flags,
                                          0,
                                          & lmr,
                                          & rmr );

    StrongAssertLogLine( itstatus == IT_SUCCESS )
      << "skv_tree_based_container_t::Init:: ERROR:: itstatus == IT_SUCCESS "
      << " itstatus: " << itstatus
      << EndLogLine;

    mLMR.InitAbs( lmr, mDataArea, aDataAreaSize );
    mRMR.Init( rmr, mDataArea, aDataAreaSize );

    mFirstFree.Init( mDataArea, aDataAreaSize, mAlignment );
    mLastBusy.Init( mDataArea, aDataAreaSize, mAlignment );

    BegLogLine( SKV_LOCAL_KV_RDMA_DATA_BUFFER_LOG )
      << "skv_local_kv_rdma_data_buffer_t: FF[" << (uintptr_t)mFirstFree.GetPtr() << "]"
      << " LB[" << (uintptr_t)mLastBusy.GetPtr() << "]"
      << " mHeadSpace=" << mHeadSpace
      << " mAlignment=" << mAlignment
      << EndLogLine;


    return SKV_SUCCESS;
  }
開發者ID:BlueBrain,項目名稱:skv,代碼行數:60,代碼來源:skv_local_kv_rdma_data_buffer.hpp


注:本文中的BegLogLine函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。