mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-03 14:11:35 +08:00
Update SftpHelper.java
This commit is contained in:
parent
908d0fda44
commit
42f125aabf
@ -242,5 +242,17 @@ public class SftpHelper extends FtpHelper {
|
|||||||
throw DataXException.asDataXException(FtpReaderErrorCode.OPEN_FILE_ERROR, message);
|
throw DataXException.asDataXException(FtpReaderErrorCode.OPEN_FILE_ERROR, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFile(String filePath) {
|
||||||
|
|
||||||
|
try{
|
||||||
|
channelSftp.rm(filePath);
|
||||||
|
}catch(SftpException e){
|
||||||
|
String message = String.format("删除文件 : [%s] 时出错,请确认文件:[%s]存在且配置的用户有权限读取", filePath, filePath);
|
||||||
|
LOG.error(message);
|
||||||
|
throw DataXException.asDataXException(FtpReaderErrorCode.OPEN_FILE_ERROR, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user