创建DRPC远程客户端
DRPCClient创建方法如下:
1 | //conf map, drpc server, port no, timeout for the call |
conf如下:
1 | Config conf = new Config(); |
这将产生下列这个错误:
1 | java.lang.NullPointerException |
如何添加下列这句话:
1 | conf.put("storm.thrift.transport", "backtype.storm.security.auth.SimpleTransportPlugin"); |
这将继续报这个错误:
1 | Don't know how to convert null to int |
在storm0.10之后就已经做了改进,使用map来传递配置参数。
正确做法:
1 | Config conf = new Config(); |