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/annot__processor_8cpp_source.html below:

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

44 using namespace

std::placeholders;

55

shared_ptr<CPSGS_Request> request,

56

shared_ptr<CPSGS_Reply> reply,

63

this, _1, _2, _3, _4),

70

this, _1, _2, _3, _4, _5),

72

this, _1, _2, _3, _4, _5)),

87

shared_ptr<CPSGS_Reply> reply)

const 96  if

(valid_annots.empty())

100  auto

startup_data_state = app->GetStartupDataState();

102  if

(request->NeedTrace()) {

104  " request because Cassandra DB is not available.\n"

+

106

request->GetStartTimestamp());

117

shared_ptr<CPSGS_Reply> reply)

const 125

shared_ptr<CPSGS_Reply> reply,

138

vector<string> valid_annots;

139  for

(

const auto

& name :

names

) {

141

valid_annots.push_back(name);

183  const string

& message)

219

message, status,

code

,

240

vector<SSatInfoEntry> bioseq_na_keyspaces = app->GetBioseqNAKeyspaces();

242  for

(

const auto

& bioseq_na_keyspace : bioseq_na_keyspaces) {

243

unique_ptr<CCassNamedAnnotFetch> details;

252

bioseq_na_keyspace.keyspace,

254

bioseq_resolution.GetBioseqInfo().GetVersion(),

255

bioseq_resolution.GetOriginalSeqIdType(),

258

details->SetLoader(fetch_task);

264  this

, _1, _2, _3, _4),

265

details.get(), bioseq_na_keyspace.sat));

269  this

, _1, _2, _3, _4, _5),

285  if

(!fetch_details->ReadFinished()) {

286

fetch_details->GetLoader()->Wait();

304

}

else if

(other_proc_priority <

m_Priority

) {

309  "Bioseq info has already been sent by the other processor. " 310  "The data are to be sent because the other processor priority ("

+

311

to_string(other_proc_priority) +

") is lower than mine ("

+

319  "Skip sending bioseq info because the other processor with priority "

+

320

to_string(other_proc_priority) +

" has already sent it " 321  "(my priority is "

+ to_string(

m_Priority

) +

")"

,

365  "Named annotation no-more-data callback"

,

369  "Named annotation data received"

,

385  "while the output has finished, ignoring"

);

435  bool

annot_was_sent =

false

;

444

annot_was_sent =

true

;

445

}

else if

(other_proc_priority <

m_Priority

) {

450  "The NA name "

+ annot_record.GetAnnotName() +

" has already " 451  "been processed by the other processor. The data are to be sent" 452  " because the other processor priority ("

+

453

to_string(other_proc_priority) +

") is lower than mine ("

+

460

annot_was_sent =

true

;

465  "Skip sending NA name "

+ annot_record.GetAnnotName() +

466  " because the other processor with priority "

+

467

to_string(other_proc_priority) +

" has already processed it " 468  "(my priority is "

+ to_string(

m_Priority

) +

")"

,

473  if

(annot_was_sent) {

477

annot_record.GetModified());

487  const string

& message)

496  bool

is_error =

IsError

(severity);

524  if

