You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by Frédéric Escandell <ed...@gmail.com> on 2017/01/01 20:33:28 UTC

Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

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

Review request for Sqoop.


Repository: sqoop-trunk


Description
-------

SQOOP-3096


Diffs
-----

  src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
  src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 

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


Testing
-------

Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line


Thanks,

Fr�d�ric Escandell


Re: Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

Posted by Frédéric Escandell <ed...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55079/#review160733
-----------------------------------------------------------




src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java (line 81)
<https://reviews.apache.org/r/55079/#comment231930>

    It should be done.



src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java (line 83)
<https://reviews.apache.org/r/55079/#comment231935>

    Before my change the table name wasn't escaped here. The adding of the schema  don't force us to add the escaping mechanism.
    The escaping meachnism is not mandatory for Netezza request.


- Fr�d�ric Escandell


On jan. 1, 2017, 8:33 apr�s-midi, Fr�d�ric Escandell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55079/
> -----------------------------------------------------------
> 
> (Updated jan. 1, 2017, 8:33 apr�s-midi)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> SQOOP-3096
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
>   src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 
> 
> Diff: https://reviews.apache.org/r/55079/diff/
> 
> 
> Testing
> -------
> 
> Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line
> 
> 
> Thanks,
> 
> Fr�d�ric Escandell
> 
>


Re: Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

Posted by Frédéric Escandell <ed...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55079/
-----------------------------------------------------------

(Updated jan. 6, 2017, 6:47 apr�s-midi)


Review request for Sqoop.


Changes
-------

Taking into account the comments of the review


Repository: sqoop-trunk


Description
-------

SQOOP-3096


Diffs (updated)
-----

  src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
  src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 

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


Testing
-------

Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line


Thanks,

Fr�d�ric Escandell


Re: Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

Posted by Frédéric Escandell <ed...@gmail.com>.

> On jan. 2, 2017, 2:55 apr�s-midi, Erzsebet Szilagyi wrote:
> > src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java, line 83
> > <https://reviews.apache.org/r/55079/diff/1/?file=1593057#file1593057line83>
> >
> >     You have implemented a new escaping mechanism escapeTableName. Are you sure escaping is not needed here too?

Before my change the table name wasn't escaped here. The adding of the schema  don't force us to add the escaping mechanism.
The escaping meachnism is not mandatory for Netezza request.


- Fr�d�ric


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


On jan. 1, 2017, 8:33 apr�s-midi, Fr�d�ric Escandell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55079/
> -----------------------------------------------------------
> 
> (Updated jan. 1, 2017, 8:33 apr�s-midi)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> SQOOP-3096
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
>   src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 
> 
> Diff: https://reviews.apache.org/r/55079/diff/
> 
> 
> Testing
> -------
> 
> Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line
> 
> 
> Thanks,
> 
> Fr�d�ric Escandell
> 
>


Re: Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

Posted by Boglarka Egyed <eg...@gmail.com>.

On Jan. 2, 2017, 2:55 p.m., Fr�d�ric Escandell wrote:
> > I'm also curious if you've considered adding schema support at a higher level, e.g. Import instead of Direct Import or even just for Netezza in general, as schemas can be used for exports as well?
> > 
> > Have you considered adding some tests? I understand that we currently don't have tests for Netezza direct import, but there is a DirectNetezzaExportManualTest for direct export and also NetezzaImportManualTest for testing import.
> > We should always strive for increasing testing coverage.
> > 
> > Thank you,
> > Liz

+1 for considering to add the schema support at a higher level.


- Boglarka


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


