Local master and worker add. Changes to support it on hadoop