Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

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!

  1. All unit test classes should be in the exact same package hierarchy as the source java class
  2. All

    unit test

    classes

    should

    begin

    with Test

    for

    instance TestCSVInternmediateFormat.java

    instead

    of CSVIntermediateFormatTest. Integration tests apparently have FromRDBMSToHDFSTest.java format 

  3. If you see code duplicated, please create a JIRA and let us all know, we can collectively do the cleanup.

  4. Do not try to catch exceptions that you do not know how to handle, let it bubble up. 

  5. Try to use the IDE to clean-up unused imports

  6. Try not to create code with warnings. Especially when the IDE is screaming at you and telling you how to fix them!

  7. Goes without saying, do not have functions that run 100 lines long. break them down so it is easy to read and unit test

  8. Use Log.DEBUG / Log.INFO statements generously in code that is not easy to follow. It helps the person debugging your code!
  9. Use IDE for hashCode and equals and toString code generation. Use IDE for refactoring cues.
  10. Apache Kafka Coding Guide very beautifully documents some of the basic stuff of writing code. Kindly read it. 

...