#include <XrdSource.h>
|
static void | determineHostExcludeString (XrdCl::File &file, const XrdCl::HostList *hostList, std::string &exclude) |
|
static bool | getDomain (const std::string &host, std::string &domain) |
|
static bool | getHostname (const std::string &id, std::string &hostname) |
|
static bool | getXrootdSite (XrdCl::File &file, std::string &site) |
|
static bool | getXrootdSiteFromURL (std::string url, std::string &site) |
|
static bool | isDCachePool (const std::string &url) |
|
static bool | isDCachePool (XrdCl::File &file, const XrdCl::HostList *hostList=nullptr) |
|
Definition at line 25 of file XrdSource.h.
◆ Source()
Source::Source |
( |
timespec |
now, |
|
|
std::unique_ptr< XrdCl::File > |
fileHandle, |
|
|
const std::string & |
exclude |
|
) |
| |
Definition at line 176 of file XrdSource.cc.
190 if (!
m_fh->GetProperty(
"DataServer",
m_id)) {
191 edm::LogWarning(
"XrdFileWarning") <<
"Source::Source() failed to determine data server name.'";
◆ ~Source()
◆ determineHostExcludeString()
void Source::determineHostExcludeString |
( |
XrdCl::File & |
file, |
|
|
const XrdCl::HostList * |
hostList, |
|
|
std::string & |
exclude |
|
) |
| |
|
static |
◆ ExcludeID()
const std::string& XrdAdaptor::Source::ExcludeID |
( |
| ) |
const |
|
inline |
◆ fh() [1/2]
std::shared_ptr<XrdCl::File>& XrdAdaptor::Source::fh |
( |
| ) |
|
|
inlineprivate |
◆ fh() [2/2]
std::shared_ptr<XrdCl::File const> XrdAdaptor::Source::fh |
( |
| ) |
const |
|
inlineprivate |
◆ getDomain()
bool Source::getDomain |
( |
const std::string & |
host, |
|
|
std::string & |
domain |
|
) |
| |
|
static |
◆ getFileHandle()
std::shared_ptr< XrdCl::File > Source::getFileHandle |
( |
| ) |
|
◆ getHostname()
bool Source::getHostname |
( |
const std::string & |
id, |
|
|
std::string & |
hostname |
|
) |
| |
|
static |
Definition at line 214 of file XrdSource.cc.
215 size_t pos =
id.find(
":");
217 if ((
pos != std::string::npos) && (
pos > 0)) {
218 hostname =
id.substr(0,
pos);
222 if (!hostname.empty() && ((hostname[0] ==
'[') || isdigit(hostname[0]))) {
224 struct addrinfo hints;
225 memset(&hints, 0,
sizeof(
struct addrinfo));
226 hints.ai_family = AF_UNSPEC;
228 if (!getaddrinfo(hostname.c_str(),
nullptr, &hints, &
result)) {
229 std::vector<char>
host;
231 if (!getnameinfo(
result->ai_addr,
result->ai_addrlen, &
host[0], 255,
nullptr, 0, NI_NAMEREQD)) {
References query::host, triggerObjects_cff::id, and mps_fire::result.
Referenced by getDomain(), XrdAdaptor::RequestManager::initialize(), and XrdAdaptor::RequestManager::queueUpdateCurrentServer().
◆ getLastDowngrade()
struct timespec XrdAdaptor::Source::getLastDowngrade |
( |
| ) |
const |
|
inline |
◆ getQuality()
unsigned XrdAdaptor::Source::getQuality |
( |
| ) |
|
|
inline |
◆ getXrootdSite()
bool Source::getXrootdSite |
( |
XrdCl::File & |
file, |
|
|
std::string & |
site |
|
) |
| |
|
static |
◆ getXrootdSiteFromURL()
bool Source::getXrootdSiteFromURL |
( |
std::string |
url, |
|
|
std::string & |
site |
|
) |
| |
|
static |
◆ handle() [1/2]
void XrdAdaptor::Source::handle |
( |
RequestList & |
| ) |
|
◆ handle() [2/2]
Definition at line 377 of file XrdSource.cc.
378 edm::LogVerbatim(
"XrdAdaptorInternal") <<
"Reading from " <<
ID() <<
", quality " <<
m_qm->get() << std::endl;
379 c->m_source = shared_from_this();
380 c->m_self_reference =
c;
381 m_qm->startWatch(
c->m_qmw);
384 c->setStatistics(readStats);
388 std::this_thread::sleep_for(std::chrono::milliseconds(XRD_DELAY));
391 XrdCl::XRootDStatus
status;
397 cl.reserve(
c->m_iolist->size());
398 for (
const auto &it : *
c->m_iolist) {
399 cl.emplace_back(it.offset(), it.size(), it.data());
407 ex <<
"XrdFile::Read or XrdFile::VectorRead failed with error: '" <<
status.ToStr() <<
"' (errNo = " <<
status.errNo
409 ex.addContext(
"Calling Source::handle");
References cms::Exception::addContext(), HltBtagPostValidation_cff::c, GetRecoTauVFromDQM_MC_cff::cl, edm::errors::FileReadError, ID(), m_fh, m_qm, m_stats, XrdAdaptor::XrdSiteStatistics::startRead(), stats(), mps_update::status, and validateList().
◆ ID()
const std::string& XrdAdaptor::Source::ID |
( |
| ) |
const |
|
inline |
◆ isDCachePool() [1/2]
bool Source::isDCachePool |
( |
const std::string & |
url | ) |
|
|
static |
◆ isDCachePool() [2/2]
bool Source::isDCachePool |
( |
XrdCl::File & |
file, |
|
|
const XrdCl::HostList * |
hostList = nullptr |
|
) |
| |
|
static |
◆ PrettyID()
const std::string& XrdAdaptor::Source::PrettyID |
( |
| ) |
const |
|
inline |
◆ requestCallback()
void XrdAdaptor::Source::requestCallback |
( |
| ) |
|
|
private |
◆ setLastDowngrade()
void XrdAdaptor::Source::setLastDowngrade |
( |
struct timespec |
now | ) |
|
|
inline |
◆ setXrootdSite()
void Source::setXrootdSite |
( |
| ) |
|
|
private |
◆ Site()
const std::string& XrdAdaptor::Source::Site |
( |
| ) |
const |
|
inline |
◆ stats() [1/2]
◆ stats() [2/2]
◆ m_exclude
std::string XrdAdaptor::Source::m_exclude |
|
private |
◆ m_fh
◆ m_id
std::string XrdAdaptor::Source::m_id |
|
private |
◆ m_lastDowngrade
struct timespec XrdAdaptor::Source::m_lastDowngrade |
|
private |
◆ m_prettyid
std::string XrdAdaptor::Source::m_prettyid |
|
private |
◆ m_qm
◆ m_site
std::string XrdAdaptor::Source::m_site |
|
private |
◆ m_stats