Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
3845653e
Commit
3845653e
authored
10 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Removed the nbDrives member variable from the TapePool class
parent
f8cd8151
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
middletier/cta/SqliteDatabase.cpp
+2
-5
2 additions, 5 deletions
middletier/cta/SqliteDatabase.cpp
middletier/cta/TapePool.cpp
+0
-10
0 additions, 10 deletions
middletier/cta/TapePool.cpp
middletier/cta/TapePool.hpp
+0
-21
0 additions, 21 deletions
middletier/cta/TapePool.hpp
with
2 additions
and
36 deletions
middletier/cta/SqliteDatabase.cpp
+
2
−
5
View file @
3845653e
...
...
@@ -68,7 +68,6 @@ void cta::SqliteDatabase::createSchema() {
");"
"CREATE TABLE TAPEPOOL("
"NAME TEXT PRIMARY KEY,"
"NBDRIVES INTEGER,"
"NBPARTIALTAPES INTEGER,"
"UID INTEGER,"
"GID INTEGER,"
...
...
@@ -781,7 +780,7 @@ std::list<cta::TapePool> cta::SqliteDatabase::selectAllTapePools(const SecurityI
char
*
zErrMsg
=
0
;
std
::
ostringstream
query
;
std
::
list
<
cta
::
TapePool
>
pools
;
query
<<
"SELECT NAME,
NBDRIVES,
NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL ORDER BY NAME;"
;
query
<<
"SELECT NAME, NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL ORDER BY NAME;"
;
sqlite3_stmt
*
statement
;
int
rc
=
sqlite3_prepare
(
m_dbHandle
,
query
.
str
().
c_str
(),
-
1
,
&
statement
,
0
);
if
(
rc
!=
SQLITE_OK
){
...
...
@@ -795,7 +794,6 @@ std::list<cta::TapePool> cta::SqliteDatabase::selectAllTapePools(const SecurityI
SqliteColumnNameToIndex
idx
(
statement
);
pools
.
push_back
(
cta
::
TapePool
(
std
::
string
((
char
*
)
sqlite3_column_text
(
statement
,
idx
(
"NAME"
))),
sqlite3_column_int
(
statement
,
idx
(
"NBDRIVES"
)),
sqlite3_column_int
(
statement
,
idx
(
"NBPARTIALTAPES"
)),
cta
::
UserIdentity
(
sqlite3_column_int
(
statement
,
idx
(
"UID"
)),
sqlite3_column_int
(
statement
,
idx
(
"GID"
))),
...
...
@@ -1049,7 +1047,7 @@ cta::TapePool cta::SqliteDatabase::getTapePoolByName(const SecurityIdentity &req
char
*
zErrMsg
=
0
;
std
::
ostringstream
query
;
cta
::
TapePool
pool
;
query
<<
"SELECT NAME,
NBDRIVES,
NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL WHERE NAME='"
<<
name
<<
"';"
;
query
<<
"SELECT NAME, NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL WHERE NAME='"
<<
name
<<
"';"
;
sqlite3_stmt
*
statement
;
int
rc
=
sqlite3_prepare
(
m_dbHandle
,
query
.
str
().
c_str
(),
-
1
,
&
statement
,
0
);
if
(
rc
!=
SQLITE_OK
){
...
...
@@ -1064,7 +1062,6 @@ cta::TapePool cta::SqliteDatabase::getTapePoolByName(const SecurityIdentity &req
SqliteColumnNameToIndex
idx
(
statement
);
pool
=
cta
::
TapePool
(
std
::
string
((
char
*
)
sqlite3_column_text
(
statement
,
idx
(
"NAME"
))),
sqlite3_column_int
(
statement
,
idx
(
"NBDRIVES"
)),
sqlite3_column_int
(
statement
,
idx
(
"NBPARTIALTAPES"
)),
cta
::
UserIdentity
(
sqlite3_column_int
(
statement
,
idx
(
"UID"
)),
sqlite3_column_int
(
statement
,
idx
(
"GID"
))),
std
::
string
((
char
*
)
sqlite3_column_text
(
statement
,
idx
(
"COMMENT"
))),
...
...
This diff is collapsed.
Click to expand it.
middletier/cta/TapePool.cpp
+
0
−
10
View file @
3845653e
...
...
@@ -4,7 +4,6 @@
// constructor
//------------------------------------------------------------------------------
cta
::
TapePool
::
TapePool
()
:
m_nbDrives
(
0
),
m_nbPartialTapes
(
0
)
{
}
...
...
@@ -19,14 +18,12 @@ cta::TapePool::~TapePool() throw() {
//------------------------------------------------------------------------------
cta
::
TapePool
::
TapePool
(
const
std
::
string
&
name
,
const
uint16_t
nbDrives
,
const
uint32_t
nbPartialTapes
,
const
UserIdentity
&
creator
,
const
std
::
string
&
comment
,
const
time_t
creationTime
)
:
ConfigurationItem
(
creator
,
comment
,
creationTime
),
m_name
(
name
),
m_nbDrives
(
nbDrives
),
m_nbPartialTapes
(
nbPartialTapes
)
{
}
...
...
@@ -44,13 +41,6 @@ const std::string &cta::TapePool::getName() const throw() {
return
m_name
;
}
//------------------------------------------------------------------------------
// getNbDrives
//------------------------------------------------------------------------------
uint16_t
cta
::
TapePool
::
getNbDrives
()
const
throw
()
{
return
m_nbDrives
;
}
//------------------------------------------------------------------------------
// getNbPartialTapes
//------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
middletier/cta/TapePool.hpp
+
0
−
21
View file @
3845653e
...
...
@@ -27,9 +27,6 @@ public:
* Constructor.
*
* @param name The name of the tape pool.
* @param nbDrives The maximum number of drives that can be concurrently
* assigned to this pool independent of whether they are archiving or
* retrieving files.
* @param nbPartialTapes The maximum number of tapes that can be partially
* full at any moment in time.
* @param creator The identity of the user that created the tape pool.
...
...
@@ -40,7 +37,6 @@ public:
*/
TapePool
(
const
std
::
string
&
name
,
const
uint16_t
nbDrives
,
const
uint32_t
nbPartialTapes
,
const
UserIdentity
&
creator
,
const
std
::
string
&
comment
,
...
...
@@ -60,17 +56,6 @@ public:
*/
const
std
::
string
&
getName
()
const
throw
();
/**
* Returns the maximum number of drives that can be concurrently
* assigned to this pool independent of whether they are archiving or
* retrieving files.
*
* @return The maximum number of drives that can be concurrently
* assigned to this pool independent of whether they are archiving or
* retrieving files.
*/
uint16_t
getNbDrives
()
const
throw
();
/**
* Returns the maximum number of tapes that can be partially full at any
* moment in time.
...
...
@@ -87,12 +72,6 @@ private:
*/
std
::
string
m_name
;
/**
* The maximum number of drives that can be concurrently assigned to this
* pool independent of whether they are archiving or retrieving files.
*/
uint16_t
m_nbDrives
;
/**
* The maximum number of tapes that can be partially full at any moment in
* time.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment