欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Run/Debug Cassandra in IntelliJ IDEA

程序员文章站 2022-02-11 06:30:00
...

Clone Code

Clone Cassandra Code 切换到 3.11 branch

git clone https://github.com/apache/cassandra.git
git fetch origin cassandra-3.11
git checkout cassandra-3.11

生成 .idea 文件

Cassandra 使用 ant 管理 project. build.xml 内定义了生成 idea 和 eclipse 的命令.

ant generate-idea-files

idea 的原始文件在 ./ide/idea 中.
如果要使用eclipse

ant generate-eclipse-files

open source folder by IntelliJ IDEA

File-->Open select cassandra folder

[email protected]:~/pp/cassandra/cassandra$ tree -L 1 -a
.
├── bin
├── build
├── build.properties.default
├── build.xml
├── cassandra.iml
├── CHANGES.txt
├── circle.yml
├── conf
├── CONTRIBUTING.md
├── debian
├── doc
├── eclipse_compiler.properties
├── examples
├── .git
├── .gitignore
├── ide
├── .idea
├── interface
├── lib
├── LICENSE.txt
├── NEWS.txt
├── NOTICE.txt
├── pylib
├── .rat-excludes
├── README.asc
├── redhat
├── src
├── test
└── tools

Run Cassandra

入口在 org.apache.cassandra.service.CassandraDaemon
idea 下右键 CassandraDaemon.java --> Run Cassandra | Debug Cassandra
默认使用 configuration ./conf/cassandra.yaml

转载于:https://www.jianshu.com/p/dc2d87067e34