Skip to content

Commit

Permalink
Changed to use wise_01 database.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgates108 committed Jun 11, 2021
1 parent a827fcc commit 0356e4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion core/modules/ccontrol/UserQuerySelect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
#include "ccontrol/MergingHandler.h"
#include "ccontrol/TmpTableName.h"
#include "ccontrol/UserQueryError.h"
#include "czar/Czar.h"
#include "global/constants.h"
#include "global/LogContext.h"
#include "global/MsgReceiver.h"
Expand Down Expand Up @@ -349,8 +350,13 @@ void UserQuerySelect::submit() {
if (uberJobsEnabled) {
vector<qdisp::UberJob::Ptr> uberJobs;

/* &&& For mononode integration tests
czar::WorkerResourceLists workerResources;
workerResources.setMonoNodeTest(); //&&& TODO:UJ only good for mono-node test. Need a real list of workers and their chunks. ******
*/
auto czarPtr = czar::Czar::getCzar();
auto workerResources = czarPtr->getWorkerResourceLists();


// Make a map of all jobs in the executive.
// &&& TODO:UJ for now, just using ints. At some point, need to check that ResourceUnit databases can be found for all databases in the query
Expand All @@ -363,7 +369,7 @@ void UserQuerySelect::submit() {
// keep cycling through workers until no more chunks to place.

/// make a map<worker, deque<chunkId> that will be destroyed as chunks are checked/used
map<string, deque<int>> tmpWorkerList = workerResources.getDequesFor(dbName);
map<string, deque<int>> tmpWorkerList = workerResources->getDequesFor(dbName);

// TODO:UJ So UberJobIds don't conflict with chunk numbers or jobIds, start at a large number.
// This could use some refinement.
Expand Down
4 changes: 2 additions & 2 deletions core/modules/czar/Czar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ void Czar::removeOldResultTables() {


bool Czar::setupWorkerResources(std::string const& fName) {
_workerResources = std::make_shared<WorkerResourceLists>();
return _workerResources->readIn(fName);
_workerResourceLists = std::make_shared<WorkerResourceLists>();
return _workerResourceLists->readIn(fName);
}


Expand Down
3 changes: 2 additions & 1 deletion core/modules/czar/Czar.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class Czar {
void removeOldResultTables();

bool setupWorkerResources(std::string const& fName); // &&& TODO:UJ remove ???
std::shared_ptr<WorkerResourceLists> getWorkerResourceLists() { return _workerResourceLists; } // TODO:UJ

protected:

Expand Down Expand Up @@ -160,7 +161,7 @@ class Czar {
std::atomic<bool> _removingOldTables{false};
std::thread _oldTableRemovalThread; ///< thread needs to remain valid while running.

std::shared_ptr<WorkerResourceLists> _workerResources; // &&& TODO:UJ remove ???
std::shared_ptr<WorkerResourceLists> _workerResourceLists; // &&& TODO:UJ remove ???
};

}}} // namespace lsst::qserv::czar
Expand Down

0 comments on commit 0356e4f

Please sign in to comment.