[SPARK-4229] Create hadoop configuration in a consistent way

I approve this change.