1

I am trying to set an object in Configuration

conf.set("test",myobject)

But it doesnt exist.

How to set an object in Configuration and retrieve the same object value in Mapper?

1 Answer 1

1

You cannot directly set objects in hadoop configuration. You need to serialize the object, convert it into a string and then set it in the hadoop configuration object. Only then you can make it available for the mappers to use it.

This custom configuration was already discussed here.custom hadoop configuration

Sign up to request clarification or add additional context in comments.

1 Comment

Ok satya Inorder to access that object value we need to deserialize back to object right.As i need to get the value as the same object back not as a string. Actually i went through that link previously ..But did nt understood completely:(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.