[ 
https://issues.apache.org/jira/browse/LENS-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amareshwari Sriramadasu updated LENS-163:
-----------------------------------------
    Attachment: LENS-163.movestoptomain.patch

Added the patch on top of Srikanth's patch which moves stop from shutdownhook 
thread to main thread.

Issued stop with the patch. Stop is not going through, here are the logs:

{noformat}
lens-dist-2.0.0-SNAPSHOT-server amareshwari.sr$ bin/lens-ctl stop
Stopping lens server running as 56008
..Stopped lens server!

lens-dist-2.0.0-SNAPSHOT-server amareshwari.sr$ tail logs/lensserver.log 
29 Dec 2014 11:09:00,026 [lens-server-snapshotter] INFO  
org.apache.lens.server.query.QueryExecutionServiceImpl  - Persisted 0 queries
29 Dec 2014 11:09:00,027 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - Persisted service query to 
file:/tmp/lensserver/query.final
29 Dec 2014 11:09:00,128 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - Persisting state of service:metastore
29 Dec 2014 11:09:00,169 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - Persisted service metastore to 
file:/tmp/lensserver/metastore.final
29 Dec 2014 11:09:00,270 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - Persisting state of service:scheduler
29 Dec 2014 11:09:00,290 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - Persisted service scheduler to 
file:/tmp/lensserver/scheduler.final
29 Dec 2014 11:09:00,392 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - Persisting state of service:quota
29 Dec 2014 11:09:00,422 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - Persisted service quota to 
file:/tmp/lensserver/quota.final
29 Dec 2014 11:09:00,594 [lens-server-snapshotter] INFO  
org.apache.lens.server.LensServices  - SnapShot of Lens Services created
29 Dec 2014 11:10:17,181 [Shutdown] INFO  org.apache.lens.server.LensServer  - 
Server has been requested to be stopped.
lens-dist-2.0.0-SNAPSHOT-server amareshwari.sr$ 

{noformat}


> Fix Lens Server & Stop related issues. Was (Proprietary classes referenced in 
> LensServer)
> -----------------------------------------------------------------------------------------
>
>                 Key: LENS-163
>                 URL: https://issues.apache.org/jira/browse/LENS-163
>             Project: Apache Lens
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 2.0
>            Reporter: Srikanth Sundarrajan
>            Assignee: Srikanth Sundarrajan
>             Fix For: 2.0
>
>         Attachments: LENS-163-v1.patch, LENS-163.movestoptomain.patch, 
> LENS-163.patch
>
>
> LensServer imports the following dependencies
> {code}
> import sun.misc.Signal;
> import sun.misc.SignalHandler;
> {code}
> and this is being used to register essentially shutdownhook.
> {code}
> ...
>     Signal.handle(new Signal("TERM"), new SignalHandler() {
>       @Override
>       public void handle(Signal signal) {
> ...
> {code}
> We should use Runtime::addShutdownHook() instead.
> Besides issues reported relating to proprietary class references, there are 
> other issues in how start & stop are handled. Broadening the scope of this 
> issue based on feedback from [~jaideepdhok] and laxman



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to