Take the 2-minute tour ×

In a Hadoop job I'm writing, I want UTF-8 encoded strings for my mappers/reducers. How do I specify UTF-8 as my system encoding? If I'm running code locally, I could just do java -Dfile.encoding="UTF-8", but when I tried running hadoop jap myjar.jar -Dfile.encoding="UTF-8", this didn't work.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

By default Hadoop uses UTF-8 encoding so you don't have to provide such options.
I assume you use Text for your keys/values. According to the javadoc: "This class stores text using standard UTF8 encoding"

share|improve this answer
add comment

Your Answer