On Jan. 1, 2017, 8:33 p.m., Fr�d�ric Escandell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55079/
> -----------------------------------------------------------
> 
> (Updated Jan. 1, 2017, 8:33 p.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> SQOOP-3096
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
>   src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 
> 
> Diff: https://reviews.apache.org/r/55079/diff/
> 
> 
> Testing
> -------
> 
> Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line
> 
> 
> Thanks,
> 
> Fr�d�ric Escandell
> 
>


Re: Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

Posted by Erzsebet Szilagyi <er...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55079/#review160323
-----------------------------------------------------------



Hi Fred,
I've got some comments regarding formatting and one question about escaping.


src/java/org/apache/sqoop/manager/DirectNetezzaManager.java (lines 300 - 301)
<https://reviews.apache.org/r/55079/#comment231476>

    "Please use two space indents, and space instead of tabs." (https://cwiki.apache.org/confluence/display/SQOOP/How+to+Contribute/#HowtoContribute-ProvidingPatches)



src/java/org/apache/sqoop/manager/DirectNetezzaManager.java (line 311)
<https://reviews.apache.org/r/55079/#comment231471>

    Please make sure you remove unnecessary white spaces.
    You can easily spot them here in the Review Board with checking the "View Diff" view where they show up with red highlighting.



src/java/org/apache/sqoop/manager/DirectNetezzaManager.java (line 330)
<https://reviews.apache.org/r/55079/#comment231472>

    I know this whitespace is not your doing, but so close to your change it would be nice if you could include removing it.



src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java (line 83)
<https://reviews.apache.org/r/55079/#comment231479>

    You have implemented a new escaping mechanism escapeTableName. Are you sure escaping is not needed here too?


I'm also curious if you've considered adding schema support at a higher level, e.g. Import instead of Direct Import or even just for Netezza in general, as schemas can be used for exports as well?

Have you considered adding some tests? I understand that we currently don't have tests for Netezza direct import, but there is a DirectNetezzaExportManualTest for direct export and also NetezzaImportManualTest for testing import.
We should always strive for increasing testing coverage.

Thank you,
Liz

- Erzsebet Szilagyi


On Jan. 1, 2017, 9:33 p.m., Fr�d�ric Escandell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55079/
> -----------------------------------------------------------
> 
> (Updated Jan. 1, 2017, 9:33 p.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> SQOOP-3096
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
>   src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 
> 
> Diff: https://reviews.apache.org/r/55079/diff/
> 
> 
> Testing
> -------
> 
> Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line
> 
> 
> Thanks,
> 
> Fr�d�ric Escandell
> 
>


Re: Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

Posted by Frédéric Escandell <ed...@gmail.com>.

> On jan. 2, 2017, 3:10 apr�s-midi, Boglarka Egyed wrote:
> > src/java/org/apache/sqoop/manager/DirectNetezzaManager.java, lines 311-312
> > <https://reviews.apache.org/r/55079/diff/1/?file=1593056#file1593056line311>
> >
> >     Is this included into the log intentionally or was just because of debugging reasons? If it's intentional, could you please provide a more verbose description instead of just writing "extraArgs"?

More verbose description choosen : We will use these extra args :


- Fr�d�ric


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


On jan. 1, 2017, 8:33 apr�s-midi, Fr�d�ric Escandell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55079/
> -----------------------------------------------------------
> 
> (Updated jan. 1, 2017, 8:33 apr�s-midi)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> SQOOP-3096
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
>   src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 
> 
> Diff: https://reviews.apache.org/r/55079/diff/
> 
> 
> Testing
> -------
> 
> Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line
> 
> 
> Thanks,
> 
> Fr�d�ric Escandell
> 
>


Re: Review Request 55079: [SQOOP-3096] Add management of the schema in direct netezza import

Posted by Boglarka Egyed <eg...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55079/#review160324
-----------------------------------------------------------



Hi Fr�d�ric,

I have added some review to the specific lines, most of them related to indentation problems. On the top of them I would have two more things:

1. Could you please recursively replace every usage of the DBConfiguration's getInputTableName() in Netezza related classes, e.g. in NetezzaDataDrivenDBInputFormat too?

2. Could you please add some unit test cases for this new command line option? 

Thanks,
Bogi


src/java/org/apache/sqoop/manager/DirectNetezzaManager.java (lines 299 - 301)
<https://reviews.apache.org/r/55079/#comment231473>

    These lines have an incorrect indentation, please correct it.



src/java/org/apache/sqoop/manager/DirectNetezzaManager.java (lines 311 - 312)
<https://reviews.apache.org/r/55079/#comment231474>

    Is this included into the log intentionally or was just because of debugging reasons? If it's intentional, could you please provide a more verbose description instead of just writing "extraArgs"?



src/java/org/apache/sqoop/manager/DirectNetezzaManager.java (lines 331 - 336)
<https://reviews.apache.org/r/55079/#comment231475>

    These lines have an incorrect indentation, please correct them.



src/java/org/apache/sqoop/manager/DirectNetezzaManager.java (lines 370 - 383)
<https://reviews.apache.org/r/55079/#comment231477>

    These lines have an incorrect indentation, please correct them.



src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java (line 81)
<https://reviews.apache.org/r/55079/#comment231480>

    In escapeTableName method of the DirectNetezzaManager class you checked got schema value against null and isEmpty too. Is there any specific reason for checking it here only against null value?


- Boglarka Egyed


On Jan. 1, 2017, 8:33 p.m., Fr�d�ric Escandell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55079/
> -----------------------------------------------------------
> 
> (Updated Jan. 1, 2017, 8:33 p.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> SQOOP-3096
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/manager/DirectNetezzaManager.java af15824 
>   src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java 2efea53 
> 
> Diff: https://reviews.apache.org/r/55079/diff/
> 
> 
> Testing
> -------
> 
> Tested with a schema included in Netezza database (adding -- --schema <schema name>) to the sqoop import command line
> 
> 
> Thanks,
> 
> Fr�d�ric Escandell
> 
>