MCPcopy Index your code
hub / github.com/Netflix/mantis

github.com/Netflix/mantis @v5.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.0.1 ↗ · + Follow
11,030 symbols 50,071 edges 1,287 files 1,334 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Mantis logo

Mantis Documentation

Build Status OSS Lifecycle License

Official Website


Development

Setting up Intellij

Run ./gradlew idea to (re-) generate IntelliJ project and module files from the templates in .baseline. The generated project is pre-configured with Baseline code style settings and support for the CheckStyle-IDEA plugin.

Install Docker

Install and run Docker to support local containers.

Building

$ ./gradlew clean build

Testing

$ ./gradlew clean test

Formatting the code

Run ./gradlew format task which autoformats all Java files using Spotless.

Building deployment into local Maven cache

$ ./gradlew clean publishNebulaPublicationToMavenLocal

Releasing

We release by tagging which kicks off a CI build. The CI build will run tests, integration tests, static analysis, checkstyle, build, and then publish to the public Bintray repo to be synced into Maven Central.

Tag format:

vMajor.Minor.Patch

You can tag via git or through Github's Release UI.

Contributing

Mantis is interested in building the community. We welcome any forms of contributions through discussions on any of our mailing lists or through patches.

For more information on contribution, check out the contributions file here.

Module Structure

This excludes all connectors and examples as they are mostly leaf nodes in the dependency graph.

