|
|
#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 23 of file XrdSource.h.
◆ Source() [1/2]
XrdAdaptor::Source::Source |
( |
const Source & |
| ) |
|
|
delete |
◆ Source() [2/2]
Source::Source |
( |
timespec |
now, |
|
|
std::unique_ptr< XrdCl::File > |
fileHandle, |
|
|
const std::string & |
exclude |
|
) |
| |
Definition at line 181 of file XrdSource.cc.
195 if (!
m_fh->GetProperty(
"DataServer",
m_id)) {
196 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 219 of file XrdSource.cc.
220 size_t pos =
id.find(
':');
222 if ((
pos != std::string::npos) && (
pos > 0)) {
223 hostname =
id.substr(0,
pos);
227 if (!hostname.empty() && ((hostname[0] ==
'[') || isdigit(hostname[0]))) {
229 struct addrinfo hints;
230 memset(&hints, 0,
sizeof(
struct addrinfo));
231 hints.ai_family = AF_UNSPEC;
233 if (!getaddrinfo(hostname.c_str(),
nullptr, &hints, &
result)) {
234 std::vector<char>
host;
236 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 382 of file XrdSource.cc.
383 edm::LogVerbatim(
"XrdAdaptorInternal") <<
"Reading from " <<
ID() <<
", quality " <<
m_qm->get() << std::endl;
384 c->m_source = shared_from_this();
385 c->m_self_reference =
c;
386 m_qm->startWatch(
c->m_qmw);
389 c->setStatistics(readStats);
393 std::this_thread::sleep_for(std::chrono::milliseconds(XRD_DELAY));
396 XrdCl::XRootDStatus
status;
402 cl.reserve(
c->m_iolist->size());
403 for (
const auto &it : *
c->m_iolist) {
404 cl.emplace_back(it.offset(), it.size(), it.data());
412 ex <<
"XrdFile::Read or XrdFile::VectorRead failed with error: '" <<
status.ToStr() <<
"' (errNo = " <<
status.errNo
414 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 |
◆ operator=()
◆ 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
std::atomic< int > g_delayCount
std::shared_ptr< XrdSiteStatistics const > stats() const
edm::propagate_const< std::unique_ptr< QualityMetricSource > > m_qm
std::shared_ptr< XrdCl::File const > fh() const
static void validateList(const XrdCl::ChunkList &cl)
constexpr element_type const * get() const
edm::propagate_const< std::shared_ptr< XrdSiteStatistics > > m_stats
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Log< level::Info, false > LogInfo
Log< level::Warning, false > LogWarning
edm::propagate_const< std::shared_ptr< XrdCl::File > > m_fh
static std::shared_ptr< XrdReadStatistics > startRead(std::shared_ptr< XrdSiteStatistics > parent, std::shared_ptr< ClientRequest > req)
static XrdCl::XRootDStatus query(XrdCl::FileSystem &fs, const std::string &attr, std::chrono::milliseconds timeout, std::string &result)
static bool getDomain(const std::string &host, std::string &domain)
struct timespec m_lastDowngrade
static bool isDCachePool(XrdCl::File &file, const XrdCl::HostList *hostList=nullptr)
static bool getXrootdSiteFromURL(std::string url, std::string &site)
static std::unique_ptr< QualityMetricSource > get(timespec now, const std::string &id)
Log< level::Info, true > LogVerbatim
static bool getXrootdSite(XrdCl::File &file, std::string &site)
const std::string & ID() const
static bool getHostname(const std::string &id, std::string &hostname)