Add hadoop dependency

add a function in Config class, instead of here.