使用idea从git上拉取kylin的master代码
在idea命令端执行:
拉出相应版本代码
git tag
kylin-1.5.3-cdh5.7
kylin-1.5.4
kylin-1.5.4-HBase1.x
kylin-1.5.4-cdh5.7
kylin-1.5.4.1
git checkout kylin-1.5.4-HBase1.x
package org.apache.kylin.rest.controller;
@Controller
public class QueryController extends BasicController {
...
@RequestMapping(value = "/query", method = RequestMethod.POST)
@ResponseBody
public SQLResponse query(@RequestBody SQLRequest sqlRequest) {
return doQueryWithCache(sqlRequest);
}
...
}
对return doQueryWithCache(sqlRequest); 行进行debug
配置host,port
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787
在服务器端配置kylin/setenv.sh
export KYLIN_DEBUG_SETTINGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787"
然后重启kylin
kylin.sh stop
kylin.sh start
启动后,kylin/setenv.sh 注释掉,新的cube build会使用这个端口,导致报错
本地idea点击debug,就可以调试了.