-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve exception information and add path information #4351
Conversation
public abstract class FileSystem implements Fs { | ||
|
||
private static final Logger LOG = LoggerFactory.getLogger(LocalFileSystem.class); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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}") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
Co-authored-by: casionone <casionone@gmail.com>
…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)
* 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)
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