> On Aug. 11, 2017, 11:11 a.m., David Radley wrote:
> > distro/src/bin/atlas_config.py
> > Lines 71 (patched)
> > <https://reviews.apache.org/r/61561/diff/1/?file=1794995#file1794995line71>
> >
> >     I am uncomfortable duplicating the default port values here. I suggest 
> > moving this logic to the java class that already has the default port values
> 
> Richard Ding wrote:
>     The default ports are hard-coded in Java class:
>     ```
>     appPort = StringUtils.isEmpty(enableTLSFlag) || 
> enableTLSFlag.equals("true") ?
>                 configuration.getInt(ATLAS_SERVER_HTTPS_PORT, 21443) :
>                 configuration.getInt(ATLAS_SERVER_HTTP_PORT, 21000);
>     ```
>     It's also difficult to access Java class from python code.
> 
> David Radley wrote:
>     hi Richard , unless you move the polling logic into Java code (in a 
> separate thread) - so you have more control over it. I assume the process 
> starts right away, but the delay is in web server code prior to it opening 
> the port. all the best, David.

You are right. The polling logic is in the startup python script which has no 
access to Java classes. 

The process is started by the python script (atlas_start.py) and the script has 
no way to know when the server initialization is complete. So inside the 
startup script the best we can do is to ping the port. After changing the code 
to use socket module, the code is simplified and it appears to work well even 
with SSL port.


- Richard


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61561/#review182676
-----------------------------------------------------------


On Aug. 15, 2017, 10:08 p.m., Richard Ding wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61561/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 10:08 p.m.)
> 
> 
> Review request for atlas, David Radley, Madhan Neethiraj, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-1218
>     https://issues.apache.org/jira/browse/ATLAS-1218
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> This patch implements a wait_for_startup function modeled after 
> wait_for_shutdown function.
> 
> 
> Diffs
> -----
> 
>   distro/src/bin/atlas_config.py 1be9ca2b 
>   distro/src/bin/atlas_start.py a6a3455c 
> 
> 
> Diff: https://reviews.apache.org/r/61561/diff/3/
> 
> 
> Testing
> -------
> 
> Here are the output of atlas_start and atlas_stop script:
> ```
> starting atlas on port 21000
> ........................................................................................................................
> Apache Atlas Server started!!!
> ```
> and
> ```
> stopping atlas........
> Apache Atlas Server stopped!!!
> ```
> 
> 
> Thanks,
> 
> Richard Ding
> 
>

Reply via email to