我需要帮助,我正在使用webhdfs(也使用这个python代码来调用hadoop命令https://gist.github.com/drelu/1529478)。对于我的系统,它是使用KDC进行kerberized的。我可以执行curl,但不知道如何在上面的python代码中使用curl命令。感谢你的帮助。我的curl命令如下所示:
curl—cacert/opt/cloudera/security/CAcerts/根C.cer--协商-uhttps://localhost:140000/webhdfs/v1/?op=liststatus
谢谢
有几种方法可以做到这一点
在这两种方法中,您需要使用requests\kerberos modulehttps://github.com/requests/requests-kerberos#requests-kerberosgssapi-authentication-library创建身份验证头
在所有情况下,kinit都需要手动完成(您可以使用一些pythonshell执行器模块,比如subprocess、commands。。自动执行)
相关问题 更多 >
编程相关推荐