Git Product home page Git Product logo

stormexample's Introduction

Apache Storm Example

This project requires JDK 11. JDK 14+ are not working.

You can run Storm topology in REPL without any external cluster. See source code.

To run cluster

bin/storm dev-zookeeper
bin/storm nimbus
bin/storm supervisor
bin/storm drpc
bin/storm ui
bin/storm jar ../target/stormexample-0.1.0-SNAPSHOT.jar.zip.jar org.rssys.stormexample.core

Install project prerequisites

All these tools you need to install only once.

  1. Install clojure deps cli tools

    1. MacOS

      brew install clojure/tools/clojure
    2. Linux

      Ensure that the following dependencies are installed in OS: bash, curl, rlwrap, and Java.

      curl -O https://download.clojure.org/install/linux-install-1.10.2.790.sh
      chmod +x linux-install-1.10.2.790.sh
      sudo ./linux-install-1.10.2.790.sh
  2. Install latest clj-new library to a file ~/.clojure/deps.edn

    {
     :aliases {
               :clj-new     {:extra-deps {seancorfield/clj-new {:mvn/version "1.1.243"}}
                             :exec-fn    clj-new/create}
              }
     }
  3. Install just utility

    1. MacOS

      brew install just
    2. Linux

      wget https://github.com/casey/just/releases/download/v0.8.3/just-v0.8.3-x86_64-unknown-linux-musl.tar.gz
      
      tar -zxvf just-v0.8.3-x86_64-unknown-linux-musl.tar.gz just
      
      sudo mv ./just /usr/local/bin
  4. Install babashka

    1. MacOS

      brew install borkdude/brew/babashka
    2. Linux

      sudo bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
  5. Run once:

    just requirements

    to install other necessary tools (MacOS only, for Linux manual instruction).

  6. Run once in project folder:

    direnv allow

to allow direnv to load environment variables from .env.public and .env.private files.

Project workflow

To configure project workflow scripts use Justfile.

To configure project version use file version_id

To configure group-id and artifact-id for jar file use file .env.public

Run just to show help for project workflow.

List of available just commands:

  • requirements - install necessary tools (MacOS only): clj-kondo, cljstyle, direnv. For Linux install them manually.

  • clean - clear target folder

  • repl - run Clojure REPL

  • javac - compile java sources (if any)

  • build - build uberjar file (application)

  • install - install uberjar file to local .m2

  • outdated - check for outdated dependencies

  • deploy - deploy uberjar file to remote repository (stub)

  • test - run tests

  • bump - bump version artifact in version_id file, level may be one of: major, minor, patch, alpha, beta, rc, release.

  • format - format source code

  • lint - lint source code

  • standalone - create a standalone application with bundled JDK (using jlink, JDK 9+)

License

Copyright © 2021 mike
Distributed under the Eclipse Public License 2.0 or (at your option) any later version.

stormexample's People

Contributors

mikeananev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.