{"id":29905527,"url":"https://github.com/project-tsurugi/jogasaki","last_synced_at":"2025-09-23T23:06:38.851Z","repository":{"id":198157903,"uuid":"248132869","full_name":"project-tsurugi/jogasaki","owner":"project-tsurugi","description":"SQL job scheduler","archived":false,"fork":false,"pushed_at":"2025-09-22T02:13:38.000Z","size":10195,"stargazers_count":3,"open_issues_count":7,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-22T02:24:25.777Z","etag":null,"topics":["database","rdbms","scheduler","sql"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/project-tsurugi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-18T03:49:13.000Z","updated_at":"2025-09-22T00:57:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"560a7804-3a29-4905-aa42-c31ec610a558","html_url":"https://github.com/project-tsurugi/jogasaki","commit_stats":null,"previous_names":["project-tsurugi/jogasaki"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/project-tsurugi/jogasaki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-tsurugi%2Fjogasaki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-tsurugi%2Fjogasaki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-tsurugi%2Fjogasaki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-tsurugi%2Fjogasaki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/project-tsurugi","download_url":"https://codeload.github.com/project-tsurugi/jogasaki/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-tsurugi%2Fjogasaki/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276662420,"owners_count":25682029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","rdbms","scheduler","sql"],"created_at":"2025-08-01T19:14:12.247Z","updated_at":"2025-09-23T23:06:38.771Z","avatar_url":"https://github.com/project-tsurugi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jogasaki SQL job scheduler\n\n## Requirements\n\n* CMake `\u003e= 3.16`\n* C++ Compiler `\u003e= C++17`\n* mpdecimal 2.5.1 (see `Manual install steps for mpdecimal` section below to install on Ubuntu 24.04)\n* and see *Dockerfile* section\n\n```sh\n# retrieve third party modules\ngit submodule update --init --recursive\n```\n\n### Dockerfile\n\n```dockerfile\nFROM ubuntu:22.04\n\nRUN apt update -y \u0026\u0026 apt install -y git build-essential cmake ninja-build libboost-filesystem-dev libboost-system-dev libboost-container-dev libboost-thread-dev libboost-stacktrace-dev libgoogle-glog-dev libgflags-dev doxygen libtbb-dev libnuma-dev protobuf-compiler protobuf-c-compiler libprotobuf-dev libmsgpack-dev uuid-dev libicu-dev pkg-config flex bison libmpdec-dev nlohmann-json3-dev libparquet-dev=16.1.0-1 libparquet-glib-dev=16.1.0-1 libarrow-dev=16.1.0-1 libarrow-glib-dev=16.1.0-1\n```\n(see \"Additional file installation for Apache Parquet\" below if installing `libparquet-dev`, `libparquet-glib-dev` fails)\n\noptional packages:\n\n* `doxygen`\n* `graphviz`\n* `clang-tidy-14`\n* [`linenoise-ng`](https://github.com/arangodb/linenoise-ng.git)\n\n### Install modules\n\n#### tsurugidb modules\n\nThis requires below [tsurugidb](https://github.com/project-tsurugi/tsurugidb) modules to be installed.\n* [mizugaki](https://github.com/project-tsurugi/mizugaki)\n* [tateyama](https://github.com/project-tsurugi/tateyama)\n\n### Additional file installation for Apache Arrow/Parquet\n\nJogasaki requires Apache Arrow and Parquet package versioned as `16.1.0-1` (Official release stays to this version for stability. Jogasaki may be built and run with later versions, but it's for development/testing purpose only, not for production.)\n\nInstalling Apache Arrow/Paquet packages `libarrow-dev`, `libarrow-glib-dev`, `libparquet-dev`, `libparquet-glib-dev` requires additional files installation.\nIf installing these packages from `apt install` command fails, issue below commands to install required files.\n\n```\nsudo apt install -y -V lsb-release\nwget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb\nsudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb\nsudo apt update\nsudo apt install -y -V libparquet-dev=16.1.0-1 libparquet-glib-dev=16.1.0-1 libarrow-dev=16.1.0-1 libarrow-glib-dev=16.1.0-1 gir1.2-parquet-1.0=16.1.0-1 gir1.2-arrow-1.0=16.1.0-1 libarrow-acero-dev=16.1.0-1\n```\n\n(You can see [here](https://arrow.apache.org/install/) for full instruction. )\n\n### Manual install steps for mpdecimal\n\nUbuntu 22.04 users can safely skip this section since `apt install libmpdec-dev` installs new version enough for Jogasaki. On Ubuntu 24.04 (and later), the apt command won't install mpdecimal package. Follow these steps in order to install mpdecmal in the custom location.\n\n1. Download [mpdecimal-2.5.1.tar.gz](https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.5.1.tar.gz) listed [here](https://www.bytereef.org/mpdecimal/download.html).\n2. Untar the archive and move into the extracted directory.\n```\n$ cd mpdecimal-2.5.1\n```\n3. run `configure` specifying `--prefix` option with installation target directory.\n```\n./configure --prefix=\u003cinstall directory\u003e\n```\n\n4. build and install\n```\nmake\nmake install\n```\n\n## How to build\n\n```sh\nmkdir -p build\ncd build\ncmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..\ncmake --build .\n```\n\navailable options:\n* `-DCMAKE_INSTALL_PREFIX=\u003cinstallation directory\u003e` - change install location\n* `-DCMAKE_PREFIX_PATH=\u003cinstallation directory\u003e` - indicate prerequisite installation directory\n* `-DCMAKE_IGNORE_PATH=\"/usr/local/include;/usr/local/lib/\"` - specify the libraries search paths to ignore. This is convenient if the environment has conflicting version installed on system default search paths. (e.g. gflags in /usr/local)\n* `-DBUILD_SHARED_LIBS=OFF` - create static libraries instead of shared libraries\n* `-DBUILD_TESTS=ON` - build test programs\n* `-DBUILD_DOCUMENTS=ON` - build documents by doxygen\n* `-DBUILD_EXAMPLES=ON` - build example applications\n* `-DBUILD_STRICT=OFF` - don't treat compile warnings as build errors\n* `-DINSTALL_EXAMPLES=ON` - install example applications (requires BUILD_EXAMPLES enabled)\n* `-DSHARKSFIN_IMPLEMENTATION=\u003cimplementation name\u003e` - switch sharksfin implementation. Available options are `memory` and `shirakami` (default: `shirakami`)\n* `-DPERFORMANCE_TOOLS=ON` - enable performance tooling to measure engine performance\n* `-DINSTALL_API_ONLY=ON` - configure build directory just to install public header files. Use when other components require jogasaki public headers.\n* `-DENABLE_ALTIMETER=ON` - turn on altimeter logging.\n* for debugging only\n  * `-DENABLE_SANITIZER=OFF` - disable sanitizers (requires `-DCMAKE_BUILD_TYPE=Debug`)\n  * `-DENABLE_UB_SANITIZER=ON` - enable undefined behavior sanitizer (requires `-DENABLE_SANITIZER=ON`)\n  * `-DENABLE_COVERAGE=ON` - enable code coverage analysis (requires `-DCMAKE_BUILD_TYPE=Debug`)\n  * `-DTRACY_ENABLE=ON` - enable tracy profiler for multi-thread debugging. See section below.\n  * `-DLIKWID_ENABLE=ON` - enable LIKWID for performance metrics. See section below.\n\n### install\n\n```sh\ncmake --build . --target install\n```\n\n### run tests\n\n```sh\nctest -V\n```\n\n### generate documents\n\n```sh\ncmake --build . --target doxygen\n```\n\n### Code coverage\n\nRun cmake with `-DENABLE_COVERAGE=ON` and run tests.\nDump the coverage information into html files with the following steps:\n\n```sh\ncd build\nmkdir gcovr-html\nGCOVR_COMMON_OPTION='-e ../third_party -e ../test -e ../examples -e ../mock -e (.+)?\\.pb\\.h$ -e (.+)?\\.pb\\.cc$'\ngcovr  -r .. --html --html-details  ${GCOVR_COMMON_OPTION} -o gcovr-html/jogasaki-gcovr.html\n```\n\nOpen gcovr-html/jogasaki-gcovr.html to see the coverage report.\n\n### Customize logging setting\nYou can customize logging in the same way as sharksfin. See sharksfin [README.md](https://github.com/project-tsurugi/sharksfin/blob/master/README.md#customize-logging-setting) for more details.\n\n```sh\nGLOG_minloglevel=0 ./group-cli --minimum\n```\n\n### Multi-thread debugging/profiling with Tracy\n\nYou can use [Tracy Profiler](https://github.com/wolfpld/tracy) to graphically display the threads operations and improve printf debug by printing messages on the tooltips on the Tracy profiler UI.\nBy setting cmake build option `-DTRACY_ENABLE=ON`, TracyClient.cpp file is added to the build and tracing macros are enabled.\n\n(2021-11 TracyClient.cpp is included in tateyama only in order to avoid start up conflict, so set `-DTRACY_ENABLE=ON` both on tateyama and jogasaki if you profile jogasaki)\n\nPrerequirement:\n\n1. ensure tracy code is located under `third_party/tracy` directory.\n```\ngit submodule update --init third_party/tracy\n```\n\n2. include common.h at the top of files that requires tracing.\n```\n#include \u003cjogasaki/common.h\u003e\n```\n\n3. Put `trace_scope` at the beginning of the scope to trace, or use other tracing functions defined in common.h.\n\n### Recompile time saving with ccache\n\nYou can save re-compile time using [ccache](https://ccache.dev), which caches the compiled output and reuse on recompilation if no change is detected.\nThis works well with jogasaki build as jogasaki build has dependencies to many components and translation units are getting bigger.\n\n1. Install ccache\n```\napt install ccache\n```\n2. add `-DCMAKE_CXX_COMPILER_LAUNCHER=ccache` to cmake build option.\n\nFirst time build does not change as it requires building and caching all artifacts into cache directory, e.g. `~/.ccache`. When you recompile, you will see it finishes very fast.\nChecking `ccache -s` shows the cache hit ratio and size of the cached files.\n\n### Profiling with LIKWID\n\nYou can use [LIKWID](https://github.com/RRZE-HPC/likwid) to retrieve the performance metrics via hardware counters.\nBy setting cmake build option `-DLIKWID_ENABLE=ON`, jogasaki is linked to the LIKWID library and its marker API macros are enabled.\n\nPrerequirement:\n\n1. Install LIKWID in your environment. Typically, this can be done by clone the LIKWID repository, update the config.mk, run `make` and `make install`. You can install to users local directory, but you need `sudo` to run `make install` in order to set SUID for some binary files.\n\n2. include common.h at the top of files that requires profiling. This allow you to call LIKWID marker APIs such as `LIKWID_MARKER_START`\n```\n#include \u003cjogasaki/common.h\u003e\n```\n3. Make sure LIKWID initialize/deinitialize macros `LIKWID_MARKER_INIT`/`LIKWID_MARKER_CLOSE` are called at some point where the code does initialize/deinitialize.\n4. Put `LIKWID_MARKER_START`/`LIKWID_MARKER_STOP` macros to specify the scope to profile.\n\nRunning jogasaki with likwid-perfctr command will show you the performance counters incremented by the code between`LIKWID_MARKER_START` and `LIKWID_MARKER_STOP`. See LIKWID documentation for details\n\n## License\n\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-tsurugi%2Fjogasaki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject-tsurugi%2Fjogasaki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-tsurugi%2Fjogasaki/lists"}