- 论坛徽章:
- 2
|
public class TestDownload_smith {
public static void main(String[] args) throws Exception{
String classPath = new File(TestDownload_smith.class.getResource("/").getFile()).getCanonicalPath();
String configFilePath = classPath + File.separator + "fdfs_client.conf";
ClientGlobal.init(configFilePath);
TrackerClient trackerClient = new TrackerClient();
TrackerServer trackerServer = trackerClient.getConnection();
StorageServer storageServer = null;
StorageClient storageClient = new StorageClient(trackerServer, storageServer);
storageClient.download_file("group1", "M00/00/00/wKgH7VSSPNCAMkfNAAl5WLU-YRY839.jpg", "c1.jpg");
}
}
执行后文件能被下载到本地,java客户端没有报异常,fastDFS日志出现以下错误,这个错误可以忽略吗?
[2014-12-18 10:33:30] ERROR - file: tracker_nio.c, line: 254, client ip: 192.168.2.130, recv failed, errno: 104, error info: Connection reset by peer
|
|