|
@@ -1,7 +1,5 @@
|
|
package com.diagbot.client.fastdfs;
|
|
package com.diagbot.client.fastdfs;
|
|
|
|
|
|
-import com.diagbot.util.StringUtil;
|
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.csource.common.NameValuePair;
|
|
import org.csource.common.NameValuePair;
|
|
import org.csource.fastdfs.ClientGlobal;
|
|
import org.csource.fastdfs.ClientGlobal;
|
|
import org.csource.fastdfs.FileInfo;
|
|
import org.csource.fastdfs.FileInfo;
|
|
@@ -46,8 +44,6 @@ public class FastDFSClient {
|
|
try {
|
|
try {
|
|
storageClient = getTrackerClient();
|
|
storageClient = getTrackerClient();
|
|
uploadResults = storageClient.upload_file(file.getContent(), file.getExt(), meta_list);
|
|
uploadResults = storageClient.upload_file(file.getContent(), file.getExt(), meta_list);
|
|
- logger.info("storageClient:"+storageClient.toString());
|
|
|
|
- logger.info("uploadResults:"+ StringUtils.join(uploadResults,','));
|
|
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
logger.error("IO Exception when uploadind the file:" + file.getName(), e);
|
|
logger.error("IO Exception when uploadind the file:" + file.getName(), e);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -118,6 +114,7 @@ public class FastDFSClient {
|
|
|
|
|
|
private static StorageClient getTrackerClient() throws IOException {
|
|
private static StorageClient getTrackerClient() throws IOException {
|
|
TrackerServer trackerServer = getTrackerServer();
|
|
TrackerServer trackerServer = getTrackerServer();
|
|
|
|
+ logger.info("http://" + getTrackerServer().getInetSocketAddress().getHostString() + ":" + ClientGlobal.getG_tracker_http_port() + "/");
|
|
StorageClient storageClient = new StorageClient(trackerServer, null);
|
|
StorageClient storageClient = new StorageClient(trackerServer, null);
|
|
return storageClient;
|
|
return storageClient;
|
|
}
|
|
}
|