Skip to content

Commit

Permalink
Merge pull request xrootd#1836 from adriansev/fix_threshold_typo
Browse files Browse the repository at this point in the history
fix typo s/Threashold/Threshold/
  • Loading branch information
abh3 committed Dec 1, 2022
2 parents 8e1e528 + 42bd828 commit 7e1ad9d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions bindings/python/libs/client/copyprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def add_job(self,
tpctimeout = 1800,
rmBadCksum = False,
cptimeout = 0,
xrateThreashold = 0,
xrateThreshold = 0,
xrate = 0,
retry = 0,
cont = False,
Expand Down Expand Up @@ -134,8 +134,8 @@ def add_job(self,
:type rmBadCksum: boolean
:param cptimeout: timeout for classic cp operation
:type cptimeout: integer
:param xrateThreashold: data transfer rate threshold
:type xrateThreashold: integer
:param xrateThreshold: data transfer rate threshold
:type xrateThreshold: integer
:param xrate: data transfer rate limit
:type xrate: integer
:param retry: number of retries
Expand All @@ -148,7 +148,7 @@ def add_job(self,
self.__process.add_job(source, target, sourcelimit, force, posc,
coerce, mkdir, thirdparty, checksummode, checksumtype,
checksumpreset, dynamicsource, chunksize, parallelchunks, inittimeout,
tpctimeout, rmBadCksum, cptimeout, retry, xrateThreashold,
tpctimeout, rmBadCksum, cptimeout, retry, xrateThreshold,
xrate, cont, rtrplc )

def prepare(self):
Expand Down
6 changes: 3 additions & 3 deletions bindings/python/src/PyXRootDCopyProcess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace PyXRootD
const char *checkSumPreset = "";
bool dynamicSource = false;
bool rmBadCksum = false;
long long xRateThreashold = 0;
long long xRateThreshold = 0;
long long xRate = 0;
long long retry = 0;
bool cont = false;
Expand Down Expand Up @@ -114,7 +114,7 @@ namespace PyXRootD
&source, &target, &sourceLimit, &force, &posc,
&coerce, &mkdir, &thirdParty, &checkSumMode, &checkSumType,
&checkSumPreset, &dynamicSource, &chunkSize, &parallelChunks, &initTimeout,
&tpcTimeout, &rmBadCksum, &cpTimeout, &xRateThreashold, &xRate,
&tpcTimeout, &rmBadCksum, &cpTimeout, &xRateThreshold, &xRate,
&retry, &cont, &rtrplc ) )
return NULL;

Expand All @@ -138,7 +138,7 @@ namespace PyXRootD
properties.Set( "tpcTimeout", tpcTimeout );
properties.Set( "rmOnBadCksum", rmBadCksum );
properties.Set( "cpTimeout", cpTimeout );
properties.Set( "xrateThreashold", xRateThreashold );
properties.Set( "xrateThreshold", xRateThreshold );
properties.Set( "xrate", xRate );
properties.Set( "continue", cont );

Expand Down
8 changes: 4 additions & 4 deletions src/XrdApps/XrdCpConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct option XrdCpConfig::opVec[] = // For getopt_long()
{OPT_TYPE "version", 0, 0, XrdCpConfig::OpVersion},
{OPT_TYPE "xattr", 0, 0, XrdCpConfig::OpXAttr},
{OPT_TYPE "xrate", 1, 0, XrdCpConfig::OpXrate},
{OPT_TYPE "xrate-threshold",1, 0, XrdCpConfig::OpXrateThreashold},
{OPT_TYPE "xrate-threshold",1, 0, XrdCpConfig::OpXrateThreshold},
{OPT_TYPE "zip", 1, 0, XrdCpConfig::OpZip},
{OPT_TYPE "zip-append", 0, 0, XrdCpConfig::OpZipAppend},
{OPT_TYPE "zip-mtln-cksum", 0, 0, XrdCpConfig::OpZipMtlnCksum},
Expand All @@ -141,7 +141,7 @@ XrdCpConfig::XrdCpConfig(const char *pgm)
pHost = 0;
pPort = 0;
xRate = 0;
xRateThreashold = 0;
xRateThreshold = 0;
Parallel = 1;
OpSpec = 0;
Dlvl = 0;
Expand Down Expand Up @@ -313,8 +313,8 @@ do{while(optind < Argc && Legacy(optind)) {}
case OpXrate: OpSpec |= DoXrate;
if (!a2z(optarg, &xRate, 10*1024LL, -1)) Usage(22);
break;
case OpXrateThreashold: OpSpec |= DoXrateThreashold;
if (!a2z(optarg, &xRateThreashold, 10*1024LL, -1)) Usage(22);
case OpXrateThreshold: OpSpec |= DoXrateThreshold;
if (!a2z(optarg, &xRateThreshold, 10*1024LL, -1)) Usage(22);
break;
case OpParallel: OpSpec |= DoParallel;
if (!a2i(optarg, &Parallel, 1, 128)) Usage(22);
Expand Down
6 changes: 3 additions & 3 deletions src/XrdApps/XrdCpConfig.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct defVar
const char *srcOpq; // -> -OS setting (src opaque)
const char *Pgm; // -> Program name
long long xRate; // -> xrate value in bytes/sec (0 if not set)
long long xRateThreashold; // -> xrate threshold value in bytes/sec (0 if not set)
long long xRateThreshold; // -> xrate threshold value in bytes/sec (0 if not set)
int Parallel; // Number of simultaneous copy ops (1 to 4)
char *pHost; // -> SOCKS4 proxy hname (0 if none)
int pPort; // SOCKS4 proxy port
Expand Down Expand Up @@ -194,8 +194,8 @@ static const uint64_t DoRmOnBadCksum = 0x0000000080000000LL; // --rm-bad-cksu
static const uint64_t OpContinue = 0x10;
static const uint64_t DoContinue = 0x0000000100000000LL; // --continue

static const uint64_t OpXrateThreashold = 0x11;
static const uint64_t DoXrateThreashold = 0x0000000200000000LL; // --xrate-threashold
static const uint64_t OpXrateThreshold = 0x11;
static const uint64_t DoXrateThreshold = 0x0000000200000000LL; // --xrate-threshold

static const uint64_t OpRetryPolicy = 0x12;
static const uint64_t DoRetryPolicy = 0x0000000400000000LL; // --retry-policy
Expand Down
2 changes: 1 addition & 1 deletion src/XrdCl/XrdClClassicCopyJob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,7 @@ namespace XrdCl
pProperties->Get( "xcpBlockSize", blockSize );
pProperties->Get( "preserveXAttr", preserveXAttr );
pProperties->Get( "xrate", xRate );
pProperties->Get( "xrateThreashold", xRateThreshold );
pProperties->Get( "xrateThreshold", xRateThreshold );
pProperties->Get( "rmOnBadCksum", rmOnBadCksum );
pProperties->Get( "continue", continue_ );
pProperties->Get( "cpTimeout", cpTimeout );
Expand Down
2 changes: 1 addition & 1 deletion src/XrdCl/XrdClCopy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ int main( int argc, char **argv )
properties.Set( "targetIsDir", targetIsDir );
properties.Set( "preserveXAttr", preserveXAttr );
properties.Set( "xrate", config.xRate );
properties.Set( "xrateThreashold", config.xRateThreashold );
properties.Set( "xrateThreshold", config.xRateThreshold );
properties.Set( "rmOnBadCksum", rmOnBadCksum );
properties.Set( "continue", continue_ );
properties.Set( "zipAppend", zipappend );
Expand Down
4 changes: 2 additions & 2 deletions src/XrdCl/XrdClCopyProcess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ namespace XrdCl
if( !p.HasProperty( "xrate" ) )
p.Set( "xrate", 0 );

if( !p.HasProperty( "xrateThreashold" ) || p.Get<long long>( "xrateThreashold" ) == 0 )
if( !p.HasProperty( "xrateThreshold" ) || p.Get<long long>( "xrateThreshold" ) == 0 )
{
int val = DefaultXRateThreshold;
env->GetInt( "XRateThreshold", val );
p.Set( "xrateThreashold", val );
p.Set( "xrateThreshold", val );
}

//--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/XrdClTests/FileCopyTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void FileCopyTest::CopyTestFunc( bool thirdParty )
properties.Set( "source", sourceURL );
properties.Set( "target", targetURL );
properties.Set( "xrate", 1024 * 1024 * 32 ); //< limit the transfer rate to 32MB/s
properties.Set( "xrateThreashold", 1024 * 1024 * 30 ); //< fail the job if the transfer rate drops under 30MB/s
properties.Set( "xrateThreshold", 1024 * 1024 * 30 ); //< fail the job if the transfer rate drops under 30MB/s
CPPUNIT_ASSERT_XRDST( process14.AddJob( properties, &results ) );
CPPUNIT_ASSERT_XRDST( process14.Prepare() );
CPPUNIT_ASSERT_XRDST( process14.Run(0) );
Expand Down

0 comments on commit 7e1ad9d

Please sign in to comment.