You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by Deepak Barr <de...@gmail.com> on 2015/09/16 14:26:22 UTC

Review Request 38430: LENS-775 : NPE on closing HadoopFileFormatter

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

Review request for lens.


Repository: lens


Description
-------

In HadoopFileFormatter, If rowWriter intialization fails because of,say, HDFS permission issue. The close() method (called in finally block in ResultFormatter class) throws an NPE.
To fix, I have put a check if rowWriter is null before closing it.


Diffs
-----

  lens-query-lib/src/main/java/org/apache/lens/lib/query/HadoopFileFormatter.java 87aff69 

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


Testing
-------

Yes.

[INFO] Reactor Summary:
[INFO]
[INFO] Lens Checkstyle Rules .............................. SUCCESS [  2.830 s]
[INFO] Lens ............................................... SUCCESS [  5.014 s]
[INFO] Lens API ........................................... SUCCESS [ 29.349 s]
[INFO] Lens API for server and extensions ................. SUCCESS [ 26.068 s]
[INFO] Lens Cube .......................................... SUCCESS [06:54 min]
[INFO] Lens DB storage .................................... SUCCESS [ 28.235 s]
[INFO] Lens Query Library ................................. SUCCESS [ 21.328 s]
[INFO] Lens Hive Driver ................................... SUCCESS [04:20 min]
[INFO] Lens Driver for JDBC ............................... SUCCESS [ 50.364 s]
[INFO] Lens Elastic Search Driver ......................... SUCCESS [ 20.910 s]
[INFO] Lens Server ........................................ SUCCESS [08:12 min]
[INFO] Lens client ........................................ SUCCESS [ 47.436 s]
[INFO] Lens CLI ........................................... SUCCESS [03:44 min]
[INFO] Lens Examples ...................................... SUCCESS [ 12.260 s]
[INFO] Lens Distribution .................................. SUCCESS [ 11.153 s]
[INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
[INFO] Lens ML Ext Distribution ........................... SUCCESS [  2.752 s]
[INFO] Lens Regression .................................... SUCCESS [ 13.904 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29:51 min
[INFO] Finished at: 2015-09-16T13:51:11+05:30
[INFO] Final Memory: 227M/3018M
[INFO] ------------------------------------------------------------------------


Thanks,

Deepak Barr


Re: Review Request 38430: LENS-775 : NPE on closing HadoopFileFormatter

Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38430/#review99212
-----------------------------------------------------------

Ship it!


Ship It!

- Amareshwari Sriramadasu


On Sept. 16, 2015, 12:26 p.m., Deepak Barr wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38430/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2015, 12:26 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> In HadoopFileFormatter, If rowWriter intialization fails because of,say, HDFS permission issue. The close() method (called in finally block in ResultFormatter class) throws an NPE.
> To fix, I have put a check if rowWriter is null before closing it.
> 
> 
> Diffs
> -----
> 
>   lens-query-lib/src/main/java/org/apache/lens/lib/query/HadoopFileFormatter.java 87aff69 
> 
> Diff: https://reviews.apache.org/r/38430/diff/
> 
> 
> Testing
> -------
> 
> Yes.
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules .............................. SUCCESS [  2.830 s]
> [INFO] Lens ............................................... SUCCESS [  5.014 s]
> [INFO] Lens API ........................................... SUCCESS [ 29.349 s]
> [INFO] Lens API for server and extensions ................. SUCCESS [ 26.068 s]
> [INFO] Lens Cube .......................................... SUCCESS [06:54 min]
> [INFO] Lens DB storage .................................... SUCCESS [ 28.235 s]
> [INFO] Lens Query Library ................................. SUCCESS [ 21.328 s]
> [INFO] Lens Hive Driver ................................... SUCCESS [04:20 min]
> [INFO] Lens Driver for JDBC ............................... SUCCESS [ 50.364 s]
> [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 20.910 s]
> [INFO] Lens Server ........................................ SUCCESS [08:12 min]
> [INFO] Lens client ........................................ SUCCESS [ 47.436 s]
> [INFO] Lens CLI ........................................... SUCCESS [03:44 min]
> [INFO] Lens Examples ...................................... SUCCESS [ 12.260 s]
> [INFO] Lens Distribution .................................. SUCCESS [ 11.153 s]
> [INFO] Lens ML Lib ........................................ SUCCESS [02:05 min]
> [INFO] Lens ML Ext Distribution ........................... SUCCESS [  2.752 s]
> [INFO] Lens Regression .................................... SUCCESS [ 13.904 s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 29:51 min
> [INFO] Finished at: 2015-09-16T13:51:11+05:30
> [INFO] Final Memory: 227M/3018M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Deepak Barr
> 
>