LENS-1520 : Lens build fix.
authorRajitha R <rajithar@apache.org>
Tue, 12 Jun 2018 11:32:15 +0000 (17:02 +0530)
committerRajitha.R <rajithar@IM0318-L0.corp.inmobi.com>
Tue, 12 Jun 2018 11:32:15 +0000 (17:02 +0530)
lens-server/src/main/java/org/apache/lens/server/query/LensPersistentResult.java
lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
src/site/apt/admin/config.apt

index 91bb701..4aa4578 100644 (file)
@@ -75,11 +75,12 @@ public class LensPersistentResult extends PersistentResultSet {
     this.fileSize = fileSize;
     this.conf = conf;
     if (isHttpResultAvailable()) {
-      resultUrlSetter = ReflectionUtils.newInstance(this.conf.getClass(LensConfConstants.RESULT_DOWNLOAD_URL_PROVIDER_CLASS,
+      resultUrlSetter = ReflectionUtils.newInstance(this.conf.getClass(
+        LensConfConstants.RESULT_DOWNLOAD_URL_PROVIDER_CLASS,
         LensConfConstants.DEFAULT_RESULT_DOWNLOAD_URL_PROVIDER, DownloadResultUrlProvider.class));
       this.httpResultUrl = resultUrlSetter.getResultUrl(this.conf, queryHandle.toString());
-      log.info("Config : " + this.conf.get(LensConfConstants.RESULT_DOWNLOAD_URL_PROVIDER_CLASS) + " Result url set as : "
-        + this.httpResultUrl);
+      log.info("Config : " + this.conf.get(LensConfConstants.RESULT_DOWNLOAD_URL_PROVIDER_CLASS)
+        + " Result url set as : " + this.httpResultUrl);
     }
   }
 
index 77fce0b..5e4acdc 100644 (file)
@@ -1938,7 +1938,9 @@ public class QueryExecutionServiceImpl extends BaseLensService implements QueryE
         throw new NotFoundException("InMemory Query result purged " + queryHandle);
       }
       try {
-        conf.addResource(ctx.getConf());
+        if (ctx != null && ctx.getConf() != null) {
+          conf.addResource(ctx.getConf());
+        }
         return new LensPersistentResult(query, conf);
       } catch (Exception e) {
         throw new LensException(e);
index 9a1572b..b3dff28 100644 (file)
@@ -235,9 +235,9 @@ Lens server configuration
 *--+--+---+--+
 |103|lens.server.session.ws.resource.impl|org.apache.lens.server.session.SessionResource|Implementation class for Session Resource|
 *--+--+---+--+
-|104|lens.server.ssl.enabled|false|flag to enable https communication between lens server|
+|104|lens.server.ssl.enabled|false|flag to enable https communication between lens server and client.|
 *--+--+---+--+
-|105|lens.server.ssl.file.path|/usr/local/lens/server/certs|local path for cert file if ssl ie enabled.|
+|105|lens.server.ssl.file.path|/tmp/certs|local path for cert file if ssl ie enabled.|
 *--+--+---+--+
 |106|lens.server.ssl.password|password|password for cert file|
 *--+--+---+--+