Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-04-11 Thread Szabolcs Vasas

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



Hi László,

Thank you for adding a test case, I have left one comment on it?
Do you plan to add another test case for the change in DBOutputFormat? I think 
it could be pretty easily added after applying an extract method refactoring.


src/test/org/apache/sqoop/manager/TestOracleManager.java
Lines 70 (patched)


This test can pass when SQLException is not thrown so it can give a false 
green sign. I suggest using ExpectedException rule here.


- Szabolcs Vasas


On April 6, 2018, 1:26 p.m., Laszlo Bodor wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66353/
> ---
> 
> (Updated April 6, 2018, 1:26 p.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3306
> https://issues.apache.org/jira/browse/SQOOP-3306
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> A fortify scan showed 2 possible resource leaks.
> 
> 1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
> release a database resource allocated by getConnection() on line 117.
> In the file DBOutputFormat.java similar issues were on line numbers 117
> 
> 2: The function makeConnection() in OracleManager.java sometimes fails to 
> release a database resource allocated by getConnection() on line 321.
> In the file OracleManager.java similar issues were on line numbers 321
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
>   src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
>   src/test/org/apache/sqoop/manager/TestOracleManager.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66353/diff/2/
> 
> 
> Testing
> ---
> 
> ant test
> 
> 
> Thanks,
> 
> Laszlo Bodor
> 
>



Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-04-06 Thread Laszlo Bodor

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

(Updated April 6, 2018, 1:26 p.m.)


Review request for Sqoop.


Changes
---

test case for oracle manager
formatting


Bugs: SQOOP-3306
https://issues.apache.org/jira/browse/SQOOP-3306


Repository: sqoop-trunk


Description
---

A fortify scan showed 2 possible resource leaks.

1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
release a database resource allocated by getConnection() on line 117.
In the file DBOutputFormat.java similar issues were on line numbers 117

2: The function makeConnection() in OracleManager.java sometimes fails to 
release a database resource allocated by getConnection() on line 321.
In the file OracleManager.java similar issues were on line numbers 321


Diffs (updated)
-

  src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
  src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
  src/test/org/apache/sqoop/manager/TestOracleManager.java PRE-CREATION 


Diff: https://reviews.apache.org/r/66353/diff/2/

Changes: https://reviews.apache.org/r/66353/diff/1-2/


Testing
---

ant test


Thanks,

Laszlo Bodor



Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-04-03 Thread Laszlo Bodor


> On March 29, 2018, 9:32 a.m., Fero Szabo wrote:
> > src/java/org/apache/sqoop/manager/OracleManager.java
> > Lines 334-336 (patched)
> > 
> >
> > You probably missed some spaces here :)
> 
> Fero Szabo wrote:
> oops, the patch itself doesn't apply. (with git apply) Only with patch 
> -p0...
> What command did you use to generate it?

I've created the diff with --no-prefix, it's not suitable in this project, next 
time I'll generate with prefixes.


- Laszlo


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


