我想用高压流连接hdfs,但它不能。 我调试了tensorflow代码发现错误如下:
(Pdb) s
--Return--
> /usr/local/python3/lib/python3.5/site-packages/tensorflow/python/util/compat.py(60)as_bytes()->b'hdfs://user...c/mnist_logs3'
-> return bytes_or_text.encode(encoding)
(Pdb) l
55
56 Raises:
57 TypeError: If `bytes_or_text` is not a binary or unicode string.
58 """
59 if isinstance(bytes_or_text, _six.text_type):
60 -> return bytes_or_text.encode(encoding)
61 elif isinstance(bytes_or_text, bytes):
62 return bytes_or_text
63 else:
64 raise TypeError('Expected binary or unicode string, got %r' %
65 (bytes_or_text,))
(Pdb) s
loadFileSystems error:
(unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.)
hdfsBuilderConnect(forceNewInstance=0, nn=user, port=0, kerbTicketCachePath=(NULL), userName=(NULL)) error:
(unable to get stack trace for java.lang.NoClassDefFoundError exception: ExceptionUtils::getStackTrace error.)
> /usr/local/python3/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py(395)is_directory()
-> pywrap_tensorflow.TF_DeleteStatus(status)
(Pdb)
有人能帮帮我吗?
谢谢!
答案 0 :(得分:0)
我最好的猜测是它没有加载适当的库。仔细检查您的计算机上是否安装了Hadoop并正确设置环境变量。请参阅此处的说明: https://www.tensorflow.org/deploy/hadoop