Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不使用构造函数的情况下将字符串对象转换为 hadoop 中的文本对象?有一个 Text to String 方法可用,但我找不到 String to Text 方法。
Text text = new Text("your-string");
或者
Text text = new Text(); text.set("your-string");
文本类构造函数有此规定。点击这里。
您可以使用Text.set(String)方法..