VoltDB本地调试指南

阅读 49

2022-07-27


在eclipse里可以运行那些test之后

使用如下完整代码

public static void main(String[] args) throws IOException {

String simpleSchema = "create table blah ("
+ "ival bigint default 0 not null, " + "PRIMARY KEY(ival));";

VoltProjectBuilder builder = new VoltProjectBuilder();
builder.addLiteralSchema(simpleSchema);
builder.addProcedures(CrashVoltDBProc.class);

LocalCluster cluster = new LocalCluster("crash.jar", 2, 2, 1,
BackendTarget.NATIVE_EE_JNI);
cluster.setHasLocalServer(true);
boolean success = cluster.compile(builder);
assert (success);
cluster.startUp(true);

}




用bin/sqlcmd.sh就可以连了

在AsyncCompilerAgent.java的compileAdHocPlan方法里打断点






另外

根据https://github.com/VoltDB/voltdb/wiki/Setting-up-an-Eclipse-Project里面的

-ea -Xmx1g -Dlog4j.configuration=file:${workspace_loc:voltdb/tests}/log4j-allconsole.xml

可以让打印信息都出来


精彩评论(0)

0 0 举报