[
https://issues.apache.org/jira/browse/LENS-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14285157#comment-14285157
]
Raju Bairishetti commented on LENS-163:
---------------------------------------
Ran lens server in docker.
Server was shutdown gracefully. It stores the server state on hdfs location.
{noformat}
root@af7b69b5816c:/opt/lens/lens-dist/target/lens-dist-2.0.0-SNAPSHOT-server#
bin/lens-ctl stop
Stopping lens server running as 1569
.Stopped lens server!
{noformat}
*Property:*
root@af7b69b5816c:/opt/lens/lens-dist/target/lens-dist-2.0.0-SNAPSHOT-server#
grep -A1 -i persist conf/lens-site.xml
<name>lens.server.persist.location</name>
<value>hdfs://af7b69b5816c:9000/tmp/lensserver-testing</value>
*Server logs:*
{noformat}
21 Jan 2015 04:21:21,431 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisted service session to
hdfs://af7b69b5816c:9000/tmp/lensserver-testing/session.final
21 Jan 2015 04:21:21,432 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisting state of service:query
21 Jan 2015 04:21:21,438 [Shutdown] INFO
org.apache.lens.driver.hive.HiveDriver - HiveDriver persisted 0 queries
21 Jan 2015 04:21:21,439 [Shutdown] INFO
org.apache.lens.driver.hive.HiveDriver - HiveDriver persisted 0 sessions
21 Jan 2015 04:21:21,439 [Shutdown] INFO
org.apache.lens.server.query.QueryExecutionServiceImpl - Persisted 0 queries
21 Jan 2015 04:21:21,465 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisted service query to
hdfs://af7b69b5816c:9000/tmp/lensserver-testing/query.final
21 Jan 2015 04:21:21,465 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisting state of service:metastore
21 Jan 2015 04:21:21,493 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisted service metastore to
hdfs://af7b69b5816c:9000/tmp/lensserver-testing/metastore.final
21 Jan 2015 04:21:21,493 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisting state of service:scheduler
21 Jan 2015 04:21:21,520 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisted service scheduler to
hdfs://af7b69b5816c:9000/tmp/lensserver-testing/scheduler.final
21 Jan 2015 04:21:21,520 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisting state of service:quota
21 Jan 2015 04:21:21,599 [Shutdown] INFO org.apache.lens.server.LensServices
- Persisted service quota to
hdfs://af7b69b5816c:9000/tmp/lensserver-testing/quota.final
21 Jan 2015 04:21:21,702 [Shutdown] INFO org.apache.lens.server.LensServices
- Persistence File system object close complete
21 Jan 2015 04:21:21,703 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:quota is stopped.
21 Jan 2015 04:21:21,703 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:scheduler is stopped.
21 Jan 2015 04:21:21,704 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:metastore is stopped.
21 Jan 2015 04:21:21,704 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:query is stopped.
21 Jan 2015 04:21:21,705 [Shutdown] INFO
org.apache.lens.server.query.QueryExecutionServiceImpl - Query execution
service stopped
21 Jan 2015 04:21:21,705 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:session is stopped.
21 Jan 2015 04:21:21,705 [Shutdown] INFO
org.apache.lens.server.EventServiceImpl - Removed listener
org.apache.lens.server.stats.store.log.LogStatisticsStore@348b33af
21 Jan 2015 04:21:21,709 [Shutdown] INFO
org.apache.lens.server.EventServiceImpl - Removed listener
org.apache.lens.server.stats.store.log.StatisticsLogPartitionHandler@2bf4a521
21 Jan 2015 04:21:21,709 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:stats is stopped.
21 Jan 2015 04:21:21,711 [Shutdown] INFO
org.apache.lens.server.EventServiceImpl - Removed listener
org.apache.lens.server.MetricsServiceImpl$AsyncQueryStatusListener@32af7e20
21 Jan 2015 04:21:21,711 [Shutdown] INFO
org.apache.lens.server.api.metrics.MetricsService - Stopped metrics service
21 Jan 2015 04:21:21,711 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:metrics is stopped.
21 Jan 2015 04:21:21,711 [Shutdown] INFO
org.apache.lens.server.EventServiceImpl - Event service stopped
21 Jan 2015 04:21:21,712 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:event is stopped.
21 Jan 2015 04:21:21,712 [Shutdown] INFO
org.apache.hadoop.hive.metastore.HiveMetaStore - 1: Shutting down the object
store...
21 Jan 2015 04:21:21,715 [Shutdown] INFO
org.apache.hadoop.hive.metastore.HiveMetaStore.audit - ugi=root
ip=unknown-ip-addr cmd=Shutting down the object store...
21 Jan 2015 04:21:21,717 [Shutdown] INFO
org.apache.hadoop.hive.metastore.HiveMetaStore - 1: Metastore shutdown
complete.
21 Jan 2015 04:21:21,717 [Shutdown] INFO
org.apache.hadoop.hive.metastore.HiveMetaStore.audit - ugi=root
ip=unknown-ip-addr cmd=Metastore shutdown complete.
21 Jan 2015 04:21:21,718 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:OperationManager is stopped.
21 Jan 2015 04:21:21,719 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:SessionManager is stopped.
21 Jan 2015 04:21:21,719 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:CLIService is stopped.
21 Jan 2015 04:21:21,719 [Shutdown] INFO
org.apache.hive.service.AbstractService - Service:lens_services is stopped.
21 Jan 2015 04:21:21,719 [Shutdown] INFO org.apache.lens.server.LensServer -
###############################################################
Lens Server (SHUTDOWN)
###############################################################
{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-v2.patch, LENS-163-v3.patch,
> LENS-163.movestoptomain.patch, LENS-163.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)