...
If in case, you have very legit reason to ignore it , have a comment, DO NOT leave it blank. It's also generally a good idea to log the error message, so that we know that it happened.
Code Block |
---|
try { .... } catch (SqoopException ok) { // its ok for me ignore this, since it is harmless } |
Some conventions in Sqoop that you should follow!
All unit test classes should be in the exact same package hierarchy as the source java class
All
unit test
classes
should
begin
with Test
for
instance TestCSVInternmediateFormat.java
instead
of CSVIntermediateFormatTest. Integration tests apparently have
FromRDBMSToHDFSTest.java
formatIf you see code duplicated, please create a JIRA and let us all know, we can collectively do the cleanup.
Do not try to catch exceptions that you do not know how to handle, let it bubble up.
Try to use the IDE to clean-up unused imports
Try not to create code with warnings. Especially when the IDE is screaming at you and telling you how to fix them!
Goes without saying, do not have functions that run 100 lines long. break them down so it is easy to read and unit test
- Use Log.DEBUG / Log.INFO statements generously in code that is not easy to follow. It helps the person debugging your code!
- Use IDE for
hashCode
andequals
andtoString
code generation. Use IDE for refactoring cues. - Apache Kafka Coding Guide very beautifully documents some of the basic stuff of writing code. Kindly read it.
...