add getTrackerServer

dev
chengdu 2019-07-14 20:30:10 +08:00
parent 9ee6e693fe
commit 086f4efc0f
3 changed files with 21 additions and 3 deletions

View File

@ -37,7 +37,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <!--<version>3.5.1</version>-->
<configuration> <configuration>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
<source>${jdk.version}</source> <source>${jdk.version}</source>

View File

@ -28,6 +28,8 @@ public class StorageClient {
protected StorageServer storageServer; protected StorageServer storageServer;
protected byte errno; protected byte errno;
/** /**
* constructor using global settings in class ClientGlobal * constructor using global settings in class ClientGlobal
*/ */
@ -1760,6 +1762,22 @@ public class StorageClient {
trackerServer.close(); trackerServer.close();
} }
public TrackerServer getTrackerServer() {
return trackerServer;
}
public void setTrackerServer(TrackerServer trackerServer) {
this.trackerServer = trackerServer;
}
public StorageServer getStorageServer() {
return storageServer;
}
public void setStorageServer(StorageServer storageServer) {
this.storageServer = storageServer;
}
/** /**
* Upload file by file buff * Upload file by file buff
* *

View File

@ -39,9 +39,9 @@ public class FdfsTest {
@After @After
public void closeClient() { public void closeClient() {
LOGGER.info("close connection"); LOGGER.info("close connection");
if(trackerServer != null){ if(storageClient != null){
try { try {
trackerServer.finalize(); storageClient.close();
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
}catch (Throwable e){ }catch (Throwable e){