protected void prepareShutdownCluster(final Throwable error) throws Exception {
final CountDownLatch latch = new CountDownLatch(this.num_sites-1);
if (this.num_sites > 1) {
RpcCallback<ShutdownPrepareResponse> callback = new ShutdownPrepareCallback(this.num_sites, latch);
ShutdownPrepareRequest.Builder builder = ShutdownPrepareRequest.newBuilder()
.setSenderSite(this.catalog_site.getId());
// Pack the error into a SerializableException
if (error != null) {
SerializableException sError = new SerializableException(error);