Re: Review Request 38521: LENS-607: Fix Test failures in java8

2015-09-21 Thread Raju Bairishetti

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

(Updated Sept. 21, 2015, 6:10 a.m.)


Review request for lens, Amareshwari Sriramadasu and Rajat Khandelwal.


Changes
---

Revert the changes of LinkedList to ArrayList from TestColumnarSQLRewriter


Bugs: LENS-607
https://issues.apache.org/jira/browse/LENS-607


Repository: lens


Description
---

Iterators in java7 and java8 are returning elements in different order. All 
most all failures are because of this case.

Changes:
TestBaseCubeQueries: Changed driver supported storages to single storage 
instead of multiple
TestCubeRewriter: Returning diffrent orders in the joins. Separated join part 
from the actaul query part and verified join part and remaining query part 
separately.
TestStorageUtil: Multiple sets can answer the given partitions. Changed asserts 
accordingly.
TestTimeRangeResolver: Changed asserts to cover all the errors.

*ColumnSQLRewriter* : Changed all data structures to *Linked* datastructures 
(Arraylist --> LinkedList, HashSet to LinkedHashSet, HashMap to LinkedHashMap) 
to return the elements in insertion order.

TestColumnSQLRewriter: Changed the order of columns in queries.


Diffs (updated)
-

  lens-cli/src/test/java/org/apache/lens/cli/TestLensCubeCommands.java 39441c9 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
0f76c76 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
a58f5fe 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/TestDenormalizationResolver.java
 bde4edd 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/TestExpressionResolver.java 
493b8d6 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestStorageUtil.java 
81f515b 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestTimeRangeResolver.java 
cb27d50 
  
lens-driver-jdbc/src/main/java/org/apache/lens/driver/jdbc/ColumnarSQLRewriter.java
 295b476 
  
lens-driver-jdbc/src/test/java/org/apache/lens/driver/jdbc/TestColumnarSQLRewriter.java
 db09a4b 
  lens-server/src/test/java/org/apache/lens/server/rewrite/TestRewriting.java 
7be9793 
  pom.xml adba544 

Diff: https://reviews.apache.org/r/38521/diff/


Testing
---

Tested on both java7 and java8. Build is successful. Will post the build 
artifact summary soon.

c1mng0pxdty3:lens raju.bairishetti$ java -version
**java version "1.8.0_40"**

