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

Review request for lens.


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


Repository: lens


Description
-------

The bug is because of LensSessionImpl.getDBResources() is returning 
failedDBResources instead of actual resources.

Changes include :
- Removed failedDBResources from LensSessionImpl - which is not solving the 
purpose. Once resource addition has failed, it would fail in subsequent tries 
as well. 
- Instead of adding resouces to HiveDriver on every execute/explain/prepare and 
etc, adding resources on DriverSessionStarted event - synchronously. This will 
make sure resources are added whenever new session is created and the 
classloader will be uptodate in all cases. For ex: Query on a native table 
fails in estimate with earlier code, because jars are not added and HiveDriver 
will do explain on the query. 
- Book-keeping in LensSessionImpl is only used in tests and all source code 
usages are removed.
- Removed book-keeping in HiveDriver which is maintaining whether resources are 
added for a session or not.


Diffs
-----

  lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 
1326611 
  
lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
 84dcecd 
  lens-server/src/main/java/org/apache/lens/server/session/LensSessionImpl.java 
3003ab7 
  lens-server/src/test/java/org/apache/lens/server/LensServerTestUtil.java 
67cee57 
  lens-server/src/test/java/org/apache/lens/server/TestServerRestart.java 
20aa8cb 
  
lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java
 61bc133 
  lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java 
9f40a01 

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


Testing
-------

Added regression test which fails with ClassNotFoundException without the 
changes.


Thanks,

Amareshwari Sriramadasu

Reply via email to