On March 29, 2018, 9:10 a.m., Laszlo Bodor wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66353/
> ---
> 
> (Updated March 29, 2018, 9:10 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3306
> https://issues.apache.org/jira/browse/SQOOP-3306
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> A fortify scan showed 2 possible resource leaks.
> 
> 1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
> release a database resource allocated by getConnection() on line 117.
> In the file DBOutputFormat.java similar issues were on line numbers 117
> 
> 2: The function makeConnection() in OracleManager.java sometimes fails to 
> release a database resource allocated by getConnection() on line 321.
> In the file OracleManager.java similar issues were on line numbers 321
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
>   src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
> 
> 
> Diff: https://reviews.apache.org/r/66353/diff/1/
> 
> 
> Testing
> ---
> 
> ant test
> 
> 
> Thanks,
> 
> Laszlo Bodor
> 
>



Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-04-03 Thread Laszlo Bodor


> On April 3, 2018, 9:13 a.m., Szabolcs Vasas wrote:
> > Hi László,
> > 
> > Thank you for submitting this improvement, it is a nice catch!
> > It looks good to me however it would be great if you could create a couple 
> > of unit test cases to cover the code you have added.
> > 
> > Thanks,
> > Szabolcs

I'll take care of it.


- Laszlo


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


On March 29, 2018, 9:10 a.m., Laszlo Bodor wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66353/
> ---
> 
> (Updated March 29, 2018, 9:10 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3306
> https://issues.apache.org/jira/browse/SQOOP-3306
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> A fortify scan showed 2 possible resource leaks.
> 
> 1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
> release a database resource allocated by getConnection() on line 117.
> In the file DBOutputFormat.java similar issues were on line numbers 117
> 
> 2: The function makeConnection() in OracleManager.java sometimes fails to 
> release a database resource allocated by getConnection() on line 321.
> In the file OracleManager.java similar issues were on line numbers 321
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
>   src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
> 
> 
> Diff: https://reviews.apache.org/r/66353/diff/1/
> 
> 
> Testing
> ---
> 
> ant test
> 
> 
> Thanks,
> 
> Laszlo Bodor
> 
>



Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-04-03 Thread Szabolcs Vasas

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



Hi László,

Thank you for submitting this improvement, it is a nice catch!
It looks good to me however it would be great if you could create a couple of 
unit test cases to cover the code you have added.

Thanks,
Szabolcs

- Szabolcs Vasas


On March 29, 2018, 9:10 a.m., Laszlo Bodor wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66353/
> ---
> 
> (Updated March 29, 2018, 9:10 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3306
> https://issues.apache.org/jira/browse/SQOOP-3306
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> A fortify scan showed 2 possible resource leaks.
> 
> 1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
> release a database resource allocated by getConnection() on line 117.
> In the file DBOutputFormat.java similar issues were on line numbers 117
> 
> 2: The function makeConnection() in OracleManager.java sometimes fails to 
> release a database resource allocated by getConnection() on line 321.
> In the file OracleManager.java similar issues were on line numbers 321
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
>   src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
> 
> 
> Diff: https://reviews.apache.org/r/66353/diff/1/
> 
> 
> Testing
> ---
> 
> ant test
> 
> 
> Thanks,
> 
> Laszlo Bodor
> 
>



Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-03-29 Thread Fero Szabo via Review Board


> On March 29, 2018, 9:32 a.m., Fero Szabo wrote:
> > src/java/org/apache/sqoop/manager/OracleManager.java
> > Lines 334-336 (patched)
> > 
> >
> > You probably missed some spaces here :)

oops, the patch itself doesn't apply. (with git apply) Only with patch -p0...
What command did you use to generate it?


- Fero


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


On March 29, 2018, 9:10 a.m., Laszlo Bodor wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66353/
> ---
> 
> (Updated March 29, 2018, 9:10 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3306
> https://issues.apache.org/jira/browse/SQOOP-3306
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> A fortify scan showed 2 possible resource leaks.
> 
> 1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
> release a database resource allocated by getConnection() on line 117.
> In the file DBOutputFormat.java similar issues were on line numbers 117
> 
> 2: The function makeConnection() in OracleManager.java sometimes fails to 
> release a database resource allocated by getConnection() on line 321.
> In the file OracleManager.java similar issues were on line numbers 321
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
>   src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
> 
> 
> Diff: https://reviews.apache.org/r/66353/diff/1/
> 
> 
> Testing
> ---
> 
> ant test
> 
> 
> Thanks,
> 
> Laszlo Bodor
> 
>



Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-03-29 Thread Fero Szabo via Review Board

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


Ship it!




Good catch! Lgtm!


src/java/org/apache/sqoop/manager/OracleManager.java
Lines 334-336 (patched)


You probably missed some spaces here :)


- Fero Szabo


On March 29, 2018, 9:10 a.m., Laszlo Bodor wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66353/
> ---
> 
> (Updated March 29, 2018, 9:10 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3306
> https://issues.apache.org/jira/browse/SQOOP-3306
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> A fortify scan showed 2 possible resource leaks.
> 
> 1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
> release a database resource allocated by getConnection() on line 117.
> In the file DBOutputFormat.java similar issues were on line numbers 117
> 
> 2: The function makeConnection() in OracleManager.java sometimes fails to 
> release a database resource allocated by getConnection() on line 321.
> In the file OracleManager.java similar issues were on line numbers 321
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
>   src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
> 
> 
> Diff: https://reviews.apache.org/r/66353/diff/1/
> 
> 
> Testing
> ---
> 
> ant test
> 
> 
> Thanks,
> 
> Laszlo Bodor
> 
>



Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager

2018-03-29 Thread Laszlo Bodor

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

Review request for Sqoop.


Bugs: SQOOP-3306
https://issues.apache.org/jira/browse/SQOOP-3306


Repository: sqoop-trunk


Description
---

A fortify scan showed 2 possible resource leaks.

1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to 
release a database resource allocated by getConnection() on line 117.
In the file DBOutputFormat.java similar issues were on line numbers 117

2: The function makeConnection() in OracleManager.java sometimes fails to 
release a database resource allocated by getConnection() on line 321.
In the file OracleManager.java similar issues were on line numbers 321


Diffs
-

  src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
  src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 


Diff: https://reviews.apache.org/r/66353/diff/1/


Testing
---

ant test


Thanks,

Laszlo Bodor