This is an automated email from the ASF dual-hosted git repository.

billie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git


The following commit(s) were added to refs/heads/master by this push:
     new 98f1d34  Fix #37 Restart GC during agitation (#117)
98f1d34 is described below

commit 98f1d34315b1549004620f6e0a882089b8bc6bb2
Author: billierinaldi <[email protected]>
AuthorDate: Tue Nov 12 13:52:39 2019 -0800

    Fix #37 Restart GC during agitation (#117)
---
 libexec/master-agitator.pl | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/libexec/master-agitator.pl b/libexec/master-agitator.pl
index 949cfbb..e90c70d 100755
--- a/libexec/master-agitator.pl
+++ b/libexec/master-agitator.pl
@@ -51,6 +51,14 @@ for $master (@mastersRaw){
 while(1){
        sleep($sleep1 * 60);
        $t = strftime "%Y%m%d %H:%M:%S", localtime;
+
+       $gcfile = '';
+       if (-e "$accumuloConfDir/gc") {
+               $gcfile = 'gc';
+       } else {
+               $gcfile = 'masters';
+       }
+
        if(rand(1) < .5){
                $masterNodeToWack = $masters[int(rand(scalar(@masters)))];
                print STDERR "$t Killing master on $masterNodeToWack\n";
@@ -63,14 +71,7 @@ while(1){
                print "$t $cmd\n";
                system($cmd);
 
-               $file = '';
-               if (-e "$accumuloConfDir/gc") {
-                       $file = 'gc';
-               } else {
-                       $file = 'masters';
-               }
-
-               $cmd = "pssh -h $accumuloConfDir/$file \"pkill -f '[ 
]org.apache.accumulo.start.*gc'\" < /dev/null";
+               $cmd = "pssh -h $accumuloConfDir/$gcfile \"pkill -f '[ 
]org.apache.accumulo.start.*gc'\" < /dev/null";
                print "$t $cmd\n";
                system($cmd);
        }
@@ -82,6 +83,10 @@ while(1){
        $cmd = "pssh -h $accumuloConfDir/masters 
\"$accumuloHome/bin/accumulo-service master start\" < /dev/null";
        print "$t $cmd\n";
        system($cmd);
+
+       $cmd = "pssh -h $accumuloConfDir/$gcfile 
\"$accumuloHome/bin/accumulo-service gc start\" < /dev/null";
+       print "$t $cmd\n";
+       system($cmd);
 }
 
 

Reply via email to