CHOP-44. Converted java classes to scala.

@lockoff @daisyzhou