[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Lens Checkstyle Rules .. SUCCESS [  4.849 s]
[INFO] Lens ... SUCCESS [  5.806 s]
[INFO] Lens API ... SUCCESS [ 31.562 s]
[INFO] Lens API for server and extensions . SUCCESS [ 23.200 s]
[INFO] Lens Cube .. SUCCESS [06:19 min]
[INFO] Lens DB storage  SUCCESS [ 23.015 s]
[INFO] Lens Query Library . SUCCESS [ 18.249 s]
[INFO] Lens Hive Driver ... SUCCESS [03:11 min]
[INFO] Lens Driver for JDBC ... SUCCESS [ 41.094 s]
[INFO] Lens Elastic Search Driver . SUCCESS [ 26.188 s]
[INFO] Lens Server  SUCCESS [12:38 min]
[INFO] Lens client  SUCCESS [ 44.951 s]
[INFO] Lens CLI ... SUCCESS [04:57 min]
[INFO] Lens Examples .. SUCCESS [ 11.491 s]
[INFO] Lens Distribution .. SUCCESS [ 19.483 s]
[INFO] Lens ML Lib  SUCCESS [02:35 min]
[INFO] Lens ML Ext Distribution ... SUCCESS [  7.919 s]
[INFO] Lens Regression  SUCCESS [ 11.523 s]
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 34:13 min
[INFO] Finished at: 2015-09-19T12:13:27+05:30
[INFO] Final Memory: 158M/1483M
[INFO] 


JDK-7:  **sun-jdk-1.7.0_55**

regression-2.4.0-beta-SNAPSHOT-tests.jar
[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Lens Checkstyle Rules . SUCCESS [1.999s]
[INFO] Lens .. SUCCESS [2.816s]
[INFO] Lens API .. SUCCESS [23.685s]
[INFO] Lens API for server and extensions  SUCCESS [20.093s]
[INFO] Lens Cube 

[jira] [Commented] (LENS-399) TestRewriting test is failing with powermock incompatibility with jdk8

2015-09-21 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/LENS-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900257#comment-14900257
 ] 

Hudson commented on LENS-399:
-

SUCCESS: Integrated in Lens-Commit #1085 (See 
[https://builds.apache.org/job/Lens-Commit/1085/])
LENS-399 : Fix powermock test failure on jdk8 (amareshwari: rev 
5f60bdc62f8e5db288fa8967fa0f865a044386d1)
* lens-server/src/test/java/org/apache/lens/server/rewrite/TestRewriting.java
* pom.xml


> TestRewriting test is failing with powermock incompatibility with jdk8
> --
>
> Key: LENS-399
> URL: https://issues.apache.org/jira/browse/LENS-399
> Project: Apache Lens
>  Issue Type: Sub-task
>  Components: build, test
>Reporter: Raju Bairishetti
>Assignee: Raju Bairishetti
> Fix For: 2.4
>
> Attachments: LENS-399.patch
>
>
> Right now, TestRewriting is failing with the incompatible version of 
> pwoermock on jdk8. We need to use latest version which is compatible for jdk8
> Current versions in lens:
> *1.8.5*
> *1.4.12*
> {noformat}
> An error occurred while instantiating class 
> org.apache.lens.driver.cube.TestRewriting: Failed to transform class with 
> name org.apache.lens.driver.cube.TestRewriting. Reason: java.io.IOException: 
> invalid constant type: 18 at 1
>   at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:398)
>   at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
> {noformat}



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


[jira] [Created] (LENS-784) setup build job with java8 on jenkins

2015-09-21 Thread Raju Bairishetti (JIRA)
Raju Bairishetti created LENS-784:
-

 Summary: setup build job with java8 on jenkins
 Key: LENS-784
 URL: https://issues.apache.org/jira/browse/LENS-784
 Project: Apache Lens
  Issue Type: Bug
  Components: build
Reporter: Raju Bairishetti
 Fix For: 2.4


Right now we have build job only with java7. We need to set up a jenkins build 
job with java8 as there are some incompatible changes in java8.



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


[jira] [Created] (LENS-783) QueryPurger purging queries twice on hive server restart.

2015-09-21 Thread Rajat Khandelwal (JIRA)
Rajat Khandelwal created LENS-783:
-

 Summary: QueryPurger purging queries twice on hive server restart. 
 Key: LENS-783
 URL: https://issues.apache.org/jira/browse/LENS-783
 Project: Apache Lens
  Issue Type: Bug
Reporter: Rajat Khandelwal


logs:

{noformat}
21 Sep 2015 11:32:07 [d226e92b-86dc-4bab-8581-839551f1b42b] [QueryPurger] WARN  
org.apache.lens.server.query.QueryExecutionServiceImpl - Exception while 
purging query
java.sql.SQLException: Found different value pre-existing in DB while trying to 
insert finished query. Old = 
FinishedLensQuery(handle=d226e92b-86dc-4bab-8581-839551f1b42b, 
userQuery=some_user_query, submitter=user.name, submissionTime=1442820769519, 
startTime=1442820785396, endTime=1442821435109, result=null, status=FAILED, 
metadata=null, rows=null, fileSize=null, errorMessage=Error getting query 
status, driverStartTime=1442820769586, driverEndTime=0, metadataClass=null, 
queryName=week 38 invalid clicks dod, selectedDriver=null)
New = FinishedLensQuery(handle=d226e92b-86dc-4bab-8581-839551f1b42b, 
userQuery=some_user_query, submitter=user.name, submissionTime=1442820769519, 
startTime=1442820785396, endTime=1442821435109, result=null, status=FAILED, 
metadata=null, rows=null, fileSize=null, errorMessage=Error getting query 
status, driverStartTime=1442820769586, driverEndTime=0, metadataClass=null, 
queryName=week 38 invalid clicks dod, 
selectedDriver=org.apache.lens.driver.hive.HiveDriver@344e4f01)
at 
org.apache.lens.server.query.LensServerDAO.insertFinishedQuery(LensServerDAO.java:133)
 ~[classes/:na]
{noformat}



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


Re: Review Request 38521: LENS-607: Fix Test failures in java8

2015-09-21 Thread Raju Bairishetti

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

(Updated Sept. 22, 2015, 1:19 a.m.)


Review request for lens, Amareshwari Sriramadasu and Rajat Khandelwal.


Changes
---

Rebase it to master and add a comment in test


Bugs: LENS-607
https://issues.apache.org/jira/browse/LENS-607


Repository: lens


Description
---

Iterators in java7 and java8 are returning elements in different order. All 
most all failures are because of this case.

Changes:
TestBaseCubeQueries: Changed driver supported storages to single storage 
instead of multiple
TestCubeRewriter: Returning diffrent orders in the joins. Separated join part 
from the actaul query part and verified join part and remaining query part 
separately.
TestStorageUtil: Multiple sets can answer the given partitions. Changed asserts 
accordingly.
TestTimeRangeResolver: Changed asserts to cover all the errors.

*ColumnSQLRewriter* : Changed all data structures to *Linked* datastructures 
(Arraylist --> LinkedList, HashSet to LinkedHashSet, HashMap to LinkedHashMap) 
to return the elements in insertion order.

TestColumnSQLRewriter: Changed the order of columns in queries.


Diffs (updated)
-

  lens-cli/src/test/java/org/apache/lens/cli/TestLensCubeCommands.java 39441c9 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
0f76c76 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java 
a58f5fe 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/TestDenormalizationResolver.java
 bde4edd 
  
lens-cube/src/test/java/org/apache/lens/cube/parse/TestExpressionResolver.java 
493b8d6 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestStorageUtil.java 
81f515b 
  lens-cube/src/test/java/org/apache/lens/cube/parse/TestTimeRangeResolver.java 
cb27d50 
  
lens-driver-jdbc/src/main/java/org/apache/lens/driver/jdbc/ColumnarSQLRewriter.java
 295b476 
  
lens-driver-jdbc/src/test/java/org/apache/lens/driver/jdbc/TestColumnarSQLRewriter.java
 db09a4b 

Diff: https://reviews.apache.org/r/38521/diff/


Testing
---

Tested on both java7 and java8. Build is successful. Will post the build 
artifact summary soon.

c1mng0pxdty3:lens raju.bairishetti$ java -version
**java version "1.8.0_40"**

[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Lens Checkstyle Rules .. SUCCESS [  4.849 s]
[INFO] Lens ... SUCCESS [  5.806 s]
[INFO] Lens API ... SUCCESS [ 31.562 s]
[INFO] Lens API for server and extensions . SUCCESS [ 23.200 s]
[INFO] Lens Cube .. SUCCESS [06:19 min]
[INFO] Lens DB storage  SUCCESS [ 23.015 s]
[INFO] Lens Query Library . SUCCESS [ 18.249 s]
[INFO] Lens Hive Driver ... SUCCESS [03:11 min]
[INFO] Lens Driver for JDBC ... SUCCESS [ 41.094 s]
[INFO] Lens Elastic Search Driver . SUCCESS [ 26.188 s]
[INFO] Lens Server  SUCCESS [12:38 min]
[INFO] Lens client  SUCCESS [ 44.951 s]
[INFO] Lens CLI ... SUCCESS [04:57 min]
[INFO] Lens Examples .. SUCCESS [ 11.491 s]
[INFO] Lens Distribution .. SUCCESS [ 19.483 s]
[INFO] Lens ML Lib  SUCCESS [02:35 min]
[INFO] Lens ML Ext Distribution ... SUCCESS [  7.919 s]
[INFO] Lens Regression  SUCCESS [ 11.523 s]
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 34:13 min
[INFO] Finished at: 2015-09-19T12:13:27+05:30
[INFO] Final Memory: 158M/1483M
[INFO] 


JDK-7:  **sun-jdk-1.7.0_55**

regression-2.4.0-beta-SNAPSHOT-tests.jar
[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Lens Checkstyle Rules . SUCCESS [1.999s]
[INFO] Lens .. SUCCESS [2.816s]
[INFO] Lens API .. SUCCESS [23.685s]
[INFO] Lens API for server and extensions  SUCCESS [20.093s]
[INFO] Lens Cube . SUCCESS [5:02.073s]
[INFO] Lens DB storage ... SUCCESS [19.937s]
[INFO] Lens Query Library 

Re: Review Request 37530: LENS-629 - A new improved web client

2015-09-21 Thread Amareshwari Sriramadasu

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



pom.xml (line 111)


I think we are already using 1.8, this would be conflicting.


- Amareshwari Sriramadasu


On Sept. 21, 2015, 12:14 p.m., Ankeet Maini wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37530/
> ---
> 
> (Updated Sept. 21, 2015, 12:14 p.m.)
> 
> 
> Review request for lens, Amareshwari Sriramadasu, Jaideep dhok, Rajat 
> Khandelwal, sharad agarwal, and Yash Sharma.
> 
> 
> Bugs: LENS-629
> https://issues.apache.org/jira/browse/LENS-629
> 
> 
> Repository: lens
> 
> 
> Description
> ---
> 
> LENS-629 - A new improved web client
> 
> 
> Diffs
> -
> 
>   .gitignore 5a356e0 
>   lens-ui/LICENSE PRE-CREATION 
>   lens-ui/README.markdown PRE-CREATION 
>   lens-ui/app/actions/AdhocQueryActions.js PRE-CREATION 
>   lens-ui/app/actions/LoginActions.js PRE-CREATION 
>   lens-ui/app/adapters/AdhocQueryAdapter.js PRE-CREATION 
>   lens-ui/app/adapters/AuthenticationAdapter.js PRE-CREATION 
>   lens-ui/app/adapters/BaseAdapter.js PRE-CREATION 
>   lens-ui/app/app.js PRE-CREATION 
>   lens-ui/app/components/AboutComponent.js PRE-CREATION 
>   lens-ui/app/components/AdhocQueryComponent.js PRE-CREATION 
>   lens-ui/app/components/AppComponent.js PRE-CREATION 
>   lens-ui/app/components/CubeSchemaComponent.js PRE-CREATION 
>   lens-ui/app/components/CubeTreeComponent.js PRE-CREATION 
>   lens-ui/app/components/DatabaseComponent.js PRE-CREATION 
>   lens-ui/app/components/HeaderComponent.js PRE-CREATION 
>   lens-ui/app/components/LoaderComponent.js PRE-CREATION 
>   lens-ui/app/components/LoginComponent.js PRE-CREATION 
>   lens-ui/app/components/LogoutComponent.js PRE-CREATION 
>   lens-ui/app/components/QueryBoxComponent.js PRE-CREATION 
>   lens-ui/app/components/QueryDetailResultComponent.js PRE-CREATION 
>   lens-ui/app/components/QueryOperationsComponent.js PRE-CREATION 
>   lens-ui/app/components/QueryPreviewComponent.js PRE-CREATION 
>   lens-ui/app/components/QueryResultsComponent.js PRE-CREATION 
>   lens-ui/app/components/RequireAuthenticationComponent.js PRE-CREATION 
>   lens-ui/app/components/SidebarComponent.js PRE-CREATION 
>   lens-ui/app/components/TableSchemaComponent.js PRE-CREATION 
>   lens-ui/app/components/TableTreeComponent.js PRE-CREATION 
>   lens-ui/app/constants/AdhocQueryConstants.js PRE-CREATION 
>   lens-ui/app/constants/AppConstants.js PRE-CREATION 
>   lens-ui/app/dispatcher/AppDispatcher.js PRE-CREATION 
>   lens-ui/app/stores/AdhocQueryStore.js PRE-CREATION 
>   lens-ui/app/stores/CubeStore.js PRE-CREATION 
>   lens-ui/app/stores/DatabaseStore.js PRE-CREATION 
>   lens-ui/app/stores/TableStore.js PRE-CREATION 
>   lens-ui/app/stores/UserStore.js PRE-CREATION 
>   lens-ui/app/styles/css/global.css PRE-CREATION 
>   lens-ui/app/styles/css/login.css PRE-CREATION 
>   lens-ui/app/styles/css/query-component.css PRE-CREATION 
>   lens-ui/app/styles/css/tree.css PRE-CREATION 
>   lens-ui/app/styles/less/globals.less PRE-CREATION 
>   lens-ui/config.json PRE-CREATION 
>   lens-ui/index.html PRE-CREATION 
>   lens-ui/package.json PRE-CREATION 
>   lens-ui/pom.xml PRE-CREATION 
>   lens-ui/server.js PRE-CREATION 
>   lens-ui/webpack.config.js PRE-CREATION 
>   pom.xml adba544 
> 
> Diff: https://reviews.apache.org/r/37530/diff/
> 
> 
> Testing
> ---
> 
> No server code added/modified. Just JavaScript!
> 
> 
> File Attachments
> 
> 
> License details of NPM packages
>   
> https://reviews.apache.org/media/uploaded/files/2015/08/24/b4bb6d72-b98f-4f12-8bdb-3cea0544c94f__license-details.txt
> 
> 
> Thanks,
> 
> Ankeet Maini
> 
>



Re: Review Request 37530: LENS-629 - A new improved web client

2015-09-21 Thread Ankeet Maini

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

(Updated Sept. 21, 2015, 12:14 p.m.)


Review request for lens, Amareshwari Sriramadasu, Jaideep dhok, Rajat 
Khandelwal, sharad agarwal, and Yash Sharma.


Changes
---

1. POM versions mpoved to parent.
2. assets moved to target.


Bugs: LENS-629
https://issues.apache.org/jira/browse/LENS-629


Repository: lens


Description
---

LENS-629 - A new improved web client


Diffs (updated)
-

  .gitignore 5a356e0 
  lens-ui/LICENSE PRE-CREATION 
  lens-ui/README.markdown PRE-CREATION 
  lens-ui/app/actions/AdhocQueryActions.js PRE-CREATION 
  lens-ui/app/actions/LoginActions.js PRE-CREATION 
  lens-ui/app/adapters/AdhocQueryAdapter.js PRE-CREATION 
  lens-ui/app/adapters/AuthenticationAdapter.js PRE-CREATION 
  lens-ui/app/adapters/BaseAdapter.js PRE-CREATION 
  lens-ui/app/app.js PRE-CREATION 
  lens-ui/app/components/AboutComponent.js PRE-CREATION 
  lens-ui/app/components/AdhocQueryComponent.js PRE-CREATION 
  lens-ui/app/components/AppComponent.js PRE-CREATION 
  lens-ui/app/components/CubeSchemaComponent.js PRE-CREATION 
  lens-ui/app/components/CubeTreeComponent.js PRE-CREATION 
  lens-ui/app/components/DatabaseComponent.js PRE-CREATION 
  lens-ui/app/components/HeaderComponent.js PRE-CREATION 
  lens-ui/app/components/LoaderComponent.js PRE-CREATION 
  lens-ui/app/components/LoginComponent.js PRE-CREATION 
  lens-ui/app/components/LogoutComponent.js PRE-CREATION 
  lens-ui/app/components/QueryBoxComponent.js PRE-CREATION 
  lens-ui/app/components/QueryDetailResultComponent.js PRE-CREATION 
  lens-ui/app/components/QueryOperationsComponent.js PRE-CREATION 
  lens-ui/app/components/QueryPreviewComponent.js PRE-CREATION 
  lens-ui/app/components/QueryResultsComponent.js PRE-CREATION 
  lens-ui/app/components/RequireAuthenticationComponent.js PRE-CREATION 
  lens-ui/app/components/SidebarComponent.js PRE-CREATION 
  lens-ui/app/components/TableSchemaComponent.js PRE-CREATION 
  lens-ui/app/components/TableTreeComponent.js PRE-CREATION 
  lens-ui/app/constants/AdhocQueryConstants.js PRE-CREATION 
  lens-ui/app/constants/AppConstants.js PRE-CREATION 
  lens-ui/app/dispatcher/AppDispatcher.js PRE-CREATION 
  lens-ui/app/stores/AdhocQueryStore.js PRE-CREATION 
  lens-ui/app/stores/CubeStore.js PRE-CREATION 
  lens-ui/app/stores/DatabaseStore.js PRE-CREATION 
  lens-ui/app/stores/TableStore.js PRE-CREATION 
  lens-ui/app/stores/UserStore.js PRE-CREATION 
  lens-ui/app/styles/css/global.css PRE-CREATION 
  lens-ui/app/styles/css/login.css PRE-CREATION 
  lens-ui/app/styles/css/query-component.css PRE-CREATION 
  lens-ui/app/styles/css/tree.css PRE-CREATION 
  lens-ui/app/styles/less/globals.less PRE-CREATION 
  lens-ui/config.json PRE-CREATION 
  lens-ui/index.html PRE-CREATION 
  lens-ui/package.json PRE-CREATION 
  lens-ui/pom.xml PRE-CREATION 
  lens-ui/server.js PRE-CREATION 
  lens-ui/webpack.config.js PRE-CREATION 
  pom.xml adba544 

Diff: https://reviews.apache.org/r/37530/diff/


Testing
---

No server code added/modified. Just JavaScript!


File Attachments


License details of NPM packages
  
https://reviews.apache.org/media/uploaded/files/2015/08/24/b4bb6d72-b98f-4f12-8bdb-3cea0544c94f__license-details.txt


Thanks,

Ankeet Maini



[jira] [Commented] (LENS-776) Lens Server not Starting if there is a failure in creating "saved query" table

2015-09-21 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/LENS-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900400#comment-14900400
 ] 

Hudson commented on LENS-776:
-

SUCCESS: Integrated in Lens-Commit #1086 (See 
[https://builds.apache.org/job/Lens-Commit/1086/])
LENS-776 : Lens Server not Starting if there is a failure in creating saved 
query table (arshadmatin: rev b72c76041238bb44c6506610417104edeb974035)
* lens-server/src/main/resources/lensserver-default.xml


> Lens Server not Starting if there is a failure in creating "saved query" table
> --
>
> Key: LENS-776
> URL: https://issues.apache.org/jira/browse/LENS-776
> Project: Apache Lens
>  Issue Type: Bug
>Reporter: Arshad Matin
>Assignee: Amruth S
> Attachments: LENS-776.patch
>
>
> This is coming with the default config and i was using MySql db
> {noformat}
> 
>lens.server.savedquery.jdbc.dialectclass
>org.apache.lens.server.query.save.SavedQueryDao$HSQLDialect
>Dialect of the target DB, Default is HSQL. Override with the 
> target DB used.
>  
> {noformat}
> Even with HSQL, saved_query table creation failure shouldnt stop lens server 
> from coming up.
> Exception
> {noformat}
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] ERROR 
> org.apache.lens.server.LensServer - Error while creating Lens server
> java.lang.RuntimeException: Cannot initialize saved query service
> at 
> org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:69)
>  ~[classes/:na]
> at 
> org.apache.hive.service.CompositeService.init(CompositeService.java:59) 
> ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.lens.server.LensServices.init(LensServices.java:235) 
> ~[classes/:na]
> at 
> org.apache.lens.server.LensServer.startServices(LensServer.java:135) 
> ~[classes/:na]
> at org.apache.lens.server.LensServer.(LensServer.java:85) 
> ~[classes/:na]
> at 
> org.apache.lens.server.LensServer.createLensServer(LensServer.java:74) 
> ~[classes/:na]
> at org.apache.lens.server.LensServer.main(LensServer.java:191) 
> ~[classes/:na]
> Caused by: org.apache.lens.server.api.error.LensException: Error initializing 
> saved query dao
> at 
> org.apache.lens.server.query.save.SavedQueryDao.(SavedQueryDao.java:72) 
> ~[classes/:na]
> at 
> org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:64)
>  ~[classes/:na]
> ... 6 common frames omitted
> Caused by: org.apache.lens.server.api.error.LensException: Cannot create 
> saved query table!
> at 
> org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:85)
>  ~[classes/:na]
> at 
> org.apache.lens.server.query.save.SavedQueryDao.(SavedQueryDao.java:70) 
> ~[classes/:na]
> ... 7 common frames omitted
> Caused by: java.sql.SQLException: You have an error in your SQL syntax; check 
> the manual that corresponds to your MySQL server version for the right syntax 
> to use near 'GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), 
> description var' at line 1 Query: CREATE TABLE if not exists saved_query  (id 
> int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), 
> description varchar(255), query varchar(255), params_json varchar(255), 
> created_at timestamp, updated_at timestamp) Parameters: []
> at 
> org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:363)
>  ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:490) 
> ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:420) 
> ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:83)
>  ~[classes/:na]
> ... 8 common frames omitted
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.lens.server.LensServices - Stopping lens server
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.lens.server.LensServices - Server restart is not enabled. Not 
> persisting the server state
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.hive.service.CompositeService - Error stopping query
> java.lang.NullPointerException: null
> at 
> org.apache.lens.server.query.QueryExecutionServiceImpl.stop(QueryExecutionServiceImpl.java:1129)
>  ~[classes/:na]
> at 
> org.apache.hive.service.CompositeService.stop(CompositeService.java:102) 
> [hive-service-0.13.3-inm.jar:0.13.3-inm]
> at 
> 

