Solved :-). Connected Components using Hive UDAF