Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2531#discussion_r166756346
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/security/auth/ThriftServer.java ---
    @@ -30,60 +29,62 @@
     
     public class ThriftServer {
         private static final Logger LOG = 
LoggerFactory.getLogger(ThriftServer.class);
    -    private Map _topoConf; //storm configuration
    -    protected TProcessor _processor = null;
    -    private final ThriftConnectionType _type;
    -    private TServer _server;
    -    private Configuration _login_conf;
    -    private int _port;
    +    private final Map<String, Object> conf; //storm configuration
    +    protected final TProcessor processor;
    +    private final ThriftConnectionType type;
    +    private TServer server;
    +    private Configuration loginConf;
    +    private int port;
    +    private boolean areWorkerTokensSupported;
         
    -    public ThriftServer(Map<String, Object> topoConf, TProcessor 
processor, ThriftConnectionType type) {
    -        _topoConf = topoConf;
    -        _processor = processor;
    -        _type = type;
    +    public ThriftServer(Map<String, Object> conf, TProcessor processor, 
ThriftConnectionType type) {
    +        this.conf = conf;
    +        this.processor = processor;
    +        this.type = type;
     
             try {
                 //retrieve authentication configuration 
    -            _login_conf = AuthUtils.GetConfiguration(_topoConf);
    +            loginConf = AuthUtils.GetConfiguration(this.conf);
             } catch (Exception x) {
                 LOG.error(x.getMessage(), x);
             }
             try {
                 //locate our thrift transport plugin
    -            ITransportPlugin transportPlugin = 
AuthUtils.GetTransportPlugin(_type, _topoConf, _login_conf);
    +            ITransportPlugin transportPlugin = 
AuthUtils.getTransportPlugin(this.type, this.conf, loginConf);
                 //server
    -            _server = transportPlugin.getServer(_processor);
    -            _port = transportPlugin.getPort();
    +            server = transportPlugin.getServer(this.processor);
    +            port = transportPlugin.getPort();
    +            areWorkerTokensSupported = 
transportPlugin.areWorkerTokensSupported();
             } catch (IOException | TTransportException ex) {
                 handleServerException(ex);
             }
     
         }
     
         public void stop() {
    -        _server.stop();
    +        server.stop();
         }
     
         /**
          * @return true if ThriftServer is listening to requests?
          */
    -    public boolean isServing() {
    -        return _server.isServing();
    +    public synchronized boolean isServing() {
    --- End diff --
    
    Sorry it is not needed.  I tried this as I was trying to fix an issue and 
didn't revert it.


---

Reply via email to