If the type of the object passed to convertBSONtoPigType UUID it is not recognised; the method defaults to outputting the object and breaking pig. If the type is objectid where the semantics are similar, the method already calls toString() on the object. This change just adds similar ability to the UUID object. For further information see: http://stackoverflow.com/questions/17579027/pig-mongoloader-exception-loading-data-with-uuids/21391717#21391717
…catch Exception instead of UnknownHostException. This allows compilation against both the 2.13 Java driver, in which MongoClient constructors throw that exception, and 3.0, in which they no longer do. Once the project upgrades to the 3.0 driver in build.gradle, the catch clauses can be removed.
…and MongoUpdateWritable can call BasicOutputBuffer.write(OutputStream) instead of BasicOutputBuffer.write(DataOutput), which was deprecated in 2.13 and removed in the 3.0 Java driver.
Make sure this functionality is consistent across the project.
…t connection leak