sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Szabolcs Vasas <vasas.szabo...@gmail.com>
Subject Re: Review Request 54421: Enhance error (tool.ImportTool: Encountered IOException running import job: java.io.IOException: Expected schema) to suggest workaround (--map-column-java)
Date Tue, 20 Dec 2016 13:23:14 GMT


> On Dec. 20, 2016, 1:07 p.m., Attila Szabo wrote:
> > src/java/org/apache/sqoop/tool/ImportTool.java, lines 657-662
> > <https://reviews.apache.org/r/54421/diff/3/?file=1586430#file1586430line657>
> >
> >     Hi Szabi,
> >     
> >     Shouldn't this be in the AvroSchemaMismatchException? IMHO it would be better
from encapsulation POV, and also if the exception would be able to produce the full and proper
message by itself, it would be much more useable compared to the current implementation.
> >     
> >     Do you agree?

Hi Attila,

Thank you for reviewing my patch! I created the AvroSchemaMismatchException to be a more general
exception class and buildAvroSchemaMismatchMessage creates a message when a (hive) import
failed. I can add this message building logic to AvroSchemaMismatchException but it would
be less reusable then and it would be harder to handle the case when hive import was executed
and an additional tip has to be printed.


- Szabolcs


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


On Dec. 15, 2016, 2:42 p.m., Szabolcs Vasas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54421/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2016, 2:42 p.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3068
>     https://issues.apache.org/jira/browse/SQOOP-3068
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> Enhance error (tool.ImportTool: Encountered IOException running import job: java.io.IOException:
Expected schema) to suggest workaround (--map-column-java)
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/avro/AvroSchemaMismatchException.java PRE-CREATION 
>   src/java/org/apache/sqoop/mapreduce/ParquetJob.java b077d9b 
>   src/java/org/apache/sqoop/tool/ImportTool.java ed951ea 
>   src/test/com/cloudera/sqoop/hive/TestHiveImport.java 26d087b 
>   src/test/org/apache/sqoop/tool/TestImportTool.java 4136e9f 
>   src/test/org/apache/sqoop/util/ExpectedLogMessage.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/54421/diff/
> 
> 
> Testing
> -------
> 
> New integration test and unit test is added.
> 
> 
> Thanks,
> 
> Szabolcs Vasas
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message