13 #include "XrdCl/XrdClDefaultEnv.hh"
14 #include "XrdNet/XrdNetUtils.hh"
28 namespace edm::storage {
40 XrdCl::Env *
env = XrdCl::DefaultEnv::GetEnv();
42 env->PutString(
"NetworkStack",
"IPAuto");
44 XrdNetUtils::SetAuto(XrdNetUtils::prefAuto);
78 XrdCl::FileSystem fs(url);
79 std::vector<std::string> fileList;
80 fileList.push_back(url.GetPath());
84 <<
"' (errNo = " <<
status.errNo <<
")";
97 XrdCl::FileSystem fs(url);
99 XrdCl::StatInfo *
stat;
100 if (!(fs.Stat(url.GetPath(),
stat)).IsOK() || (stat ==
nullptr)) {
105 *
size = stat->GetSize();
111 if (level == oldLevel) {
114 std::lock_guard<std::mutex> guard(
m_envMutex);
124 XrdCl::DefaultEnv::SetLogLevel(
"Warning");
127 XrdCl::DefaultEnv::SetLogLevel(
"Info");
130 XrdCl::DefaultEnv::SetLogLevel(
"Debug");
133 XrdCl::DefaultEnv::SetLogLevel(
"Dump");
136 XrdCl::DefaultEnv::SetLogLevel(
"Dump");
140 ex <<
"Invalid log level specified " <<
level;
141 ex.
addContext(
"Calling XrdStorageMaker::setDebugLevel()");
151 if (oldTimeout == timeout) {
155 std::lock_guard<std::mutex> guard(
m_envMutex);
161 XrdCl::Env *
env = XrdCl::DefaultEnv::GetEnv();
163 env->PutInt(
"StreamTimeout", timeout);
164 env->PutInt(
"RequestTimeout", timeout);
165 env->PutInt(
"ConnectionWindow", timeout);
166 env->PutInt(
"StreamErrorWindow", timeout);
170 env->PutInt(
"ConnectionWindow", timeout / 6 + 1);
171 env->PutInt(
"ConnectionRetry", 2);
184 using namespace edm::storage;
bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=nullptr) const override
#define DEFINE_FWK_SERVICE_MAKER(concrete, maker)
void stagein(const std::string &proto, const std::string &path, const AuxSettings &aux) const override
std::atomic< unsigned int > m_lastTimeout
ReadHint readHint(void) const
CacheHint cacheHint(void) const
void setDebugLevel(unsigned int level) const
std::unique_ptr< Storage > wrapNonLocalFile(std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
static const unsigned int XRD_DEFAULT_TIMEOUT
std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const override
MakerResponseHandler m_null_handler
void addContext(std::string const &context)
void HandleResponse(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response) override
void setTimeout(unsigned int timeout) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
Log< level::Warning, false > LogWarning
std::atomic< unsigned int > m_lastDebugLevel
static const StorageFactory * get(void)
tuple size
Write out results.