How do I convert a String object to a Text object in hadoop without using a constructor? There is a Text to String method available, but I couldn't find a String to Text method.
Text text = new Text("your-string");
or
Text text = new Text();
text.set("your-string");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.