Skip to content

Commit

Permalink
[Bug] fix rs filesystem some problem (DataLinkDC#3234)
Browse files Browse the repository at this point in the history
Co-authored-by: gaoyan1998 <gaoyan1998@users.noreply.github.com>
  • Loading branch information
gaoyan1998 and gaoyan1998 authored Mar 12, 2024
1 parent 254bcb3 commit c6f4a85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@

import org.dinky.resource.BaseResourceManager;

import org.apache.flink.api.common.io.InputStreamFSInputWrapper;
import org.apache.flink.core.fs.BlockLocation;
import org.apache.flink.core.fs.FSDataInputStream;
import org.apache.flink.core.fs.FSDataOutputStream;
import org.apache.flink.core.fs.FileStatus;
import org.apache.flink.core.fs.FileSystem;
import org.apache.flink.core.fs.FileSystemKind;
import org.apache.flink.core.fs.Path;
import org.apache.flink.core.fs.local.LocalDataInputStream;
import org.apache.flink.core.fs.local.LocalFileStatus;

import java.io.File;
Expand Down Expand Up @@ -91,7 +91,7 @@ public FSDataInputStream open(Path f, int bufferSize) throws IOException {

@Override
public FSDataInputStream open(Path f) throws IOException {
return new LocalDataInputStream(getFile(f));
return new InputStreamFSInputWrapper(BASE_RESOURCE_MANAGER.readFile(f.getPath()));
}

@Override
Expand Down Expand Up @@ -142,6 +142,6 @@ public FileSystemKind getKind() {
}

public static ResourceFileSystem getSharedInstance() {
return INSTANCE;
return getInstance();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public ExplainResult explainSql(String statement) {
String error = StrFormatter.format(
"Exception in executing FlinkSQL:\n{}\n{}",
SqlUtil.addLineNumber(item.getValue()),
e.getMessage());
LogUtil.getError(e));
resultBuilder
.error(error)
.explainTrue(false)
Expand Down

0 comments on commit c6f4a85

Please sign in to comment.