无法将power bi连接到hadoop hdfs无法获取内容

gopyfrb3  于 2021-05-31  发布在  Hadoop
关注(0)|答案(1)|浏览(686)

当我尝试将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"
  }
}

有人能帮忙吗?

vwoqyblh

vwoqyblh1#

手术( ?op=... )与一起使用webhdfs rest api时需要 http(s): 计划。
例如,当我在浏览器中键入以下内容时:

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"
      },
      . . . .
    ]
  }
}

您可以在线找到RESTAPI操作的完整列表。

相关问题