Skip to content
GitLab
Menu
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
b55fdb1c
Commit
b55fdb1c
authored
Nov 24, 2014
by
Eric Cano
Browse files
Renamed members variables for clarity.
parent
9ab5ff9f
Changes
4
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/MigrationTaskInjector.cpp
View file @
b55fdb1c
...
@@ -186,7 +186,7 @@ namespace daemon {
...
@@ -186,7 +186,7 @@ namespace daemon {
Request
req
=
m_parent
.
m_queue
.
pop
();
Request
req
=
m_parent
.
m_queue
.
pop
();
client
::
ClientProxy
::
RequestReport
reqReport
;
client
::
ClientProxy
::
RequestReport
reqReport
;
std
::
auto_ptr
<
tapegateway
::
FilesToMigrateList
>
filesToMigrateList
(
std
::
auto_ptr
<
tapegateway
::
FilesToMigrateList
>
filesToMigrateList
(
m_parent
.
m_client
.
getFilesToMigrate
(
req
.
nbMaxFiles
,
req
.
byteSizeThreshol
d
,
reqReport
)
m_parent
.
m_client
.
getFilesToMigrate
(
req
.
filesRequested
,
req
.
bytesRequeste
d
,
reqReport
)
);
);
if
(
NULL
==
filesToMigrateList
.
get
()){
if
(
NULL
==
filesToMigrateList
.
get
()){
...
@@ -211,12 +211,12 @@ namespace daemon {
...
@@ -211,12 +211,12 @@ namespace daemon {
// Inject the tasks
// Inject the tasks
m_parent
.
injectBulkMigrations
(
filesToMigrateList
->
filesToMigrate
());
m_parent
.
injectBulkMigrations
(
filesToMigrateList
->
filesToMigrate
());
// Decide on continuation
// Decide on continuation
if
(
filesCount
<
req
.
nbMaxFiles
/
2
&&
totalSize
<
req
.
byte
SizeThreshol
d
)
{
if
(
filesCount
<
req
.
filesRequested
/
2
&&
totalSize
<
req
.
byte
sRequeste
d
)
{
// The client starts to dribble files at a low rate. Better finish
// The client starts to dribble files at a low rate. Better finish
// the session now, so we get a clean batch on a later mount.
// the session now, so we get a clean batch on a later mount.
log
::
ScopedParamContainer
params
(
m_parent
.
m_lc
);
log
::
ScopedParamContainer
params
(
m_parent
.
m_lc
);
params
.
add
(
"filesRequested"
,
req
.
nbMaxFiles
)
params
.
add
(
"filesRequested"
,
req
.
filesRequested
)
.
add
(
"bytesRequested"
,
req
.
byte
SizeThreshol
d
)
.
add
(
"bytesRequested"
,
req
.
byte
sRequeste
d
)
.
add
(
"filesReceived"
,
filesCount
)
.
add
(
"filesReceived"
,
filesCount
)
.
add
(
"bytesReceived"
,
totalSize
);
.
add
(
"bytesReceived"
,
totalSize
);
m_parent
.
m_lc
.
log
(
LOG_INFO
,
"Got less than half the requested work to do: triggering the end of session."
);
m_parent
.
m_lc
.
log
(
LOG_INFO
,
"Got less than half the requested work to do: triggering the end of session."
);
...
...
castor/tape/tapeserver/daemon/MigrationTaskInjector.hpp
View file @
b55fdb1c
...
@@ -149,13 +149,13 @@ private:
...
@@ -149,13 +149,13 @@ private:
class
Request
{
class
Request
{
public:
public:
Request
(
uint64_t
mf
,
uint64_t
mb
,
bool
lc
)
:
Request
(
uint64_t
mf
,
uint64_t
mb
,
bool
lc
)
:
nbMaxFiles
(
mf
),
byteSizeThreshol
d
(
mb
),
lastCall
(
lc
),
end
(
false
)
{}
filesRequested
(
mf
),
bytesRequeste
d
(
mb
),
lastCall
(
lc
),
end
(
false
)
{}
Request
()
:
Request
()
:
nbMaxFiles
(
-
1
),
byteSizeThreshol
d
(
-
1
),
lastCall
(
true
),
end
(
true
)
{}
filesRequested
(
-
1
),
bytesRequeste
d
(
-
1
),
lastCall
(
true
),
end
(
true
)
{}
const
uint64_t
nbMaxFiles
;
const
uint64_t
filesRequested
;
const
uint64_t
byte
SizeThreshol
d
;
const
uint64_t
byte
sRequeste
d
;
/**
/**
* True if it is the last call for the set of requests :it means
* True if it is the last call for the set of requests :it means
...
...
castor/tape/tapeserver/daemon/RecallTaskInjector.cpp
View file @
b55fdb1c
...
@@ -213,7 +213,7 @@ void RecallTaskInjector::WorkerThread::run()
...
@@ -213,7 +213,7 @@ void RecallTaskInjector::WorkerThread::run()
}
}
m_parent
.
m_lc
.
log
(
LOG_DEBUG
,
"RecallJobInjector:run: about to call client interface"
);
m_parent
.
m_lc
.
log
(
LOG_DEBUG
,
"RecallJobInjector:run: about to call client interface"
);
client
::
ClientProxy
::
RequestReport
reqReport
;
client
::
ClientProxy
::
RequestReport
reqReport
;
std
::
auto_ptr
<
tapegateway
::
FilesToRecallList
>
filesToRecallList
(
m_parent
.
m_client
.
getFilesToRecall
(
req
.
nbMaxFiles
,
req
.
byteSizeThreshol
d
,
reqReport
));
std
::
auto_ptr
<
tapegateway
::
FilesToRecallList
>
filesToRecallList
(
m_parent
.
m_client
.
getFilesToRecall
(
req
.
filesRequested
,
req
.
bytesRequeste
d
,
reqReport
));
LogContext
::
ScopedParam
sp01
(
m_parent
.
m_lc
,
Param
(
"transactionId"
,
reqReport
.
transactionId
));
LogContext
::
ScopedParam
sp01
(
m_parent
.
m_lc
,
Param
(
"transactionId"
,
reqReport
.
transactionId
));
LogContext
::
ScopedParam
sp02
(
m_parent
.
m_lc
,
Param
(
"connectDuration"
,
reqReport
.
connectDuration
));
LogContext
::
ScopedParam
sp02
(
m_parent
.
m_lc
,
Param
(
"connectDuration"
,
reqReport
.
connectDuration
));
...
...
castor/tape/tapeserver/daemon/RecallTaskInjector.hpp
View file @
b55fdb1c
...
@@ -63,15 +63,15 @@ public:
...
@@ -63,15 +63,15 @@ public:
* @param diskWriter the one object that will hold all the threads which will be executing
* @param diskWriter the one object that will hold all the threads which will be executing
* disk-writing tasks
* disk-writing tasks
* @param client The one that will give us files to recall
* @param client The one that will give us files to recall
* @param
maxFiles maximal
number of files we
may
request
to
the client at once
* @param
filesPerRequest
number of files we request
from
the client at once
* @param byte
SizeThreshold maximal number of cumulated byt
e
* @param byte
sPerRequest number of bytes we request from the client at onc
e
* we may request to the client. at once
* we may request to the client. at once
* @param lc copied because of the threading mechanism
* @param lc copied because of the threading mechanism
*/
*/
RecallTaskInjector
(
RecallMemoryManager
&
mm
,
RecallTaskInjector
(
RecallMemoryManager
&
mm
,
TapeSingleThreadInterface
<
TapeReadTask
>
&
tapeReader
,
TapeSingleThreadInterface
<
TapeReadTask
>
&
tapeReader
,
DiskWriteThreadPool
&
diskWriter
,
client
::
ClientInterface
&
client
,
DiskWriteThreadPool
&
diskWriter
,
client
::
ClientInterface
&
client
,
uint64_t
maxFiles
,
uint64_t
byte
SizeThreshold
,
castor
::
log
::
LogContext
lc
);
uint64_t
filesPerRequest
,
uint64_t
byte
sPerRequest
,
castor
::
log
::
LogContext
lc
);
virtual
~
RecallTaskInjector
();
virtual
~
RecallTaskInjector
();
...
@@ -146,12 +146,12 @@ private:
...
@@ -146,12 +146,12 @@ private:
class
Request
{
class
Request
{
public:
public:
Request
(
uint64_t
mf
,
uint64_t
mb
,
bool
lc
)
:
Request
(
uint64_t
mf
,
uint64_t
mb
,
bool
lc
)
:
nbMaxFiles
(
mf
),
byteSizeThreshol
d
(
mb
),
lastCall
(
lc
),
end
(
false
)
{}
filesRequested
(
mf
),
bytesRequeste
d
(
mb
),
lastCall
(
lc
),
end
(
false
)
{}
Request
()
:
Request
()
:
nbMaxFiles
(
0
),
byteSizeThreshol
d
(
0
),
lastCall
(
true
),
end
(
true
)
{}
filesRequested
(
0
),
bytesRequeste
d
(
0
),
lastCall
(
true
),
end
(
true
)
{}
const
uint64_t
nbMaxFiles
;
const
uint64_t
filesRequested
;
const
uint64_t
byte
SizeThreshol
d
;
const
uint64_t
byte
sRequeste
d
;
/**
/**
* True if it is the last call for the set of requests :it means
* True if it is the last call for the set of requests :it means
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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