Package

com.criteo.cuttle

platforms

Permalink

package platforms

Defines useful ExecutionPlatforms:

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. platforms
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class ExecutionPool(concurrencyLimit: Int) extends WaitingExecutionQueue with Product with Serializable

    Permalink

    An execution pool backed by a priority queue.

    An execution pool backed by a priority queue. It limits the concurrent executions and the priority queue is ordered by the Ordering defined on the SchedulingContext.

    concurrencyLimit

    The maximum number of concurrent executions.

  2. class RateLimiter extends WaitingExecutionQueue

    Permalink

    An rate limiter pool backed by a priority queue.

    An rate limiter pool backed by a priority queue. It rate limits the executions and the priority queue is ordered by the Ordering defined on the SchedulingContext.

    The implementation is based on the tokens bucket algorithm.

  3. trait WaitingExecutionQueue extends AnyRef

    Permalink

    A priority queue ordered by SchedulingContext priority.

Value Members

  1. package http

    Permalink

    Allow to make HTTP calls in a managed way with rate limiting.

    Allow to make HTTP calls in a managed way with rate limiting.

    It uses lolhttp as HTTP client.

  2. package local

    Permalink

    Allow to fork process locally in a managed way.

    Allow to fork process locally in a managed way.

    It provides the exec interpolator that you can use to fork shell scripts:

    exec"""hdfs dfs -cp /from /to"""()

    The script your provide will be forked into another process. Note that if you provide several commands separated by ;' only the first one will be forked and the other ones will be ignored.

    If you really need to run several commands, you can use one of the followed ways:

    1. Chain multiple execs in a for-comprehension. Because of platform mechanism it will require several platform allocations to run completely.

    2. Wrap it in one sh -c' _In this case we cannot guarantee that all process spawned inside this fork will be successfully killed when we kill the parent process._

Inherited from AnyRef

Inherited from Any

Ungrouped