提交 383ae265 编写于 作者: A Aljoscha Krettek

[FLINK-1366] Enable FastPath in TextValueInputFormat again

上级 59970361
......@@ -25,6 +25,7 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.util.Arrays;
import com.google.common.base.Charsets;
import org.apache.flink.api.common.io.DelimitedInputFormat;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.core.fs.Path;
......@@ -82,6 +83,10 @@ public class TextValueInputFormat extends DelimitedInputFormat<StringValue> {
if (charsetName == null || !Charset.isSupported(charsetName)) {
throw new RuntimeException("Unsupported charset: " + charsetName);
}
if (charsetName.equalsIgnoreCase(Charsets.US_ASCII.name())) {
ascii = true;
}
this.decoder = Charset.forName(charsetName).newDecoder();
this.byteWrapper = ByteBuffer.allocate(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册