This document describes the deployment of lens server in a distributed cluster. Make sure you have finished Install and Run documentation, before proceeding.
Lens server requires Hive metastore for providing OLAP cube metastore. Its also requires a DB for storing system tables, which can be shared with Hive metastore server's underlying DB as well. Hive server is required if Hive is one of the execution engines.
Typical deployment suggested is depicted in the following diagram (the boxes and lines in blue show server level components, the ones in green show execution components)
Its recommended HiveMetastore server, HiveServer2 and Lens Server running on different machines.
Lens server should not have problems with Hive Metastore server, Hive Server2 or Hadoop restarts. Lens server can persist its state before going down and recover from previous state upon restart.
Lens server can be started in various modes. The server mode can be specified via configuration when it is starting up. Available modes are
Lens server comes with LogResource which can serve logs under LENS_LOG_DIR over REST. To enable serving logs, administrator can enable log resource by adding log to configuration property "lens.server.ws.resourcenames". Config changes look the following :
property namelens.server.ws.resourcenames/name valuesession,metastore,query,index,log/value descriptionThese JAX-RS resources would be started in the specified order when lens-server starts up/description /property
property namelens.server.log.ws.resource.impl/name valueorg.apache.lens.server.LogResource/value descriptionImplementation class for Log Resource/description /property
If resourcenames does not contain "log", it is not enabled.