[jira] [Updated] (LENS-776) Lens Server not Starting if there is a failure in creating "saved query" table

2015-09-21 Thread Arshad Matin (JIRA)

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

Arshad Matin updated LENS-776:
--
Resolution: Fixed
Status: Resolved  (was: Patch Available)

> Lens Server not Starting if there is a failure in creating "saved query" table
> --
>
> Key: LENS-776
> URL: https://issues.apache.org/jira/browse/LENS-776
> Project: Apache Lens
>  Issue Type: Bug
>Reporter: Arshad Matin
>Assignee: Amruth S
> Attachments: LENS-776.patch
>
>
> This is coming with the default config and i was using MySql db
> {noformat}
> 
>lens.server.savedquery.jdbc.dialectclass
>org.apache.lens.server.query.save.SavedQueryDao$HSQLDialect
>Dialect of the target DB, Default is HSQL. Override with the 
> target DB used.
>  
> {noformat}
> Even with HSQL, saved_query table creation failure shouldnt stop lens server 
> from coming up.
> Exception
> {noformat}
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] ERROR 
> org.apache.lens.server.LensServer - Error while creating Lens server
> java.lang.RuntimeException: Cannot initialize saved query service
> at 
> org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:69)
>  ~[classes/:na]
> at 
> org.apache.hive.service.CompositeService.init(CompositeService.java:59) 
> ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.lens.server.LensServices.init(LensServices.java:235) 
> ~[classes/:na]
> at 
> org.apache.lens.server.LensServer.startServices(LensServer.java:135) 
> ~[classes/:na]
> at org.apache.lens.server.LensServer.(LensServer.java:85) 
> ~[classes/:na]
> at 
> org.apache.lens.server.LensServer.createLensServer(LensServer.java:74) 
> ~[classes/:na]
> at org.apache.lens.server.LensServer.main(LensServer.java:191) 
> ~[classes/:na]
> Caused by: org.apache.lens.server.api.error.LensException: Error initializing 
> saved query dao
> at 
> org.apache.lens.server.query.save.SavedQueryDao.(SavedQueryDao.java:72) 
> ~[classes/:na]
> at 
> org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:64)
>  ~[classes/:na]
> ... 6 common frames omitted
> Caused by: org.apache.lens.server.api.error.LensException: Cannot create 
> saved query table!
> at 
> org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:85)
>  ~[classes/:na]
> at 
> org.apache.lens.server.query.save.SavedQueryDao.(SavedQueryDao.java:70) 
> ~[classes/:na]
> ... 7 common frames omitted
> Caused by: java.sql.SQLException: You have an error in your SQL syntax; check 
> the manual that corresponds to your MySQL server version for the right syntax 
> to use near 'GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), 
> description var' at line 1 Query: CREATE TABLE if not exists saved_query  (id 
> int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), 
> description varchar(255), query varchar(255), params_json varchar(255), 
> created_at timestamp, updated_at timestamp) Parameters: []
> at 
> org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:363)
>  ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:490) 
> ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:420) 
> ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:83)
>  ~[classes/:na]
> ... 8 common frames omitted
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.lens.server.LensServices - Stopping lens server
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.lens.server.LensServices - Server restart is not enabled. Not 
> persisting the server state
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.hive.service.CompositeService - Error stopping query
> java.lang.NullPointerException: null
> at 
> org.apache.lens.server.query.QueryExecutionServiceImpl.stop(QueryExecutionServiceImpl.java:1129)
>  ~[classes/:na]
> at 
> org.apache.hive.service.CompositeService.stop(CompositeService.java:102) 
> [hive-service-0.13.3-inm.jar:0.13.3-inm]
> at 
> org.apache.hive.service.CompositeService.stop(CompositeService.java:92) 
> [hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.lens.server.LensServices.stop(LensServices.java:402) 
> [classes/:na]
> at org.apache.lens.server.LensServer.main(LensServer.java:201) 
> [classes/:na]
> 16 Sep 2015 

[jira] [Commented] (LENS-776) Lens Server not Starting if there is a failure in creating "saved query" table

2015-09-21 Thread Arshad Matin (JIRA)

[ 
https://issues.apache.org/jira/browse/LENS-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900414#comment-14900414
 ] 

Arshad Matin commented on LENS-776:
---

Thanks [~amrk7]

> Lens Server not Starting if there is a failure in creating "saved query" table
> --
>
> Key: LENS-776
> URL: https://issues.apache.org/jira/browse/LENS-776
> Project: Apache Lens
>  Issue Type: Bug
>Reporter: Arshad Matin
>Assignee: Amruth S
> Attachments: LENS-776.patch
>
>
> This is coming with the default config and i was using MySql db
> {noformat}
> 
>lens.server.savedquery.jdbc.dialectclass
>org.apache.lens.server.query.save.SavedQueryDao$HSQLDialect
>Dialect of the target DB, Default is HSQL. Override with the 
> target DB used.
>  
> {noformat}
> Even with HSQL, saved_query table creation failure shouldnt stop lens server 
> from coming up.
> Exception
> {noformat}
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] ERROR 
> org.apache.lens.server.LensServer - Error while creating Lens server
> java.lang.RuntimeException: Cannot initialize saved query service
> at 
> org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:69)
>  ~[classes/:na]
> at 
> org.apache.hive.service.CompositeService.init(CompositeService.java:59) 
> ~[hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.lens.server.LensServices.init(LensServices.java:235) 
> ~[classes/:na]
> at 
> org.apache.lens.server.LensServer.startServices(LensServer.java:135) 
> ~[classes/:na]
> at org.apache.lens.server.LensServer.(LensServer.java:85) 
> ~[classes/:na]
> at 
> org.apache.lens.server.LensServer.createLensServer(LensServer.java:74) 
> ~[classes/:na]
> at org.apache.lens.server.LensServer.main(LensServer.java:191) 
> ~[classes/:na]
> Caused by: org.apache.lens.server.api.error.LensException: Error initializing 
> saved query dao
> at 
> org.apache.lens.server.query.save.SavedQueryDao.(SavedQueryDao.java:72) 
> ~[classes/:na]
> at 
> org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:64)
>  ~[classes/:na]
> ... 6 common frames omitted
> Caused by: org.apache.lens.server.api.error.LensException: Cannot create 
> saved query table!
> at 
> org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:85)
>  ~[classes/:na]
> at 
> org.apache.lens.server.query.save.SavedQueryDao.(SavedQueryDao.java:70) 
> ~[classes/:na]
> ... 7 common frames omitted
> Caused by: java.sql.SQLException: You have an error in your SQL syntax; check 
> the manual that corresponds to your MySQL server version for the right syntax 
> to use near 'GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), 
> description var' at line 1 Query: CREATE TABLE if not exists saved_query  (id 
> int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), 
> description varchar(255), query varchar(255), params_json varchar(255), 
> created_at timestamp, updated_at timestamp) Parameters: []
> at 
> org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:363)
>  ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:490) 
> ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:420) 
> ~[commons-dbutils-1.5.jar:1.5]
> at 
> org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:83)
>  ~[classes/:na]
> ... 8 common frames omitted
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.lens.server.LensServices - Stopping lens server
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.lens.server.LensServices - Server restart is not enabled. Not 
> persisting the server state
> 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO  
> org.apache.hive.service.CompositeService - Error stopping query
> java.lang.NullPointerException: null
> at 
> org.apache.lens.server.query.QueryExecutionServiceImpl.stop(QueryExecutionServiceImpl.java:1129)
>  ~[classes/:na]
> at 
> org.apache.hive.service.CompositeService.stop(CompositeService.java:102) 
> [hive-service-0.13.3-inm.jar:0.13.3-inm]
> at 
> org.apache.hive.service.CompositeService.stop(CompositeService.java:92) 
> [hive-service-0.13.3-inm.jar:0.13.3-inm]
> at org.apache.lens.server.LensServices.stop(LensServices.java:402) 
> [classes/:na]
> at org.apache.lens.server.LensServer.main(LensServer.java:201) 
> [classes/:na]
> 16 Sep 2015 08:17:34