public static ITransportPlugin GetTransportPlugin ( ThriftConnectionType type , Map storm_conf , Configuration login_conf ) { ITransportPlugin transportPlugin = null ; try { String transport_plugin_klassName = type . getTransportPlugin ( storm_conf ) ; Class klass = Class . forName ( transport_plugin_klassName ) ; transportPlugin = ( ITransportPlugin ) klass . newInstance ( ) ; transportPlugin . prepare ( type , storm_conf , login_conf ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } return transportPlugin ; }
Construct a transport plugin per storm configuration