(fetch_completion_status < best_status) {

525

best_status = fetch_completion_status;

567  "Retrieve blob props for "

+ to_string(sat) +

"."

+ to_string(sat_key) +

568  " to check if the blob size is small (if so to send it right away)."

,

578

app->GetCounters().Increment(

this

,

582

to_string(blob_id.

m_Sat

) +

583  " to a Cassandra keyspace while requesting the blob props"

;

602  bool

need_to_check_blob_exclude_cache =

610  if

(need_to_check_blob_exclude_cache) {

611  bool

completed =

true

;

614  if

(app->GetExcludeBlobCache()->IsInCache(

617

completed, completed_time)) {

619  bool

finish_processing =

true

;

629

sent_mks_ago < m_AnnotRequest->m_ResendTimeoutMks) {

641

app->GetExcludeBlobCache()->Remove(

644

finish_processing =

false

;

651  if

(finish_processing) {

658

unique_ptr<CCassBlobFetch> fetch_details;

661

unique_ptr<CBlobRecord> blob_record(

new CBlobRecord

);

664  auto

blob_prop_cache_lookup_result =

676

std::move(blob_record),

678

fetch_details->SetLoader(load_task);

685

trace_msg =

"Blob properties are not found"

;

687

trace_msg =

"Blob properties are not found (cache lookup error)"

;

693

fetch_details->RemoveFromExcludeBlobCache();

704

fetch_details->SetLoader(load_task);

711  this

, _1, _2, _3, _4, _5),

712

fetch_details.get()));

724  "Cassandra request: "

+

754  "Blob properties are not found"

,

767  unsigned int

max_to_send =

max

(app->Settings().m_SendBlobIfSmall,

769  if

(blob.

GetSize

() > max_to_send) {

773  "Blob size is too large ("

+ to_string(blob.

GetSize

()) +

774  " > "

+ to_string(max_to_send) +

" max allowed to send)"

,

815  const string

& message)

841  const unsigned char

* chunk_data,

842  unsigned int

data_size,

846

chunk_data, data_size, chunk_no);

894  bool

overall_final_state =

false

;

901  if

(details->InPeek()) {

904

details->SetInPeek(

true

);

905

overall_final_state |=

x_Peek

(details, need_wait);

906

details->SetInPeek(

false

);

922

details->SetExcludeBlobCacheCompleted();

929  if

(overall_final_state) {

942  if

(!fetch_details->GetLoader())

945  bool

final_state =

false

;

947  if

(!fetch_details->ReadFinished()) {

948

final_state = fetch_details->GetLoader()->Wait();

952  if

(fetch_details->GetLoader()->HasError() &&

956  string error

= fetch_details->GetLoader()->LastError();

970

fetch_details->GetLoader()->ClearError();

971

fetch_details->SetReadFinished();

static const string kAnnotProcessorName

static CRegexp kAnnotNameRegexp("^NA\\d+\\.\\d+$", CRegexp::fCompile_ignore_case)

const string kCassandraProcessorGroupName

const string kCassandraProcessorEvent

CCassBlobTaskLoadBlob * GetLoader(void)

void SetDataReadyCB(shared_ptr< CCassDataCallbackReceiver > callback)

void SetPropsCallback(TBlobPropsCallback callback)

void SetErrorCB(TDataErrorCallback error_cb)

void SetReadFinished(void)

void SetDataReadyCB(shared_ptr< CCassDataCallbackReceiver > callback)

void SetConsumeCallback(TNAnnotConsumeCallback callback)

CCassNAnnotTaskFetch * GetLoader(void)

EPSGS_CacheLookupResult LookupBlobProp(IPSGS_Processor *processor, int sat, int sat_key, int64_t &last_modified, CBlobRecord &blob_record)

@ ePSGS_ServerSatToSatNameError

void Increment(IPSGS_Processor *processor, EPSGS_CounterType counter)

static vector< string > x_FilterNames(const vector< string > &names)

static bool x_IsNameValid(const string &name)

void x_Peek(bool need_wait)

vector< CRequestStatus::ECode > m_AnnotFetchCompletions

void x_OnSeqIdResolveFinished(SBioseqResolution &&bioseq_resolution)

virtual IPSGS_Processor * CreateProcessor(shared_ptr< CPSGS_Request > request, shared_ptr< CPSGS_Reply > reply, TProcessorPriority priority) const

Create processor to fulfil PSG request using the data source.

bool x_OnNamedAnnotData(CNAnnotRecord &&annot_record, bool last, CCassNamedAnnotFetch *fetch_details, int32_t sat)

void OnGetBlobError(CCassBlobFetch *fetch_details, CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)

SPSGS_AnnotRequest * m_AnnotRequest

bool x_NeedToRequestBlobProp(void)

virtual void Process(void)

Main processing function.

void OnGetBlobProp(CCassBlobFetch *fetch_details, CBlobRecord const &blob, bool is_found)

vector< string > m_ValidNames

void x_RequestBlobProp(int32_t sat, int32_t sat_key, int64_t last_modified)

virtual string GetGroupName(void) const

Tells the processor group name.

virtual EPSGS_Status GetStatus(void)

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

virtual void ProcessEvent(void)

Called when an event happened which may require to have some processing.

virtual ~CPSGS_AnnotProcessor()

virtual vector< string > WhatCanProcess(shared_ptr< CPSGS_Request > request, shared_ptr< CPSGS_Reply > reply) const

Needs to be implemented only for the ID/get_na requests.

void x_SendAnnotDataToClient(CNAnnotRecord &&annot_record, int32_t sat)

void x_OnNamedAnnotError(CCassNamedAnnotFetch *fetch_details, CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)

void OnAnnotBlobProp(CCassBlobFetch *fetch_details, CBlobRecord const &blob, bool is_found)

void x_OnSeqIdResolveError(CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)

void x_OnResolutionGoodData(void)

virtual string GetName(void) const

Tells the processor name (used in logging and tracing)

void x_SendBioseqInfo(SBioseqResolution &bioseq_resolution)

virtual bool CanProcess(shared_ptr< CPSGS_Request > request, shared_ptr< CPSGS_Reply > reply) const

Tells if processor can process the given request.

void OnGetBlobChunk(CCassBlobFetch *fetch_details, CBlobRecord const &blob, const unsigned char *chunk_data, unsigned int data_size, int chunk_no)

EPSGS_AccessionAdjustmentResult AdjustBioseqAccession(SBioseqResolution &bioseq_resolution)

void OnGetBlobChunk(bool cancelled, CCassBlobFetch *fetch_details, const unsigned char *chunk_data, unsigned int data_size, int chunk_no)

void OnGetBlobProp(CCassBlobFetch *fetch_details, CBlobRecord const &blob, bool is_found)

void OnGetBlobError(CCassBlobFetch *fetch_details, CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)

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

list< unique_ptr< CCassFetch > > m_FetchDetails

bool AreAllFinishedRead(void) const

IPSGS_Processor::EPSGS_Status GetStatus(void) override

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

void SignalFinishProcessing(void)

@ ePSGS_AnnotationRequest

void ResolveInputSeqId(void)

CPSGSCounters & GetCounters(void)

static CPubseqGatewayApp * GetInstance(void)

Interface class (and self-factory) for request processor objects that can retrieve data from a given ...

shared_ptr< CPSGS_Reply > m_Reply

EPSGS_Status

The GetStatus() method returns a processor current status.

shared_ptr< CPSGS_Request > m_Request

TProcessorPriority m_Priority

iterator_bool insert(const value_type &val)

const_iterator find(const key_type &key) const

const_iterator end() const

static const struct name_t names[]

static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)

EDiagSev

Severity level for the posted diagnostics.

@ eDiag_Error

Error message.

@ e500_InternalServerError

bool IsMatch(CTempString str, TMatch flags=fMatch_default)

Check existence substring which match a specified pattern.

string StripTrailingVerticalBars(const string &seq_id)

string ToJsonString(const CBioseqInfoRecord &bioseq_info, SPSGS_ResolveRequest::TPSGS_BioseqIncludeData include_data_flags, const string &custom_blob_id)

#define PSG_ERROR(message)

#define PSG_WARNING(message)

@ ePSGS_UnknownResolvedSatellite

const int kUnknownPriority

psg_clock_t::time_point psg_time_point_t

unsigned long GetTimespanToNowMks(const psg_time_point_t &t_point)

string GetCassStartupDataStateMessage(EPSGS_StartupDataState state)

EPSGS_ResolutionResult m_ResolutionResult

CBioseqInfoRecord & GetBioseqInfo(void)

bool AdjustName(shared_ptr< CPSGS_Request > request, shared_ptr< CPSGS_Reply > reply)

string ToString(void) const

CBioseqInfoRecord::TSat m_Sat

optional< SSatInfoEntry > m_Keyspace

bool MapSatToKeyspace(void)

CBioseqInfoRecord::TSatKey m_SatKey

TProcessorPriority RegisterProcessedName(TProcessorPriority priority, const string &name)

vector< string > GetNotProcessedName(TProcessorPriority priority)

TProcessorPriority RegisterBioseqInfo(TProcessorPriority priority)

void ReportBlobError(TProcessorPriority priority, EPSGS_ResultStatus rs)

unsigned long m_ResendTimeoutMks

void ReportResultStatus(const string &annot_name, EPSGS_ResultStatus rs)

EPSGS_CacheAndDbUse m_UseCache

unsigned long m_SendBlobIfSmall

EPSGS_TSEOption m_TSEOption

C++ wrappers for the Perl-compatible regular expression (PCRE) library.


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