Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert multisource xrootd #724

Merged
merged 1 commit into from
Sep 5, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions IOPool/Input/src/RootInputFileSequence.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ namespace edm {
bool hasFallbackUrl = !fallbackName.empty() && fallbackName != fileIter_->fileName();

boost::shared_ptr<InputFile> filePtr;
std::list<std::string> originalInfo;
try {
std::unique_ptr<InputSource::FileOpenSentry>
sentry(inputType_ == InputType::Primary ? new InputSource::FileOpenSentry(input_, lfn_, usedFallback_) : 0);
Expand All @@ -208,7 +207,6 @@ namespace edm {
out << e.explainSelf();
std::string pfn(gSystem->ExpandPathName(fallbackName.c_str()));
InputFile::reportFallbackAttempt(pfn, fileIter_->logicalFileName(), out.str());
originalInfo = e.additionalInfo();
} else {
InputFile::reportSkippedFile(fileIter_->fileName(), fileIter_->logicalFileName());
Exception ex(errors::FileOpenError, "", e);
Expand All @@ -235,15 +233,7 @@ namespace edm {
std::ostringstream out;
out << "Input file " << fileIter_->fileName() << " could not be opened.\n";
out << "Fallback Input file " << fallbackName << " also could not be opened.";
if (originalInfo.size()) {
out << std::endl << "Original exception info is above; fallback exception info is below.";
ex.addAdditionalInfo(out.str());
for (auto const & s : originalInfo) {
ex.addAdditionalInfo(s);
}
} else {
ex.addAdditionalInfo(out.str());
}
ex.addAdditionalInfo(out.str());
throw ex;
}
}
Expand Down
2 changes: 0 additions & 2 deletions Utilities/XrdAdaptor/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
<use name="FWCore/Utilities"/>
<use name="FWCore/MessageLogger"/>
<use name="xrootd"/>
<lib name="XrdCl"/>
<lib name="XrdUtils"/>
<flags CPPDEFINES="_FILE_OFFSET_BITS=64"/>
124 changes: 0 additions & 124 deletions Utilities/XrdAdaptor/doc/multisource_algorithm_design.txt

This file was deleted.

1 change: 0 additions & 1 deletion Utilities/XrdAdaptor/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<library file="XrdStorageMaker.cc" name="UtilitiesXrdAdaptorPlugin">
<use name="Utilities/StorageFactory"/>
<use name="Utilities/XrdAdaptor"/>
<lib name="XrdCl"/>
<flags EDM_PLUGIN="1"/>
<flags CXXFLAGS="-D_FILE_OFFSET_BITS=64"/>
</library>
37 changes: 7 additions & 30 deletions Utilities/XrdAdaptor/plugins/XrdStorageMaker.cc
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@

#include "FWCore/Utilities/interface/EDMException.h"

#include "Utilities/StorageFactory/interface/StorageMaker.h"
#include "Utilities/StorageFactory/interface/StorageMakerFactory.h"
#include "Utilities/StorageFactory/interface/StorageFactory.h"
#include "Utilities/XrdAdaptor/src/XrdFile.h"

// These are to be removed once the new client supports prepare requests.
#include "XrdClient/XrdClientAdmin.hh"
#include "XrdClient/XrdClientUrlSet.hh"
#include "XrdCl/XrdClDefaultEnv.hh"

#include "XrdClient/XrdClientEnv.hh"

class XrdStorageMaker : public StorageMaker
{
Expand All @@ -21,6 +15,11 @@ class XrdStorageMaker : public StorageMaker
const std::string &path,
int mode) override
{
// The important part here is not the cache size (which will get
// auto-adjusted), but the fact the cache is set to something non-zero.
// If we don't do this before creating the XrdFile object, caching will be
// completely disabled, resulting in poor performance.
EnvPutInt(NAME_READCACHESIZE, 20*1024*1024);

StorageFactory *f = StorageFactory::get();
StorageFactory::ReadHint readHint = f->readHint();
Expand Down Expand Up @@ -75,29 +74,7 @@ class XrdStorageMaker : public StorageMaker

virtual void setDebugLevel (unsigned int level) override
{
switch (level)
{
case 0:
XrdCl::DefaultEnv::SetLogLevel("Error");
break;
case 1:
XrdCl::DefaultEnv::SetLogLevel("Warning");
break;
case 2:
XrdCl::DefaultEnv::SetLogLevel("Info");
break;
case 3:
XrdCl::DefaultEnv::SetLogLevel("Debug");
break;
case 4:
XrdCl::DefaultEnv::SetLogLevel("Dump");
break;
default:
edm::Exception ex(edm::errors::Configuration);
ex << "Invalid log level specified " << level;
ex.addContext("Calling XrdStorageMaker::setDebugLevel()");
throw ex;
}
EnvPutInt("DebugLevel", level);
}
};

Expand Down
Loading