Skip to content

Commit

Permalink
Merge branch 'dev-1.10.0-webank' into dev-1.10.0-bug-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
“v_kkhuang” committed Dec 25, 2024
2 parents f550f49 + 24af105 commit 1783615
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1450,9 +1450,12 @@ public Message getRegisterFunctions(HttpServletRequest req, @RequestParam("path"
|| StringUtils.endsWithIgnoreCase(path, Constants.FILE_EXTENSION_SCALA)) {
if (StringUtils.startsWithIgnoreCase(path, StorageUtils$.MODULE$.FILE_SCHEMA())) {
try {
// 获取登录用户
String userName = ModuleUserUtils.getOperationUser(req, "get-register-functions");

FsPath fsPath = new FsPath(path);
// 获取文件系统实例
FileSystem fileSystem = (FileSystem) FSFactory.getFs(fsPath);
FileSystem fileSystem = (FileSystem) FSFactory.getFsByProxyUser(fsPath, userName);
fileSystem.init(null);
if (fileSystem.canRead(fsPath)) {
return Message.ok()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,14 @@ public static List<String> extractPythonMethodNames(String udfPath) throws Excep
String exec =
Utils.exec(
(new String[] {
"sudo",
Constants.PYTHON_COMMAND.getValue(),
Configuration.getLinkisHome() + "/admin/" + "linkis_udf_get_python_methods.py",
localPath
}));
logger.info(
"execute python script to get python method name...{} {} {}",
"execute python script to get python method name...{} {} {} {}",
"sudo",
Constants.PYTHON_COMMAND.getValue(),
Configuration.getLinkisHome() + "/admin/" + "linkis_udf_get_python_methods.py",
localPath);
Expand Down

0 comments on commit 1783615

Please sign in to comment.