Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve exception information and add path information #4351

Merged
merged 14 commits into from
Mar 22, 2023

Conversation

binbinCheng
Copy link
Contributor

@binbinCheng binbinCheng commented Mar 9, 2023

What is the purpose of the change

Improve exception information and add path information to exception information(异常信息完善以及在异常信息添加路径信息)

Related issues/PRs

Related issues: #4343
Related pr:#4351

Checklist

  • I have read the Contributing Guidelines on pull requests.
  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the Linkis mailing list first)
  • If this is a code change: I have written unit tests to fully verify the new behavior.

public abstract class FileSystem implements Fs {

private static final Logger LOG = LoggerFactory.getLogger(LocalFileSystem.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to modify, please use org.apache.linkis.common.utils.Logging

@@ -75,12 +75,14 @@ public String listRoot() throws IOException {
@Override
public long getTotalSpace(FsPath dest) throws IOException {
String path = dest.getPath();
LOG.info("getTotalSpace, path:" + path);
Copy link
Contributor

@casionone casionone Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Get total space with path:"+path

return new File(path).getTotalSpace();
}

@Override
public long getFreeSpace(FsPath dest) throws IOException {
String path = dest.getPath();
LOG.info("getFreeSpace, path:" + path);
return new File(path).getFreeSpace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Get free space with path:"+path

@@ -64,6 +65,7 @@ object ResultSetReader {

def getTableResultReader(res: String): ResultSetReader[TableMetaData, TableRecord] = {
val rsFactory = ResultSetFactory.getInstance
logger.info(s"getTableResultReader, file path:${res}")
Copy link
Contributor

@casionone casionone Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove, res may not be a file path

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need add log before fs.init(null)
logger.info("Try to init Fs with path:"+ resPath.getPath)

@casionone casionone merged commit e24da00 into apache:dev-1.4.0 Mar 22, 2023
casionone pushed a commit to WeDataSphere/linkis that referenced this pull request Mar 22, 2023
Co-authored-by: casionone <casionone@gmail.com>
CharlieYan24 pushed a commit to CharlieYan24/linkis that referenced this pull request Mar 28, 2023
…rent

* dev-1.4.0:
  support map string value (apache#4409)
  Improve exception information and add path information (apache#4351)
  [fix bug] The s3a file cannot be written because FileSystem is closed prematurely (apache#4375)
  Optimization of upload file interface in FsRestfulApi.java (apache#4357)
CharlieYan24 added a commit to CharlieYan24/linkis that referenced this pull request Mar 29, 2023
* dev-1.4.0:
  Improve exception information and add path information (apache#4351)
  [fix bug] The s3a file cannot be written because FileSystem is closed prematurely (apache#4375)
  Optimization of upload file interface in FsRestfulApi.java (apache#4357)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants