Year: 2015

JNA(Java Native Access) provides Java programs easy access to native shared libraries without writing anything but Java code – no JNI or native code is required. This functionality is comparable to Windows’ Platform/Invoke and Python’s ctypes.

cassandra的native_transport使用与rpc_address同样的绑定地址,默认情况下只绑定到localhost,所以从外部是无法访问到cassandra的9042端口的,使用native协议的驱动也就无法访问节点了。因此,可以在不启用rpc的情况下,修改rpc_address地址为外部可访问接口,从而可以从外部访问native transport。