【问题标题】:Unable Connecting Power BI to Hadoop HDFS failed to get contents无法将 Power BI 连接到 Hadoop HDFS 无法获取内容
【发布时间】:2020-10-29 20:58:13
【问题描述】:

当我尝试将 Power BI 连接到 Hadoop webhdfs 时,出现此错误

DataSource.Error: HDFS failed to get contents from 'http://xxx.xx.x.x:50070/webhdfs/v1/myFolder/20200626150740_PERSONAL_IDS'. Status code: 503, description: 'Service Unavailable'.

当我访问 URL 时,会出现这样的错误:

{
  RemoteException: {
    exception: "UnsupportedOperationException",
    javaClassName: "java.lang.UnsupportedOperationException",
    message: "op=NULL is not supported"
  }
}

有人可以帮忙吗?

【问题讨论】:

    标签: hadoop powerbi hdfs webhdfs


    【解决方案1】:

    当您将 webhdfs REST API 与 http(s): 方案一起使用时,需要一个操作 (?op=...)。

    例如,当我在浏览器中输入以下内容时:

    https://<my.namenode.host>:9871/webhdfs/v1/user?op=LISTSTATUS
    

    ...我返回 hdfs 目录 /user 内容的列表(类似于我将通过 hadoop fs -ls /user 获得的内容以及一些附加信息):

    // 20200709155934
    // https://<my.namenode.host>:9871/webhdfs/v1/user?op=LISTSTATUS
    
    {
      "FileStatuses": {
        "FileStatus": [
          {
            "accessTime": 0,
            "blockSize": 0,
            "childrenNum": 2,
            "fileId": 56899,
            "group": "supergroup",
            "length": 0,
            "modificationTime": 1592790690971,
            "owner": "hdfs",
            "pathSuffix": "hdfs",
            "permission": "700",
            "replication": 0,
            "storagePolicy": 0,
            "type": "DIRECTORY"
          },
          . . . . 
          {
            "accessTime": 0,
            "blockSize": 0,
            "childrenNum": 2,
            "fileId": 16390,
            "group": "hive",
            "length": 0,
            "modificationTime": 1591715444764,
            "owner": "hive",
            "pathSuffix": "hive",
            "permission": "1775",
            "replication": 0,
            "storagePolicy": 0,
            "type": "DIRECTORY"
          },
          . . . . 
          {
            "accessTime": 0,
            "blockSize": 0,
            "childrenNum": 2,
            "fileId": 16454,
            "group": "mazaneicha",
            "length": 0,
            "modificationTime": 1591035918913,
            "owner": "mazaneicha",
            "pathSuffix": "mazaneicha",
            "permission": "720",
            "replication": 0,
            "storagePolicy": 0,
            "type": "DIRECTORY"
          },
          . . . .
        ]
      }
    }
    

    您可以找到完整的 REST API 操作列表online

    【讨论】:

      猜你喜欢
      • 2021-09-19
      • 2020-07-19
      • 1970-01-01
      • 2017-12-30
      • 1970-01-01
      • 2012-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多