【问题标题】:Error while Happybase connection with hbase, how I define my hostHappybase 与 hbase 连接时出错,我如何定义我的主机
【发布时间】:2023-03-19 05:21:01
【问题描述】:

我想通过 Happybase 将 Pyspark 与 Hbase 连接起来。但我在开始时收到此错误:

(pyenv) hduser@master:~$ python -c 'import happybase'
(pyenv) hduser@master:~$ python -c connection = happybase.Connection("somehost") bash:意外标记附近的语法错误`('

【问题讨论】:

    标签: pyspark hbase happybase


    【解决方案1】:

    首先在连接命令中有语法错误。其次,如果您想在后续步骤中使用 happybase 库,您必须按照以下方式将整个脚本从 bash 运行到单个命令中,以便维护会话。

     python -c "import happybase;connection = happybase.Connection('localhost')"
    

    另一个选项是创建一个 python .py 文件并从 bash 运行它。

    【讨论】:

      猜你喜欢
      • 2013-03-11
      • 1970-01-01
      • 2017-05-31
      • 1970-01-01
      • 2015-11-27
      • 1970-01-01
      • 1970-01-01
      • 2019-07-16
      • 1970-01-01
      相关资源
      最近更新 更多