apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
https://linkis.apache.org/
Apache License 2.0
3.3k stars 1.17k forks source link

[Bug] The database on the right side of Scriptis cannot be refreshed #1487

Closed Andywli closed 2 years ago

Andywli commented 2 years ago

Search before asking

Linkis Component

linkis-commons

What happened + What you expected to happen

Scriptis的右侧刷不出来数据库,一直在刷新中(需要注意的是linkis的metadata暂时不支持对接sentry和Ranger只支持hive原生的权限控制),错误信息: 前端数据库tab一直处于刷新状态

The database on the right side of Scriptis cannot be refreshed, and it is being refreshed all the time (it should be noted that the metadata of linkis does not support docking with sentry and Ranger and only supports native permission control of hive),

error message: The front-end database tab is always in the refreshed state

Relevent platform

·

Reproduction script

·

Anything else

这个问题来自Linkis社区的QA文档 This question comes from the QA documentation of the Linkis community QA Doc Link:https://docs.qq.com/doc/DSGZhdnpMV3lTUUxq

Are you willing to submit a PR?

Andywli commented 2 years ago

We have restricted permissions for the database on the right, and this relies on hive to enable authorized

access:hive.security.authorization.enabled=true;

Reference:https://blog.csdn.t/yancychas/article/details/84202[](https://blog.csdn.t/yancychas/article/details/84202)

If this parameter is configured, it is necessary to grant the corresponding library table permission to the user and execute the grant statement. You can refer to the same link authorization section.

授权参考以hadoop为例:

进入hive client 查看hadoop用户数据库授权情况:

show grant user hadoop on database default;

给用户数据库授权情况:

grant all on database default to user hadoop;

If you don't want to turn on permission control, that is, every user can see the library table, you can modify:com/webank/wedatasphere/linkis/metadata/hive/dao/impl/HiveMetaDao.xml

Andywli commented 2 years ago

这是因为右侧的数据库我们是限制了权限的,而这个依赖hive开启授权访问: hive.security.authorization.enabled=true;

具体可以参考:https://blog.csdn.t/yancychas/article/details/84202[](https://blog.csdn.t/yancychas/article/details/84202)

开启如果配置了该参数还没有的话,那就需要给这个用户授予相应的库表权限,执行grant语句,可以参考相同的链接授权部分。

授权参考以hadoop为例:

进入hive client 查看hadoop用户数据库授权情况:

show grant user hadoop on database default;

给用户数据库授权情况:

grant all on database default to user hadoop;

如果不想开启权限控制,即每个用户都可以看到库表,可以修改:com/webank/wedatasphere/linkis/metadata/hive/dao/impl/HiveMetaDao.xml的sql去掉权限控制部分