A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/cass__processor__base_8cpp_source.html below:

NCBI C++ ToolKit: src/app/pubseq_gateway/server/cass_processor_base.cpp Source File

52

shared_ptr<CPSGS_Request> request,

53

shared_ptr<CPSGS_Reply> reply,

99  static int

error_rate =

NCBI_PARAM_TYPE

(CASSANDRA_PROCESSOR, ERROR_RATE)::GetDefault();

101  static int

error_counter = 0;

102  if

( ++error_counter >= error_rate ) {

161  if

(details->Canceled()) {

163  if

(details->ReadFinished()) {

165

details->GetLoader()->Wait();

183

ret += details->Serialize() +

" "

;

184  if

(details->Canceled()) {

187  if

(details->ReadFinished()) {

188

ret +=

"Read has finished"

;

190

ret +=

"Read has not finished"

;

194

ret +=

"No more details available"

;

206  if

(!details->Canceled()) {

207  if

(!details->ReadFinished()) {

234  proc

->ProcessEvent();

242  if

(!loader->ReadFinished()) {

244

loader->RemoveFromExcludeBlobCache();

281

shared_ptr<CPSGS_Request> request)

const 294  bool

enabled = app->Settings().m_CassandraProcessorsEnabled;

297  for

(

const auto

& dis_processor :

304  for

(

const auto

& en_processor :

320  const string

& seq_id)

332  string msg

=

"Unknown satellite number "

+ to_string(blob_id.

m_Sat

) +

333  " for bioseq info with seq_id '"

+

335

app->GetCounters().Increment(

this

,

355  string

msg_lower =

msg

;

358  return

msg_lower.find(

"timeout"

) != string::npos;

381  const string

& message,

391  string

message_prefix;

392  if

(fetch_details !=

nullptr

) {

394

message_prefix =

"Fetch context: "

+ fetch_details->

Serialize

() +

"\n"

;

399  bool

is_error =

IsError

(severity);

410  m_Reply

->SendTrace(message_prefix +

411  "Error detected. Status: "

+ to_string(status) +

412  " Code: "

+ to_string(

code

) +

414  " Message: "

+ message,

420

app->GetCounters().Increment(

this

,

429  switch

(fetch_type) {

431

app->GetCounters().Increment(

this

,

435

app->GetCounters().Increment(

this

,

439

app->GetCounters().Increment(

this

,

443

app->GetCounters().Increment(

this

,

447

app->GetCounters().Increment(

this

,

451

app->GetCounters().Increment(

this

,

455

app->GetCounters().Increment(

this

,

459

app->GetCounters().Increment(

this

,

463

app->GetCounters().Increment(

this

,

467

app->GetCounters().Increment(

this

,

471

app->GetCounters().Increment(

this

,

486

app->GetCounters().Increment(

this

,

520  bool

new_client =

m_Request

->GetIncludeHUP().has_value();

522  if

(!

m_Request

->GetIncludeHUP().value()) {

540  bool

need_trace =

m_Request

->NeedTrace();

547  auto

err_cache_ret = app->GetMyNCBIErrorCache()->GetError(cookie);

548  if

(err_cache_ret.has_value()) {

554  m_Reply

->SendTrace(

"MyNCBI cookie was found in the error cache: "

+

555

cookie +

". Call the error callback right away."

,

558

error_cb(cookie, err_cache_ret.value().m_Status,

559

err_cache_ret.value().m_Code,

560

err_cache_ret.value().m_Severity,

561

err_cache_ret.value().m_Message);

566  auto

not_found_cache_ret = app->GetMyNCBINotFoundCache()->IsNotFound(cookie);

567  if

(not_found_cache_ret) {

573  m_Reply

->SendTrace(

"MyNCBI cookie was found in the not found cache: "

+

574

cookie +

". Call the error callback right away."

,

594  auto

user_info = app->GetMyNCBIOKCache()->GetUserInfo(

this

, cookie,

598  if

(user_info.has_value()) {

602  m_Reply

->SendTrace(

"MyNCBI user info found in OK cache " 603  "in Ready state for cookie: "

+ cookie +

604  ". User name: "

+ user_info.value().m_UserInfo.username,

608  m_UserName

= user_info.value().m_UserInfo.username;

616  m_Reply

->SendTrace(

"MyNCBI cookie found in OK cache " 617  "in InProgress state for cookie: "

+ cookie +

618  ". We are in a wait list now."

,

626

uv_loop_t * loop = app->GetUVLoop();

629  m_Reply

->SendTrace(

"Initiating MyNCBI request for cookie: "

+ cookie,

634

app->GetMyNCBIFactory()->CreateWhoAmI(loop, cookie,

644

app->GetCounters().Increment(

this

,

647  string

err_msg =

GetName

() +

" processor: "

;

649

err_msg +=

"HUP retrieval is allowed (explicitly set to 'yes') but auth token is missing"

;

651

err_msg +=

"HUP retrieval is allowed (implicitly) but auth token is missing"

;

666

app->GetCounters().Increment(

this

,

669  string

err_msg =

GetName

() +

" processor: "

;

671

err_msg +=

"HUP retrieval is disallowed but auth token is present"

;

673

err_msg +=

"HUP retrieval is disallowed and auth token is missing"

;

686  const string

& my_ncbi_message)

689

app->GetCounters().Increment(

this

,

692  string

err_msg =

GetName

() +

" processor received an error from MyNCBI " 693  "while checking permissions for a Cassandra secure keyspace. Message: "

+

707

app->GetCounters().Increment(

this

,

710  string

err_msg =

GetName

() +

" processor received a not found report from MyNCBI " 711  "while checking permissions for a Cassandra secure keyspace."

;

724

app->GetCounters().Increment(

this

,

728  " processor failed to get a Cassandra connection because of an unknown reason."

;

741

app->GetCounters().Increment(

this

,

745  " processor failed to get a Cassandra connection. Message: "

+ message;

772

app->GetMyNCBIOKCache()->ClearWaitingProcessor(

m_MyNCBICookie

.value(),

776

app->GetMyNCBIOKCache()->ClearInitiatedRequest(

m_MyNCBICookie

.value());

784

app->GetCounters().Increment(

this

,

787  string

err_msg =

GetName

() +

" processor: user '"

+ user_name +

788  "' is not authorized to access " 789  "Cassandra secure satellite."

;

NCBI_PARAM_DECL(int, CASSANDRA_PROCESSOR, ERROR_RATE)

void call_on_data_cb(void *user_data)

void call_processor_process_event_cb(void *user_data)

NCBI_PARAM_DEF(int, CASSANDRA_PROCESSOR, ERROR_RATE, 0)

const string kCassandraProcessorEvent

virtual string Serialize(void) const =0

EPSGS_DbFetchType GetFetchType(void) const

@ ePSGS_FailureToGetCassConnectionCounter

@ ePSGS_BioseqInfoNotFound

@ ePSGS_AnnotationNotFound

@ ePSGS_MyNCBINotFoundCounter

@ ePSGS_SplitHistoryNotFound

@ ePSGS_IncludeHUPSetToNo

@ ePSGS_AnnotationBlobNotFound

@ ePSGS_ServerSatToSatNameError

@ ePSGS_IPGResolveNotFound

@ ePSGS_NoWebCubbyUserCookie

@ ePSGS_PublicCommentNotFound

@ ePSGS_SecureSatUnauthorizedCounter

@ ePSGS_CassQueryTimeoutError

@ ePSGS_MyNCBIErrorCounter

@ ePSGS_AccVerHistoryNotFound

void ReportFailureToGetCassConnection(void)

CRequestStatus::ECode CountError(CCassFetch *fetch_details, CRequestStatus::ECode status, int code, EDiagSev severity, const string &message, EPSGS_LoggingFlag logging_flag, EPSGS_StatusUpdateFlag status_update_flag)

void UpdateOverallStatus(CRequestStatus::ECode status)

bool IsCassandraProcessorEnabled(shared_ptr< CPSGS_Request > request) const

CRequestStatus::ECode m_Status

bool IsError(EDiagSev severity) const

SCass_BlobId TranslateSatToKeyspace(CBioseqInfoRecord::TSat sat, CBioseqInfoRecord::TSatKey sat_key, const string &seq_id)

EPSGS_MyNCBILookupResult PopulateMyNCBIUser(TMyNCBIDataCB data_cb, TMyNCBIErrorCB error_cb)

void ReportSecureSatUnauthorized(const string &user_name)

virtual ~CPSGS_CassProcessorBase()

list< unique_ptr< CCassFetch > > m_FetchDetails

@ ePSGS_FoundInNotFoundCache

@ ePSGS_IncludeHUPSetToNo

@ ePSGS_FoundInErrorCache

string GetVerboseFetches(void) const

shared_ptr< CPSG_MyNCBIRequest_WhoAmI > m_WhoAmIRequest

bool AreAllFinishedRead(void) const

bool IsMyNCBIFinished(void) const

void UnlockWaitingProcessor(void)

void CleanupMyNCBICache(void)

IPSGS_Processor::EPSGS_Status GetStatus(void) override

Tells the processor status (if it has finished or in progress)

optional< string > m_MyNCBICookie

void ReportMyNCBINotFound(void)

void ReportMyNCBIError(CRequestStatus::ECode status, const string &my_ncbi_message)

void SignalFinishProcessing(void)

CPSGS_CassProcessorBase()

virtual void Cancel(void) override

The infrastructure request to cancel processing.

void ReportNoWebCubbyUser(void)

void EnforceWait(void) const

bool IsTimeoutError(const string &msg) const

optional< string > m_UserName

void ReportExplicitIncludeHUPSetToNo(void)

static CPubseqGatewayApp * GetInstance(void)

virtual string GetName(void) const =0

Tells the processor name (used in logging and tracing)

shared_ptr< CPSGS_Reply > m_Reply

EPSGS_Status

The GetStatus() method returns a processor current status.

void PostponeInvoke(CPSGS_UvLoopBinder::TProcessorCB cb, void *user_data)

The provided callback will be called from the libuv loop assigned to the processor.

void SignalFinishProcessing(void)

A processor should call this method when it decides that there is nothing else to be done.

shared_ptr< CPSGS_Request > m_Request

TProcessorPriority m_Priority

static const char * SeverityName(EDiagSev sev)

Get a common symbolic name for the severity levels.

EDiagSev

Severity level for the posted diagnostics.

@ eDiag_Error

Error message.

@ eDiag_Warning

Warning message.

@ eDiag_Fatal

Fatal error – guarantees exit(or abort)

@ eDiag_Critical

Critical error message.

@ e500_InternalServerError

#define NCBI_PARAM_TYPE(section, name)

Generate typename for a parameter from its {section, name} attributes.

static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive compare of a substring with another string.

static string & ToLower(string &str)

Convert string to lower case – string& version.

function< void(const string &cookie, CPSG_MyNCBIRequest_WhoAmI::SUserInfo info)> TMyNCBIDataCB

function< void(const string &cookie, CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)> TMyNCBIErrorCB

Defines NCBI C++ diagnostic APIs, classes, and macros.

#define PSG_ERROR(message)

#define PSG_NOTE(message)

#define PSG_WARNING(message)

@ ePSGS_BlobBySatSatKeyFetch

@ ePSGS_SplitHistoryFetch

@ ePSGS_AnnotationBlobFetch

@ ePSGS_PublicCommentFetch

@ ePSGS_AccVerHistoryFetch

@ ePSGS_NoWebCubbyUserCookieError

@ ePSGS_SecureSatUnauthorized

@ ePSGS_UnknownResolvedSatellite

@ ePSGS_CassConnectionError

Defines CRequestStatus class for NCBI C++ diagnostic API.

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

CBioseqInfoRecord::TSat m_Sat

bool MapSatToKeyspace(void)

vector< string > m_DisabledProcessors

vector< string > m_EnabledProcessors


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4