File tree 3 files changed +27
-1
lines changed
base/src/main/java/org/apache/accumulo/server
gc/src/main/java/org/apache/accumulo/gc
tserver/src/main/java/org/apache/accumulo/tserver
3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -371,4 +371,11 @@ public void startServiceLockVerificationThread() {
371
371
@ Override
372
372
public void close () {}
373
373
374
+ protected void waitForUpgrade () throws InterruptedException {
375
+ while (AccumuloDataVersion .getCurrentVersion (getContext ()) < AccumuloDataVersion .get ()) {
376
+ log .info ("Waiting for upgrade to complete." );
377
+ Thread .sleep (1000 );
378
+ }
379
+ }
380
+
374
381
}
Original file line number Diff line number Diff line change @@ -154,6 +154,14 @@ boolean inSafeMode() {
154
154
@ Override
155
155
@ SuppressFBWarnings (value = "DM_EXIT" , justification = "main class can call System.exit" )
156
156
public void run () {
157
+
158
+ try {
159
+ waitForUpgrade ();
160
+ } catch (InterruptedException e ) {
161
+ log .error ("Interrupted while waiting for upgrade to complete, exiting..." );
162
+ System .exit (1 );
163
+ }
164
+
157
165
final VolumeManager fs = getContext ().getVolumeManager ();
158
166
159
167
// Sleep for an initial period, giving the manager time to start up and
Original file line number Diff line number Diff line change 133
133
import com .google .common .collect .Sets ;
134
134
import com .google .common .net .HostAndPort ;
135
135
136
+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
137
+
136
138
public class ScanServer extends AbstractServer
137
139
implements TabletScanClientService .Iface , TabletHostingServer {
138
140
@@ -361,15 +363,24 @@ private ServiceLock announceExistence() {
361
363
}
362
364
363
365
@ Override
366
+ @ SuppressFBWarnings (value = "DM_EXIT" , justification = "main class can call System.exit" )
364
367
public void run () {
368
+
369
+ try {
370
+ waitForUpgrade ();
371
+ } catch (InterruptedException e ) {
372
+ LOG .error ("Interrupted while waiting for upgrade to complete, exiting..." );
373
+ System .exit (1 );
374
+ }
375
+
365
376
SecurityUtil .serverLogin (getConfiguration ());
366
377
367
378
ServerAddress address = null ;
368
379
try {
369
380
address = startScanServerClientService ();
370
381
clientAddress = address .getAddress ();
371
382
} catch (UnknownHostException e1 ) {
372
- throw new RuntimeException ("Failed to start the compactor client service" , e1 );
383
+ throw new RuntimeException ("Failed to start the scan server client service" , e1 );
373
384
}
374
385
375
386
MetricsInfo metricsInfo = getContext ().getMetricsInfo ();
You can’t perform that action at this time.
0 commit comments