Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
a599d161
Commit
a599d161
authored
Aug 31, 2015
by
Steven Murray
Browse files
Revert "Added the IScheduler class"
This reverts commit
2dc2976e
. Conflicts: scheduler/CMakeLists.txt
parent
177946ac
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
scheduler/CMakeLists.txt
View file @
a599d161
...
...
@@ -11,7 +11,7 @@ set (CTA_SCHEDULER_SRC_FILES
ArchiveToDirRequest.cpp
ArchiveToFileRequest.cpp
ArchiveToTapeCopyRequest.cpp
IScheduler
.cpp
TapeMount
.cpp
LogicalLibrary.cpp
mockDB/MockSchedulerDatabase.cpp
mockDB/MockSchedulerDatabaseFactory.cpp
...
...
@@ -28,8 +28,9 @@ set (CTA_SCHEDULER_SRC_FILES
Scheduler.cpp
SchedulerDatabase.cpp
SchedulerDatabaseFactory.cpp
TapeJobFailure.cpp
TapeMount.cpp
mockDB/SqliteColumnNameToIndex.cpp
mockDB/SQLiteStatementDeleter.cpp
MountType.cpp
UserRequest.cpp
)
add_library
(
ctascheduler SHARED
...
...
scheduler/DummyScheduler.cpp
View file @
a599d161
...
...
@@ -43,6 +43,14 @@
#include
"scheduler/SchedulerDatabase.hpp"
#include
"scheduler/TapeMount.hpp"
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
cta
::
DummyScheduler
::
DummyScheduler
(
NameServer
&
ns
,
SchedulerDatabase
&
db
,
RemoteNS
&
remoteNS
)
:
Scheduler
(
ns
,
db
,
remoteNS
)
{
}
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
...
...
scheduler/DummyScheduler.hpp
View file @
a599d161
...
...
@@ -18,7 +18,7 @@
#pragma once
#include
"scheduler/
I
Scheduler.hpp"
#include
"scheduler/Scheduler.hpp"
#include
<memory>
...
...
@@ -27,9 +27,21 @@ namespace cta {
/**
* Class implementimg a dummy tape resource scheduler.
*/
class
DummyScheduler
:
public
I
Scheduler
{
class
DummyScheduler
:
public
Scheduler
{
public:
/**
* Constructor.
*
* @param ns The name server containing the namespace of the archive.
* @param db The scheduler database.
* @param remoteNS The name space of the remote storage system.
*/
DummyScheduler
(
NameServer
&
ns
,
SchedulerDatabase
&
db
,
RemoteNS
&
remoteNS
);
/**
* Destructor.
*/
...
...
scheduler/IScheduler.cpp
deleted
100644 → 0
View file @
177946ac
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
"scheduler/IScheduler.hpp"
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
cta
::
IScheduler
::~
IScheduler
()
throw
()
{
}
scheduler/IScheduler.hpp
deleted
100644 → 0
View file @
177946ac
This diff is collapsed.
Click to expand it.
scheduler/Scheduler.cpp
View file @
a599d161
...
...
@@ -48,6 +48,20 @@
#include
<sys/stat.h>
#include
<unistd.h>
//------------------------------------------------------------------------------
// TransferFailureToStr
//------------------------------------------------------------------------------
const
char
*
cta
::
Scheduler
::
TransferFailureToStr
(
const
TapeJobFailure
enumValue
)
throw
()
{
switch
(
enumValue
)
{
case
JOBFAILURE_NONE
:
return
"NONE"
;
case
JOBFAILURE_TAPEDRIVE
:
return
"TAPE DRIVE"
;
case
JOBFAILURE_TAPELIBRARY
:
return
"TAPE LIBRARY"
;
case
JOBFAILURE_REMOTESTORAGE
:
return
"REMOTE STORAGE"
;
default
:
return
"UNKNOWN"
;
}
}
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
...
...
scheduler/Scheduler.hpp
View file @
a599d161
...
...
@@ -18,16 +18,68 @@
#pragma once
#include
"scheduler/IScheduler.hpp"
#include
"scheduler/SchedulerDatabase.hpp"
#include
"common/exception/Exception.hpp"
#include
<list>
#include
<map>
#include
<memory>
#include
<stdint.h>
#include
<string>
namespace
cta
{
// Forward declarations for opaque references.
class
AdminHost
;
class
AdminUser
;
class
ArchiveFileStatus
;
class
ArchiveRoute
;
class
ArchiveToDirRequest
;
class
ArchiveToFileRequest
;
class
ArchiveToTapeCopyRequest
;
class
ArchiveDirIterator
;
class
LogicalLibrary
;
class
NameServer
;
class
RemoteNS
;
class
RemotePathAndStatus
;
class
RetrieveFromTapeCopyRequest
;
class
RetrieveToDirRequest
;
class
RetrieveToFileRequest
;
class
SchedulerDatabase
;
class
SecurityIdentity
;
class
StorageClass
;
class
Tape
;
class
TapeMount
;
class
TapeSession
;
class
TapePool
;
class
UserIdentity
;
/**
* Class implementimg a tape resource scheduler.
*/
class
Scheduler
:
public
IScheduler
{
class
Scheduler
{
public:
/**
* An enumeration of the different types of tape job failures.
*/
enum
TapeJobFailure
{
JOBFAILURE_NONE
,
JOBFAILURE_TAPEDRIVE
,
JOBFAILURE_TAPELIBRARY
,
JOBFAILURE_REMOTESTORAGE
};
/**
* Thread safe method that returns the string representation of the specified
* enumeration value.
*
* @param enumValue The integer value of the type.
* @return The string representation.
*/
static
const
char
*
TransferFailureToStr
(
const
TapeJobFailure
enumValue
)
throw
();
/**
* Constructor.
*
...
...
scheduler/TapeJobFailure.cpp
deleted
100644 → 0
View file @
177946ac
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
"scheduler/TapeJobFailure.hpp"
//------------------------------------------------------------------------------
// TransferFailureToStr
//------------------------------------------------------------------------------
const
char
*
cta
::
TapeJobFailureToStr
(
const
TapeJobFailure
enumValue
)
throw
()
{
switch
(
enumValue
)
{
case
JOBFAILURE_NONE
:
return
"NONE"
;
case
JOBFAILURE_TAPEDRIVE
:
return
"TAPE DRIVE"
;
case
JOBFAILURE_TAPELIBRARY
:
return
"TAPE LIBRARY"
;
case
JOBFAILURE_REMOTESTORAGE
:
return
"REMOTE STORAGE"
;
default
:
return
"UNKNOWN"
;
}
}
scheduler/TapeJobFailure.hpp
deleted
100644 → 0
View file @
177946ac
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
namespace
cta
{
/**
* An enumeration of the different types of tape job failures.
*/
enum
TapeJobFailure
{
JOBFAILURE_NONE
,
JOBFAILURE_TAPEDRIVE
,
JOBFAILURE_TAPELIBRARY
,
JOBFAILURE_REMOTESTORAGE
};
/**
* Thread safe method that returns the string representation of the specified
* enumeration value.
*
* @param enumValue The integer value of the type.
* @return The string representation.
*/
const
char
*
TapeJobFailureToStr
(
const
TapeJobFailure
enumValue
)
throw
();
}
// namespace cta
tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp
View file @
a599d161
...
...
@@ -57,7 +57,7 @@ castor::tape::tapeserver::daemon::DataTransferSession::DataTransferSession(
castor
::
messages
::
TapeserverProxy
&
initialProcess
,
castor
::
server
::
ProcessCap
&
capUtils
,
const
DataTransferConfig
&
castorConf
,
cta
::
I
Scheduler
&
scheduler
)
:
cta
::
Scheduler
&
scheduler
)
:
m_log
(
log
),
m_sysWrapper
(
sysWrapper
),
m_driveConfig
(
driveConfig
),
...
...
tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.hpp
View file @
a599d161
...
...
@@ -34,8 +34,8 @@
#include
"castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp"
#include
"castor/tape/tapeserver/system/Wrapper.hpp"
#include
"scheduler/ArchiveMount.hpp"
#include
"scheduler/IScheduler.hpp"
#include
"scheduler/RetrieveMount.hpp"
#include
"scheduler/Scheduler.hpp"
#include
"scheduler/TapeMount.hpp"
namespace
castor
{
...
...
@@ -67,7 +67,7 @@ namespace daemon {
castor
::
messages
::
TapeserverProxy
&
initialProcess
,
castor
::
server
::
ProcessCap
&
capUtils
,
const
DataTransferConfig
&
castorConf
,
cta
::
I
Scheduler
&
scheduler
);
cta
::
Scheduler
&
scheduler
);
/**
* Execute the session and return the type of action to be performed
...
...
@@ -134,7 +134,7 @@ namespace daemon {
/**
* The scheduler, i.e. the local interface to the Objectstore DB
*/
cta
::
I
Scheduler
&
m_scheduler
;
cta
::
Scheduler
&
m_scheduler
;
/**
* Returns the string representation of the specified mount type
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment