add getwords code in hadoop version 2

Signed-off-by: huyang1532 <huyang1532@gmail.com>