Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Iotdb
提交
0e74fa1e
I
Iotdb
项目概览
apache
/
Iotdb
12 个月 前同步成功
通知
25
Star
3344
Fork
916
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
Iotdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0e74fa1e
编写于
3月 28, 2019
作者:
L
lta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reorganized the start and close of sync thread
上级
abc189cd
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
179 addition
and
37 deletion
+179
-37
iotdb/iotdb/bin/start-sync-client.bat
iotdb/iotdb/bin/start-sync-client.bat
+1
-1
iotdb/iotdb/bin/start-sync-client.sh
iotdb/iotdb/bin/start-sync-client.sh
+1
-1
iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java
iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java
+3
-5
iotdb/src/main/java/org/apache/iotdb/db/service/ServiceType.java
...rc/main/java/org/apache/iotdb/db/service/ServiceType.java
+3
-1
iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/SyncServerManager.java
.../org/apache/iotdb/db/sync/receiver/SyncServerManager.java
+143
-0
iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/SyncServiceImpl.java
...va/org/apache/iotdb/db/sync/receiver/SyncServiceImpl.java
+2
-2
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/SyncFileManager.java
...java/org/apache/iotdb/db/sync/sender/SyncFileManager.java
+7
-7
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/SyncSender.java
...main/java/org/apache/iotdb/db/sync/sender/SyncSender.java
+2
-2
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/SyncSenderImpl.java
.../java/org/apache/iotdb/db/sync/sender/SyncSenderImpl.java
+13
-14
iotdb/src/test/java/org/apache/iotdb/db/sync/sender/SingleClientSyncTest.java
...org/apache/iotdb/db/sync/sender/SingleClientSyncTest.java
+1
-1
iotdb/src/test/java/org/apache/iotdb/db/sync/sender/SyncFileManagerTest.java
.../org/apache/iotdb/db/sync/sender/SyncFileManagerTest.java
+3
-3
未找到文件。
iotdb/iotdb/bin/start-sync-client.bat
浏览文件 @
0e74fa1e
...
...
@@ -29,7 +29,7 @@ set IOTDB_CONF=%IOTDB_HOME%\conf
set
IOTDB_LOGS
=
%IOTDB_HOME%
\logs
if
NOT
DEFINED
MAIN_CLASS
set
MAIN_CLASS
=
org
.apache.iotdb.db.sync.sender.
File
SenderImpl
if
NOT
DEFINED
MAIN_CLASS
set
MAIN_CLASS
=
org
.apache.iotdb.db.sync.sender.
Sync
SenderImpl
if
NOT
DEFINED
JAVA_HOME
goto
:err
@REM -----------------------------------------------------------------------------
...
...
iotdb/iotdb/bin/start-sync-client.sh
浏览文件 @
0e74fa1e
...
...
@@ -47,7 +47,7 @@ for f in ${IOTDB_HOME}/lib/*.jar; do
CLASSPATH
=
${
CLASSPATH
}
":"
$f
done
MAIN_CLASS
=
org.apache.iotdb.db.sync.sender.
File
SenderImpl
MAIN_CLASS
=
org.apache.iotdb.db.sync.sender.
Sync
SenderImpl
"
$JAVA
"
-DIOTDB_HOME
=
${
IOTDB_HOME
}
-DTSFILE_HOME
=
${
IOTDB_HOME
}
-DIOTDB_CONF
=
${
IOTDB_CONF
}
-Dlogback
.configurationFile
=
${
IOTDB_CONF
}
/logback.xml
$IOTDB_DERBY_OPTS
$IOTDB_JMX_OPTS
-Dname
=
SyncClient
-cp
"
$CLASSPATH
"
"
$MAIN_CLASS
"
...
...
iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java
浏览文件 @
0e74fa1e
...
...
@@ -33,8 +33,8 @@ import org.apache.iotdb.db.exception.StartupException;
import
org.apache.iotdb.db.exception.builder.ExceptionBuilder
;
import
org.apache.iotdb.db.metadata.MManager
;
import
org.apache.iotdb.db.monitor.StatMonitor
;
import
org.apache.iotdb.db.sync.receiver.ServerManager
;
import
org.apache.iotdb.db.query.control.FileReaderManager
;
import
org.apache.iotdb.db.sync.receiver.SyncServerManager
;
import
org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager
;
import
org.apache.iotdb.db.writelog.manager.WriteLogNodeManager
;
import
org.slf4j.Logger
;
...
...
@@ -46,7 +46,6 @@ public class IoTDB implements IoTDBMBean {
private
final
String
mbeanName
=
String
.
format
(
"%s:%s=%s"
,
IoTDBConstant
.
IOTDB_PACKAGE
,
IoTDBConstant
.
JMX_TYPE
,
"IoTDB"
);
private
RegisterManager
registerManager
=
new
RegisterManager
();
private
ServerManager
serverManager
=
ServerManager
.
getInstance
();
public
static
final
IoTDB
getInstance
()
{
return
IoTDBHolder
.
INSTANCE
;
...
...
@@ -107,18 +106,17 @@ public class IoTDB implements IoTDBMBean {
registerManager
.
register
(
StatMonitor
.
getInstance
());
registerManager
.
register
(
BasicMemController
.
getInstance
());
registerManager
.
register
(
FileReaderManager
.
getInstance
());
registerManager
.
register
(
SyncServerManager
.
getInstance
());
JMXService
.
registerMBean
(
getInstance
(),
mbeanName
);
initErrorInformation
();
serverManager
.
startServer
();
LOGGER
.
info
(
"IoTDB is set up."
);
}
public
void
deactivate
()
{
LOGGER
.
info
(
"Deactivating IoTDB..."
);
serverManager
.
closeServer
();
registerManager
.
deregisterAll
();
JMXService
.
deregisterMBean
(
mbeanName
);
LOGGER
.
info
(
"IoTDB is deactivated."
);
...
...
@@ -141,7 +139,7 @@ public class IoTDB implements IoTDBMBean {
* Recover data using system log.
*
* @throws RecoverException if FileNode(Manager)Exception is encountered during the recovery.
* @throws IOException
if IOException is encountered during the recovery.
* @throws IOException if IOException is encountered during the recovery.
*/
private
void
systemDataRecovery
()
throws
RecoverException
{
LOGGER
.
info
(
"{}: start checking write log..."
,
IoTDBConstant
.
GLOBAL_DB_NAME
);
...
...
iotdb/src/main/java/org/apache/iotdb/db/service/ServiceType.java
浏览文件 @
0e74fa1e
...
...
@@ -29,7 +29,9 @@ public enum ServiceType {
CLOSE_MERGE_SERVICE
(
"Close&Merge ServerService"
,
""
),
JVM_MEM_CONTROL_SERVICE
(
"Memory Controller"
,
""
),
AUTHORIZATION_SERVICE
(
"Authorization ServerService"
,
""
),
FILE_READER_MANAGER_SERVICE
(
"File reader manager ServerService"
,
""
);
FILE_READER_MANAGER_SERVICE
(
"File reader manager ServerService"
,
""
),
SYNC_SERVICE
(
"SYNC ServerService"
,
""
);
private
String
name
;
private
String
jmxName
;
...
...
iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/ServerManager.java
→
iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/S
yncS
erverManager.java
浏览文件 @
0e74fa1e
...
...
@@ -18,12 +18,16 @@
*/
package
org.apache.iotdb.db.sync.receiver
;
import
java.net.InetSocketAddress
;
import
org.apache.iotdb.db.concurrent.ThreadName
;
import
org.apache.iotdb.db.conf.IoTDBConfig
;
import
org.apache.iotdb.db.conf.IoTDBConstant
;
import
org.apache.iotdb.db.conf.IoTDBDescriptor
;
import
org.apache.iotdb.db.exception.StartupException
;
import
org.apache.iotdb.db.service.IService
;
import
org.apache.iotdb.db.service.ServiceType
;
import
org.apache.iotdb.service.sync.thrift.SyncService
;
import
org.apache.
thrift.T
Processor
;
import
org.apache.
iotdb.service.sync.thrift.SyncService.
Processor
;
import
org.apache.thrift.protocol.TBinaryProtocol
;
import
org.apache.thrift.protocol.TBinaryProtocol.Factory
;
import
org.apache.thrift.server.TServer
;
...
...
@@ -36,66 +40,104 @@ import org.slf4j.LoggerFactory;
/**
* sync receiver server.
*/
public
class
S
erverManager
{
public
class
S
yncServerManager
implements
IService
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ServerManager
.
class
);
private
TServerSocket
serverTransport
;
private
TServer
poolServer
;
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
SyncServerManager
.
class
);
private
Thread
syncServerThread
;
private
IoTDBConfig
conf
=
IoTDBDescriptor
.
getInstance
().
getConfig
();
private
ServerManager
()
{
private
S
yncS
erverManager
()
{
}
public
static
final
ServerManager
getInstance
()
{
public
static
final
S
yncS
erverManager
getInstance
()
{
return
ServerManagerHolder
.
INSTANCE
;
}
/**
*
s
tart sync receiver's server.
*
S
tart sync receiver's server.
*/
public
void
startServer
()
throws
StartupException
{
Factory
protocolFactory
;
TProcessor
processor
;
TThreadPoolServer
.
Args
poolArgs
;
@Override
public
void
start
()
throws
StartupException
{
if
(!
conf
.
isSyncEnable
())
{
return
;
}
try
{
if
(
conf
.
getIpWhiteList
()
==
null
)
{
LOGGER
.
error
(
"Sync server failed to start because IP white list is null, please set IP white list."
);
return
;
}
conf
.
setIpWhiteList
(
conf
.
getIpWhiteList
().
replaceAll
(
" "
,
""
));
serverTransport
=
new
TServerSocket
(
conf
.
getSyncServerPort
());
protocolFactory
=
new
TBinaryProtocol
.
Factory
();
processor
=
new
SyncService
.
Processor
<>(
new
ServerServiceImpl
());
poolArgs
=
new
TThreadPoolServer
.
Args
(
serverTransport
);
poolArgs
.
processor
(
processor
);
poolArgs
.
protocolFactory
(
protocolFactory
);
poolServer
=
new
TThreadPoolServer
(
poolArgs
);
LOGGER
.
info
(
"Sync server has started."
);
Runnable
syncServerRunnable
=
()
->
poolServer
.
serve
();
Thread
syncServerThread
=
new
Thread
(
syncServerRunnable
,
ThreadName
.
SYNC_SERVER
.
getName
());
syncServerThread
.
start
();
}
catch
(
TTransportException
e
)
{
throw
new
StartupException
(
"Cannot start sync server."
,
e
);
if
(
conf
.
getIpWhiteList
()
==
null
)
{
LOGGER
.
error
(
"Sync server failed to start because IP white list is null, please set IP white list."
);
return
;
}
conf
.
setIpWhiteList
(
conf
.
getIpWhiteList
().
replaceAll
(
" "
,
""
));
syncServerThread
=
new
SyncServiceThread
();
syncServerThread
.
setName
(
ThreadName
.
SYNC_SERVER
.
getName
());
syncServerThread
.
start
();
LOGGER
.
info
(
"Sync server has started."
);
}
/**
*
c
lose sync receiver's server.
*
C
lose sync receiver's server.
*/
public
void
closeServer
()
{
if
(
conf
.
isSyncEnable
()
&&
poolServer
!=
null
)
{
poolServer
.
stop
();
serverTransport
.
close
();
LOGGER
.
info
(
"Stop sync server."
);
@Override
public
void
stop
()
{
if
(
conf
.
isSyncEnable
())
{
((
SyncServiceThread
)
syncServerThread
).
close
();
}
}
@Override
public
ServiceType
getID
()
{
return
ServiceType
.
SYNC_SERVICE
;
}
private
static
class
ServerManagerHolder
{
private
static
final
ServerManager
INSTANCE
=
new
ServerManager
();
private
static
final
SyncServerManager
INSTANCE
=
new
SyncServerManager
();
}
private
class
SyncServiceThread
extends
Thread
{
private
TServerSocket
serverTransport
;
private
TServer
poolServer
;
private
Factory
protocolFactory
;
private
Processor
<
SyncService
.
Iface
>
processor
;
private
TThreadPoolServer
.
Args
poolArgs
;
public
SyncServiceThread
()
{
processor
=
new
SyncService
.
Processor
<>(
new
SyncServiceImpl
());
}
@Override
public
void
run
()
{
try
{
serverTransport
=
new
TServerSocket
(
new
InetSocketAddress
(
conf
.
getRpcAddress
(),
conf
.
getSyncServerPort
()));
protocolFactory
=
new
TBinaryProtocol
.
Factory
();
processor
=
new
SyncService
.
Processor
<>(
new
SyncServiceImpl
());
poolArgs
=
new
TThreadPoolServer
.
Args
(
serverTransport
);
poolArgs
.
processor
(
processor
);
poolArgs
.
protocolFactory
(
protocolFactory
);
poolServer
=
new
TThreadPoolServer
(
poolArgs
);
poolServer
.
serve
();
}
catch
(
TTransportException
e
)
{
LOGGER
.
error
(
"{}: failed to start {}, because "
,
IoTDBConstant
.
GLOBAL_DB_NAME
,
getID
().
getName
(),
e
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"{}: {} exit, because "
,
IoTDBConstant
.
GLOBAL_DB_NAME
,
getID
().
getName
(),
e
);
}
finally
{
close
();
LOGGER
.
info
(
"{}: close TThreadPoolServer and TServerSocket for {}"
,
IoTDBConstant
.
GLOBAL_DB_NAME
,
getID
().
getName
());
}
}
private
synchronized
void
close
()
{
if
(
poolServer
!=
null
)
{
poolServer
.
stop
();
poolServer
=
null
;
}
if
(
serverTransport
!=
null
)
{
serverTransport
.
close
();
serverTransport
=
null
;
}
}
}
}
\ No newline at end of file
iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/S
erver
ServiceImpl.java
→
iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/S
ync
ServiceImpl.java
浏览文件 @
0e74fa1e
...
...
@@ -77,9 +77,9 @@ import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
S
erver
ServiceImpl
implements
SyncService
.
Iface
{
public
class
S
ync
ServiceImpl
implements
SyncService
.
Iface
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
S
erver
ServiceImpl
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
S
ync
ServiceImpl
.
class
);
private
static
final
FileNodeManager
fileNodeManager
=
FileNodeManager
.
getInstance
();
/**
...
...
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/FileManager.java
→
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/
Sync
FileManager.java
浏览文件 @
0e74fa1e
...
...
@@ -38,11 +38,11 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
/**
* FileManager is used to pick up those tsfiles need to sync.
*
Sync
FileManager is used to pick up those tsfiles need to sync.
*/
public
class
FileManager
{
public
class
Sync
FileManager
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
FileManager
.
class
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
Sync
FileManager
.
class
);
/**
* Files that need to be synchronized
...
...
@@ -65,15 +65,15 @@ public class FileManager {
private
static
final
String
RESTORE_SUFFIX
=
".restore"
;
private
FileManager
()
{
private
Sync
FileManager
()
{
}
public
static
final
FileManager
getInstance
()
{
public
static
final
Sync
FileManager
getInstance
()
{
return
FileManagerHolder
.
INSTANCE
;
}
/**
* Initialize FileManager.
* Initialize
Sync
FileManager.
*/
public
void
init
()
throws
IOException
{
validAllFiles
.
clear
();
...
...
@@ -199,6 +199,6 @@ public class FileManager {
private
static
class
FileManagerHolder
{
private
static
final
FileManager
INSTANCE
=
new
FileManager
();
private
static
final
SyncFileManager
INSTANCE
=
new
Sync
FileManager
();
}
}
\ No newline at end of file
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/
File
Sender.java
→
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/
Sync
Sender.java
浏览文件 @
0e74fa1e
...
...
@@ -23,9 +23,9 @@ import java.util.Set;
import
org.apache.iotdb.db.exception.SyncConnectionException
;
/**
*
File
Sender defines the methods of a sender in sync module.
*
Sync
Sender defines the methods of a sender in sync module.
*/
public
interface
File
Sender
{
public
interface
Sync
Sender
{
/**
* Connect to server.
...
...
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/
File
SenderImpl.java
→
iotdb/src/main/java/org/apache/iotdb/db/sync/sender/
Sync
SenderImpl.java
浏览文件 @
0e74fa1e
...
...
@@ -33,7 +33,6 @@ import java.nio.file.FileSystems;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -62,11 +61,11 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
/**
*
File
SenderImpl is used to transfer tsfiles that needs to sync to receiver.
*
Sync
SenderImpl is used to transfer tsfiles that needs to sync to receiver.
*/
public
class
FileSenderImpl
implements
File
Sender
{
public
class
SyncSenderImpl
implements
Sync
Sender
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
File
SenderImpl
.
class
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
Sync
SenderImpl
.
class
);
private
TTransport
transport
;
private
SyncService
.
Client
serviceClient
;
private
List
<
String
>
schema
=
new
ArrayList
<>();
...
...
@@ -96,7 +95,7 @@ public class FileSenderImpl implements FileSender {
**/
private
Map
<
String
,
Set
<
String
>>
validFileSnapshot
=
new
HashMap
<>();
private
FileManager
fileManager
=
FileManager
.
getInstance
();
private
SyncFileManager
syncFileManager
=
Sync
FileManager
.
getInstance
();
private
SyncSenderConfig
config
=
SyncSenderDescriptor
.
getInstance
().
getConfig
();
/**
...
...
@@ -119,10 +118,10 @@ public class FileSenderImpl implements FileSender {
}
};
private
File
SenderImpl
()
{
private
Sync
SenderImpl
()
{
}
public
static
final
File
SenderImpl
getInstance
()
{
public
static
final
Sync
SenderImpl
getInstance
()
{
return
InstanceHolder
.
INSTANCE
;
}
...
...
@@ -134,7 +133,7 @@ public class FileSenderImpl implements FileSender {
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
,
IOException
,
SyncConnectionException
{
Thread
.
currentThread
().
setName
(
ThreadName
.
SYNC_CLIENT
.
getName
());
FileSenderImpl
fileSenderImpl
=
new
File
SenderImpl
();
SyncSenderImpl
fileSenderImpl
=
new
Sync
SenderImpl
();
fileSenderImpl
.
verifySingleton
();
fileSenderImpl
.
startMonitor
();
fileSenderImpl
.
timedTask
();
...
...
@@ -185,9 +184,9 @@ public class FileSenderImpl implements FileSender {
}
// 2. Acquire valid files and check
f
ileManager
.
init
();
validAllFiles
=
f
ileManager
.
getValidAllFiles
();
currentLocalFiles
=
f
ileManager
.
getCurrentLocalFiles
();
syncF
ileManager
.
init
();
validAllFiles
=
syncF
ileManager
.
getValidAllFiles
();
currentLocalFiles
=
syncF
ileManager
.
getCurrentLocalFiles
();
if
(
SyncUtils
.
isEmpty
(
validAllFiles
))
{
LOGGER
.
info
(
"There has no file to sync !"
);
return
;
...
...
@@ -255,8 +254,8 @@ public class FileSenderImpl implements FileSender {
syncData
(
validSnapshot
);
if
(
afterSynchronization
())
{
currentLocalFiles
.
get
(
entry
.
getKey
()).
addAll
(
validFiles
);
f
ileManager
.
setCurrentLocalFiles
(
currentLocalFiles
);
f
ileManager
.
backupNowLocalFileInfo
(
config
.
getLastFileInfo
());
syncF
ileManager
.
setCurrentLocalFiles
(
currentLocalFiles
);
syncF
ileManager
.
backupNowLocalFileInfo
(
config
.
getLastFileInfo
());
LOGGER
.
info
(
"Sync process has finished storage group {}."
,
entry
.
getKey
());
}
else
{
LOGGER
.
error
(
"Receiver cannot sync data, abandon this synchronization of storage group {}"
,
entry
.
getKey
());
...
...
@@ -531,7 +530,7 @@ public class FileSenderImpl implements FileSender {
private
static
class
InstanceHolder
{
private
static
final
FileSenderImpl
INSTANCE
=
new
File
SenderImpl
();
private
static
final
SyncSenderImpl
INSTANCE
=
new
Sync
SenderImpl
();
}
public
void
setConfig
(
SyncSenderConfig
config
)
{
...
...
iotdb/src/test/java/org/apache/iotdb/db/sync/sender/SingleClientSyncTest.java
浏览文件 @
0e74fa1e
...
...
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
*/
public
class
SingleClientSyncTest
{
FileSenderImpl
fileSenderImpl
=
File
SenderImpl
.
getInstance
();
SyncSenderImpl
fileSenderImpl
=
Sync
SenderImpl
.
getInstance
();
private
IoTDBConfig
conf
=
IoTDBDescriptor
.
getInstance
().
getConfig
();
private
String
serverIpTest
=
"192.168.130.7"
;
private
SyncSenderConfig
config
=
SyncSenderDescriptor
.
getInstance
().
getConfig
();
...
...
iotdb/src/test/java/org/apache/iotdb/db/sync/sender/FileManagerTest.java
→
iotdb/src/test/java/org/apache/iotdb/db/sync/sender/
Sync
FileManagerTest.java
浏览文件 @
0e74fa1e
...
...
@@ -33,14 +33,14 @@ import org.junit.Test;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
FileManagerTest
{
public
class
Sync
FileManagerTest
{
private
static
final
String
POST_BACK_DIRECTORY_TEST
=
Constans
.
SYNC_CLIENT
+
File
.
separator
;
private
static
final
String
LAST_FILE_INFO_TEST
=
POST_BACK_DIRECTORY_TEST
+
Constans
.
LAST_LOCAL_FILE_NAME
;
private
static
final
String
SENDER_FILE_PATH_TEST
=
POST_BACK_DIRECTORY_TEST
+
"data"
;
private
FileManager
manager
=
FileManager
.
getInstance
();
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
FileManagerTest
.
class
);
private
SyncFileManager
manager
=
Sync
FileManager
.
getInstance
();
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
Sync
FileManagerTest
.
class
);
@Before
public
void
setUp
()
throws
IOException
,
InterruptedException
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录