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

(Updated May 21, 2015, 8:48 p.m.)


Review request for lens.


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


Repository: lens


Description
-------

option to download result into a file


Diffs (updated)
-----

  checkstyle/src/main/resources/checkstyle.xml 
236f977f58f41cd3fee2ebe8445f38dd4a1f0d3b 
  lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java 
8707fec5612a04e9a07ed9d5e38f342ef1f9114e 
  lens-cli/src/main/java/org/apache/lens/cli/commands/LensCRUDCommand.java 
05922e394e5fea9e95e67d56d04697ebf438f48d 
  
lens-cli/src/main/java/org/apache/lens/cli/commands/LensCRUDStoragePartitionCommand.java
 0d53e2107be116d4dbb855f247b57be0c1b97691 
  lens-cli/src/main/java/org/apache/lens/cli/commands/LensQueryCommands.java 
64e9ca47c5c7df444cdd16b2d55bc738d6c945bc 
  lens-cli/src/test/java/org/apache/lens/cli/TestLensQueryCommands.java 
d7b63724f50dc392a5440ce8362b4eb6ca81f885 
  lens-cli/src/test/java/org/apache/lens/cli/doc/TestGenerateCLIUserDoc.java 
e5fe067bd5464d4821d2ba72cf71cc24f178e157 
  lens-client/src/main/java/org/apache/lens/client/LensClient.java 
9b0c93518be5cd75fe34199237f44d737283fa14 
  lens-client/src/main/java/org/apache/lens/client/LensStatement.java 
5ce3a82926ed2bad6f29300d24a18b4cadbe0e4b 
  lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java 
43985bad1571e6899679551674cea76e6196e8f8 
  
lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveInMemoryResultSet.java
 a953ec6a2117fa48e0a2ced4daa1f8d8d4e15731 
  lens-driver-jdbc/src/main/java/org/apache/lens/driver/jdbc/JDBCResultSet.java 
36a48b9ea48eb89780f5c98dc396ae5f176d1bd4 
  
lens-server-api/src/main/java/org/apache/lens/server/api/driver/InMemoryResultSet.java
 f11d8834d4010a1e7c616c6c3dd5ff90a6c577c5 
  
lens-server-api/src/test/java/org/apache/lens/server/api/driver/MockDriver.java 
0f4e990512beab0fdb0b8e51c08b165e97494a9b 
  
lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
 343cd01b1fdce7ab76b0ca93c5ebbb91e807be94 
  src/site/apt/user/cli.apt 8efb58bf79d3a370bb7c2e906e2ff9f9db25ca86 

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


Testing
-------

Tests with lens persistence:

lens-shell>
lens-shell>
lens-shell>set lens.query.enable.persistent.resultset=true
Set param succeeded
lens-shell>set lens.query.enable.persistent.resultset.indriver=false
Set param succeeded
lens-shell>query execute cube select customer_city_name, store_cost from sales 
where time_range_in(delivery_time, '2015-04-13-04', '2015-04-13-05') --async 
true
751e983d-5a15-411b-948a-724ddaf26084
lens-shell>
lens-shell>query results 751e983d-5a15-411b-948a-724ddaf26084
Result set metadata can be only queries for successful queries
lens-shell>query results 751e983d-5a15-411b-948a-724ddaf26084
customer_city.name    _c1
Results of query stored at : 
file:/tmp/lensreports/751e983d-5a15-411b-948a-724ddaf26084.csv 2 rows process 
in (15) seconds.

lens-shell>query results 751e983d-5a15-411b-948a-724ddaf26084 --save_location ~/
Saved to /Users/rajat.khandelwal/751e983d-5a15-411b-948a-724ddaf26084.csv
lens-shell>! cat 
/Users/rajat.khandelwal/751e983d-5a15-411b-948a-724ddaf26084.csv
command is:cat /Users/rajat.khandelwal/751e983d-5a15-411b-948a-724ddaf26084.csv
"Bangalore","0.0"
"Hyderabad","2.0"
lens-shell>


Tests with driver persistence:

lens-shell>set lens.query.enable.persistent.resultset.indriver=true
Set param succeeded
lens-shell>set lens.query.enable.persistent.resultset=false
Set param succeeded
lens-shell>query execute cube select customer_city_name, store_cost from sales 
where time_range_in(delivery_time, '2015-04-13-04', '2015-04-13-05') --async 
true
d022efaa-ff96-4252-a3c6-2f1d43c30730
lens-shell>
lens-shell>query results d022efaa-ff96-4252-a3c6-2f1d43c30730 --save_location ~/
Can't download the result because it's available in driver's persistence.
customer_city.name    _c1
Results of query stored at : 
file:/tmp/lensreports/hdfsout/d022efaa-ff96-4252-a3c6-2f1d43c30730 -1 rows 
process in (11) seconds.

lens-shell>! ls /tmp/lensreports/hdfsout/d022efaa-ff96-4252-a3c6-2f1d43c30730
command is:ls /tmp/lensreports/hdfsout/d022efaa-ff96-4252-a3c6-2f1d43c30730
000000_0
lens-shell>! cat 
/tmp/lensreports/hdfsout/d022efaa-ff96-4252-a3c6-2f1d43c30730/000000_0
command is:cat 
/tmp/lensreports/hdfsout/d022efaa-ff96-4252-a3c6-2f1d43c30730/000000_0
Bangalore0.0
Hyderabad2.0
lens-shell>


With results in driver's memory, the tests have already been added to 
TestLensQueryCommands.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Lens Checkstyle Rules ............................. SUCCESS [2.607s]
[INFO] Lens .............................................. SUCCESS [2.908s]
[INFO] Lens API .......................................... SUCCESS [20.365s]
[INFO] Lens API for server and extensions ................ SUCCESS [22.631s]
[INFO] Lens Cube ......................................... SUCCESS [3:20.968s]
[INFO] Lens DB storage ................................... SUCCESS [20.816s]
[INFO] Lens Query Library ................................ SUCCESS [17.466s]
[INFO] Lens Hive Driver .................................. SUCCESS [2:54.960s]
[INFO] Lens Driver for JDBC .............................. SUCCESS [36.275s]
[INFO] Lens Server ....................................... SUCCESS [5:32.284s]
[INFO] Lens client ....................................... SUCCESS [36.321s]
[INFO] Lens CLI .......................................... SUCCESS [3:20.782s]
[INFO] Lens Examples ..................................... SUCCESS [11.419s]
[INFO] Lens Distribution ................................. SUCCESS [7.824s]
[INFO] Lens ML Lib ....................................... SUCCESS [1:20.895s]
[INFO] Lens ML Ext Distribution .......................... SUCCESS [1.696s]
[INFO] Lens Regression ................................... SUCCESS [7.494s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19:38.747s
[INFO] Finished at: Thu May 21 14:54:54 UTC 2015
[INFO] Final Memory: 165M/1264M
[INFO] ------------------------------------------------------------------------


Thanks,

Rajat Khandelwal

Reply via email to