VoltDB本地调试指南

来源:互联网 发布:药学专业网络教育 编辑:程序博客网 时间:2024/05/17 04:39

在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
原创粉丝点击