Module Purpose Example Classes Package Prefixes
mantis-common-serde Support for serializing and deserializing POJOs using Json
  • JsonSerializer
  • io.mantisrx.common.*
  • mantis-discovery-proto todo: need to fill this in
  • JobDiscoveryProto
  • AppJobClustersMap
  • StageWorkers
  • com.netflix.mantis.discovery.proto.*
  • mantis-common Mantis common code shared across modules
  • MantisJobDefinition
  • MachineDefinition
  • MantisJobState
  • io.mantisrx.common.*
  • io.mantisrx.runtime.*
  • io.mantisrx.server.code.*
  • io.reactivx.mantis.operators.*
  • com.mantisrx.common.utils.*
  • mantis-remote-observable connection to other job,stage related code
  • ConnectToObservable
  • ConnectToGroupedObservable
  • RemoteObservable
  • io.reactivex.mantis.remote.observable.*
  • io.reactivex.netty.codec.*
  • mantis-control-plane-core common code between mantis-control-plane-server, mantis-control-plane-client, mantis-server-worker, mantis-server-agent
  • TaskExecutorID
  • ClusterID
  • ExecuteStageRequest
  • JobAssignmentResult
  • Status
  • io.mantisrx.server.core.*
  • io.mantisrx.server.master.resourcecluster.*
  • io.mantisrx.server.worker.*
  • mantis-control-plane-client API to talk to the mantis control plane server
  • MasterClientWrapper
  • MantisMasterGateway
  • MantisMasterClientApi
  • io.mantisrx.server.master.client.*
  • io.mantisrx.server.master.resourcecluster.*
  • mantis-network todo: need to fill this in
    mantis-publish-core todo: need to fill this in
    mantis-server-worker-client API to interact with workers
  • MetricsClient
  • MetricsClientImpl
  • WorkerConnection
  • WorkerMetricsClient
  • io.mantisrx.server.worker.client.*
  • mantis-runtime Runtime that the jobs need to depend upon. Job DSL should go in here along with how to talk to other jobs
  • KeyToKey
  • GroupToGroup
  • Source
  • Sink
  • io.mantisrx.runtime.*
  • mantis-publish-netty todo: need to fill this in
    mantis-client client to interact with mantis control plane
  • MantisClient::submitJob
  • MantisClient::killJob
  • io.mantisrx.client.*
  • mantis-publish-netty-guice todo: need to fill this in
    mantis-control-plane-server Actual server that runs the mantis master code
  • MasterMain
  • SchedulingService
  • ServiceLifecycle
  • io.mantisrx.master.*
  • io.mantisrx.server.master.*
  • mantis-server-agent Contains mantis-runtime agnostic code to start the task executor that runs on the agent
  • TaskExecutor
  • TaskExecutorStarter
  • BlobStore
  • BlobStoreAwareClassLoaderHandle
  • io.mantisrx.server.agent.*
  • mantis-server-worker One implementation of Mantis Worker that depends on the master runtime
  • MantisWorker
  • Task
  • ExecuteStageRequestService
  • JobAutoScaler
  • io.mantisrx.server.worker.config.*
  • io.mantisrx.server.worker.jobmaster.*
  • Dependency Graph

    graph TD;
        A[mantis-common-serde]-->B[mantis-common];
        B-->C[mantis-control-plane-core];
        B-->D[mantis-runtime];
        C-->E[mantis-control-plane-client];
        E-->F[mantis-server-worker-client];
        F-->G[mantis-client];
        E-->G;
        C-->H[mantis-control-plane-server];
        C-->I[mantis-server-worker];
        F-->I;
        D-->I;
        F-->J[mantis-server-agent];
        E-->J;
    

    Extension points exported contracts — how you extend this code

    ConfigurationFactory (Interface)
    An implementation of this class should return an instance of {@link io.mantisrx.server.master.config.MasterConfiguration [10 …
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/server/master/config/ConfigurationFactory.java
    IKeyValueStore (Interface)
    An abstraction for storage api that behaves like a key-value storage. Any storage system that implements this interface [7 …
    mantis-control-plane/mantis-control-plane-core/src/main/java/io/mantisrx/server/core/IKeyValueStore.java
    Encoder (Interface)
    @param type @deprecated As of release 0.601, use io.mantisrx.common.codec.Encoder instead [16 implementers]
    mantis-remote-observable/src/main/java/io/reactivex/netty/codec/Encoder.java
    MetricsCollector (Interface)
    Abstraction useful for collecting metrics about the node on which the worker task is running. The metrics that are colle [27 …
    mantis-runtime-loader/src/main/java/io/mantisrx/runtime/loader/config/MetricsCollector.java
    ConfigurationFactory (Interface)
    An implementation of this class should return an instance of io.mantisrx.server.master.config.MasterConfiguration. We cr [10 …
    mantis-runtime-executor/src/main/java/io/mantisrx/server/worker/config/ConfigurationFactory.java
    FilterFunction (Interface)
    A functional interface that defines a filter operation on a stream of input elements of type IN. @param the [10 implementers]
    mantis-runtime/src/main/java/io/mantisrx/runtime/core/functions/FilterFunction.java
    Event (Interface)
    Method reference-compatible listener event. [192 implementers]
    mantis-common/src/main/java/com/mantisrx/common/utils/ListenerCallQueue.java
    BlobStore (Interface)
    Abstraction to deal with getting files stored in object stores such as s3. [5 implementers]
    mantis-server/mantis-server-agent/src/main/java/io/mantisrx/server/agent/BlobStore.java

    Core symbols most depended-on inside this repo

    get
    called by 1303
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/resourcecluster/ExecutorStateManager.java
    build
    called by 738
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/zk/LeaderElector.java
    size
    called by 542
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/resourcecluster/ReservationRegistryActor.java
    builder
    called by 506
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/zk/LeaderElector.java
    get
    called by 481
    mantis-server/mantis-server-agent/src/main/java/io/mantisrx/server/agent/BlobStore.java
    map
    called by 435
    mantis-runtime/src/main/java/io/mantisrx/runtime/core/MantisStream.java
    get
    called by 427
    mantis-runtime-loader/src/main/java/io/mantisrx/runtime/loader/config/MetricsCollector.java
    empty
    called by 410
    mantis-runtime/src/main/java/io/mantisrx/runtime/core/functions/MantisFunction.java

    Shape

    Method 9,239
    Class 1,546
    Interface 184
    Enum 61

    Languages

    Java100%

    Modules by API surface

    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/proto/JobClusterManagerProto.java277 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/JobClusterActor.java143 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/job/JobActor.java104 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/server/master/config/MasterConfiguration.java92 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/resourcecluster/ResourceClusterActor.java87 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/JobClustersManagerActor.java74 symbols
    mantis-control-plane/mantis-control-plane-server/src/test/java/io/mantisrx/master/jobcluster/JobClusterAkkaTest.java67 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/server/master/persistence/KeyValueBasedPersistenceProvider.java67 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/resourcecluster/ExecutorStateManagerActor.java65 symbols
    mantis-control-plane/mantis-control-plane-server/src/test/java/io/mantisrx/master/api/akka/route/v1/JobClustersRouteTest.java63 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/server/master/store/NamedJob.java58 symbols
    mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/server/master/domain/DataFormatAdapter.java55 symbols

    For agents

    $ claude mcp add mantis \
      -- python -m otcore.mcp_server <graph>

    ⬇ download graph artifact