Class ClusterProcessingControl<F extends RemoteProcessingControlResource>

java.lang.Object
org.graylog2.system.processing.control.ClusterProcessingControl<F>

public class ClusterProcessingControl<F extends RemoteProcessingControlResource> extends Object
  • Field Details

    • authorizationToken

      protected final String authorizationToken
    • remoteInterfaceProvider

      protected final RemoteInterfaceProvider remoteInterfaceProvider
    • nodeService

      protected final NodeService<ServerNodeDto> nodeService
    • connectionTimeout

      protected final com.github.joschi.jadconfig.util.Duration connectionTimeout
  • Constructor Details

    • ClusterProcessingControl

      public ClusterProcessingControl(String authorizationToken, RemoteInterfaceProvider remoteInterfaceProvider, NodeService<ServerNodeDto> nodeService, com.github.joschi.jadconfig.util.Duration connectionTimeout, com.github.joschi.jadconfig.util.Duration bufferDrainInterval, int maxBufferDrainRetries)
  • Method Details

    • pauseProcessing

      public void pauseProcessing()
    • runOnAllActiveNodes

      protected <R> Map<String,R> runOnAllActiveNodes(String operationName, Function<F,retrofit2.Call<R>> callRemoteResource, boolean stopOnFirstException)
    • getrResponse

      protected <R> retrofit2.Response<R> getrResponse(Function<F,retrofit2.Call<R>> callRemoteResource, Map.Entry<String,ServerNodeDto> entry) throws IOException
      Throws:
      IOException
    • waitForEmptyBuffers

      public void waitForEmptyBuffers() throws OutputBufferDrainFailureException
      Throws:
      OutputBufferDrainFailureException
    • tryGetExceptionNodes

      protected static Set<String> tryGetExceptionNodes(com.github.rholder.retry.RetryException e)
      Try to retrieve the nodes that have a non-zero output rate from the RetryException. This should succeed with the current implementation.
    • isOutputRateCloseToZero

      protected boolean isOutputRateCloseToZero(double outputRate)
      The output rate is the number of messages per second that are being written to OpenSearch (usually a whole number followed by some meaningless decimals - e.g. 100.01 messages/second). A value < 1 is effectively zero. The rate might become very small, but not zero in some cases, so this method accounts for that condition.
    • resumeGraylogMessageProcessing

      public void resumeGraylogMessageProcessing()
    • printNodeDebugInfo

      protected void printNodeDebugInfo()