From fd3a50bea7e48c61ec2577ee4ee5c18e17625935 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Wed, 14 Jun 2017 11:07:10 +0200 Subject: Revert "Handle errors when reinitializing file distributor" --- .../vespa/filedistribution/FileDistributionManager.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'filedistributionmanager') diff --git a/filedistributionmanager/src/main/java/com/yahoo/vespa/filedistribution/FileDistributionManager.java b/filedistributionmanager/src/main/java/com/yahoo/vespa/filedistribution/FileDistributionManager.java index 7965cf34ccf..64cdd9da416 100644 --- a/filedistributionmanager/src/main/java/com/yahoo/vespa/filedistribution/FileDistributionManager.java +++ b/filedistributionmanager/src/main/java/com/yahoo/vespa/filedistribution/FileDistributionManager.java @@ -1,14 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.filedistribution; -import com.yahoo.system.execution.ProcessExecutor; -import com.yahoo.system.execution.ProcessResult; - import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.List; -import java.util.Optional; import java.util.concurrent.locks.Lock; /** @@ -113,19 +109,10 @@ public class FileDistributionManager { } public void reloadDeployFileDistributor() { - String binaryName = "filedistributor"; - String command = "pkill -SIGUSR1 -x " + binaryName; - int timeoutSeconds = 10; try (LockGuard guard = new LockGuard(lock)) { - Optional result = new ProcessExecutor.Builder(timeoutSeconds).build().execute(command); - if (! result.isPresent()) { - throw new RuntimeException(String.format("Executing '%s' timed out", command)); - } else if (result.get().exitCode != 0) { - throw new RuntimeException(String.format("Error when executing '%s', exit code %d: %s\n%s", - command, result.get().exitCode, result.get().stdOut, result.get().stdErr)); - } + Runtime.getRuntime().exec("pkill -SIGUSR1 -x filedistributor"); } catch (IOException e) { - throw new RuntimeException("Failed to reinitialize " + binaryName, e); + throw new RuntimeException("Failed to reinitialize the filedistributor", e); } } -- cgit v1.2.3