Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Iotdb
提交
24b981ed
I
Iotdb
项目概览
apache
/
Iotdb
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
24b981ed
编写于
7月 22, 2019
作者:
X
xiangdong huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove System.out.println() to reduce output on console.
上级
edb150c9
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
47 addition
and
77 deletion
+47
-77
iotdb-cli/src/test/java/org/apache/iotdb/cli/client/AbstractClientIT.java
...st/java/org/apache/iotdb/cli/client/AbstractClientIT.java
+4
-2
iotdb-cli/src/test/java/org/apache/iotdb/cli/client/StartClientScriptIT.java
...java/org/apache/iotdb/cli/client/StartClientScriptIT.java
+0
-1
iotdb/src/test/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapterTest.java
.../iotdb/db/conf/adapter/IoTDBConfigDynamicAdapterTest.java
+5
-7
iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemTablePoolTest.java
...org/apache/iotdb/db/engine/memtable/MemTablePoolTest.java
+2
-3
iotdb/src/test/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessorTest.java
...tdb/db/engine/storagegroup/StorageGroupProcessorTest.java
+0
-1
iotdb/src/test/java/org/apache/iotdb/db/integration/IOTDBFillIT.java
...est/java/org/apache/iotdb/db/integration/IOTDBFillIT.java
+0
-7
iotdb/src/test/java/org/apache/iotdb/db/integration/IOTDBGroupByIT.java
.../java/org/apache/iotdb/db/integration/IOTDBGroupByIT.java
+0
-6
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBAggregationLargeDataIT.java
...che/iotdb/db/integration/IoTDBAggregationLargeDataIT.java
+0
-5
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
...org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
+11
-7
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
...ache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
+2
-2
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSeriesReaderIT.java
.../org/apache/iotdb/db/integration/IoTDBSeriesReaderIT.java
+4
-4
iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerImproveTest.java
...ava/org/apache/iotdb/db/metadata/MManagerImproveTest.java
+14
-11
iotdb/src/test/java/org/apache/iotdb/db/metadata/MTreeTest.java
...src/test/java/org/apache/iotdb/db/metadata/MTreeTest.java
+0
-1
iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
...st/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
+0
-1
iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java
...va/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java
+2
-8
iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java
...st/java/org/apache/iotdb/db/writelog/PerformanceTest.java
+1
-1
tsfile/src/test/java/org/apache/iotdb/tsfile/compress/SnappyTest.java
...est/java/org/apache/iotdb/tsfile/compress/SnappyTest.java
+0
-1
tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java
...encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java
+2
-7
tsfile/src/test/java/org/apache/iotdb/tsfile/utils/BytesUtilsTest.java
...st/java/org/apache/iotdb/tsfile/utils/BytesUtilsTest.java
+0
-1
tsfile/src/test/java/org/apache/iotdb/tsfile/write/WriteTest.java
...rc/test/java/org/apache/iotdb/tsfile/write/WriteTest.java
+0
-1
未找到文件。
iotdb-cli/src/test/java/org/apache/iotdb/cli/client/AbstractClientIT.java
浏览文件 @
24b981ed
...
@@ -36,9 +36,11 @@ import org.junit.Before;
...
@@ -36,9 +36,11 @@ import org.junit.Before;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.mockito.Mock
;
import
org.mockito.Mock
;
import
org.mockito.MockitoAnnotations
;
import
org.mockito.MockitoAnnotations
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
AbstractClientIT
{
public
class
AbstractClientIT
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
AbstractClientIT
.
class
);
@Mock
@Mock
private
IoTDBConnection
connection
;
private
IoTDBConnection
connection
;
...
@@ -66,7 +68,7 @@ public class AbstractClientIT {
...
@@ -66,7 +68,7 @@ public class AbstractClientIT {
AbstractClient
.
MAX_PRINT_ROW_COUNT_ARGS
,};
AbstractClient
.
MAX_PRINT_ROW_COUNT_ARGS
,};
for
(
String
keyword
:
keywords
)
{
for
(
String
keyword
:
keywords
)
{
if
(!
AbstractClient
.
keywordSet
.
contains
(
"-"
+
keyword
))
{
if
(!
AbstractClient
.
keywordSet
.
contains
(
"-"
+
keyword
))
{
System
.
out
.
println
(
keyword
);
logger
.
error
(
keyword
);
fail
();
fail
();
}
}
}
}
...
...
iotdb-cli/src/test/java/org/apache/iotdb/cli/client/StartClientScriptIT.java
浏览文件 @
24b981ed
...
@@ -64,7 +64,6 @@ public class StartClientScriptIT extends AbstractScript {
...
@@ -64,7 +64,6 @@ public class StartClientScriptIT extends AbstractScript {
"---------------------"
,
"---------------------"
,
"IoTDB> Connection Error, please check whether the network is available or the server has started. Host is 127.0.0.1, port is 6668."
};
"IoTDB> Connection Error, please check whether the network is available or the server has started. Host is 127.0.0.1, port is 6668."
};
String
dir
=
getCurrentPath
(
"pwd"
);
String
dir
=
getCurrentPath
(
"pwd"
);
System
.
out
.
println
(
dir
);
ProcessBuilder
builder
=
new
ProcessBuilder
(
"sh"
,
ProcessBuilder
builder
=
new
ProcessBuilder
(
"sh"
,
dir
+
File
.
separator
+
"cli"
+
File
.
separator
+
"bin"
+
File
.
separator
+
"start-client.sh"
,
dir
+
File
.
separator
+
"cli"
+
File
.
separator
+
"bin"
+
File
.
separator
+
"start-client.sh"
,
"-h"
,
"-h"
,
...
...
iotdb/src/test/java/org/apache/iotdb/db/conf/adapter/IoTDBConfigDynamicAdapterTest.java
浏览文件 @
24b981ed
...
@@ -61,9 +61,9 @@ public class IoTDBConfigDynamicAdapterTest {
...
@@ -61,9 +61,9 @@ public class IoTDBConfigDynamicAdapterTest {
@Test
@Test
public
void
addOrDeleteStorageGroup
()
throws
ConfigAdjusterException
{
public
void
addOrDeleteStorageGroup
()
throws
ConfigAdjusterException
{
System
.
out
.
println
(
//
System.out.println(
"System total memory : "
+
Runtime
.
getRuntime
().
maxMemory
()
/
IoTDBConstant
.
MB
//
"System total memory : " + Runtime.getRuntime().maxMemory() / IoTDBConstant.MB
+
"MB"
);
//
+ "MB");
int
memTableNum
=
IoTDBConfigDynamicAdapter
.
MEM_TABLE_AVERAGE_QUEUE_LEN
;
int
memTableNum
=
IoTDBConfigDynamicAdapter
.
MEM_TABLE_AVERAGE_QUEUE_LEN
;
for
(
int
i
=
1
;
i
<
100
;
i
++)
{
for
(
int
i
=
1
;
i
<
100
;
i
++)
{
IoTDBConfigDynamicAdapter
.
getInstance
().
addOrDeleteTimeSeries
(
1
);
IoTDBConfigDynamicAdapter
.
getInstance
().
addOrDeleteTimeSeries
(
1
);
...
@@ -78,7 +78,7 @@ public class IoTDBConfigDynamicAdapterTest {
...
@@ -78,7 +78,7 @@ public class IoTDBConfigDynamicAdapterTest {
assertEquals
(
CONFIG
.
getMaxMemtableNumber
(),
memTableNum
);
assertEquals
(
CONFIG
.
getMaxMemtableNumber
(),
memTableNum
);
}
catch
(
ConfigAdjusterException
e
)
{
}
catch
(
ConfigAdjusterException
e
)
{
assertEquals
(
"The IoTDB system load is too large to create storage group."
,
e
.
getMessage
());
assertEquals
(
"The IoTDB system load is too large to create storage group."
,
e
.
getMessage
());
System
.
out
.
println
(
"it has created "
+
i
+
" storage groups."
);
//
System.out.println("it has created " + i + " storage groups.");
assertEquals
(
CONFIG
.
getMaxMemtableNumber
(),
memTableNum
);
assertEquals
(
CONFIG
.
getMaxMemtableNumber
(),
memTableNum
);
break
;
break
;
}
}
...
@@ -109,7 +109,7 @@ public class IoTDBConfigDynamicAdapterTest {
...
@@ -109,7 +109,7 @@ public class IoTDBConfigDynamicAdapterTest {
totalTimeseries
);
totalTimeseries
);
}
catch
(
ConfigAdjusterException
e
)
{
}
catch
(
ConfigAdjusterException
e
)
{
assertEquals
(
"The IoTDB system load is too large to add timeseries."
,
e
.
getMessage
());
assertEquals
(
"The IoTDB system load is too large to add timeseries."
,
e
.
getMessage
());
System
.
out
.
println
(
"it has added "
+
i
+
" timeseries."
);
//
System.out.println("it has added " + i + " timeseries.");
assertEquals
(
IoTDBConfigDynamicAdapter
.
getInstance
().
getTotalTimeseries
(),
assertEquals
(
IoTDBConfigDynamicAdapter
.
getInstance
().
getTotalTimeseries
(),
totalTimeseries
);
totalTimeseries
);
break
;
break
;
...
@@ -130,7 +130,6 @@ public class IoTDBConfigDynamicAdapterTest {
...
@@ -130,7 +130,6 @@ public class IoTDBConfigDynamicAdapterTest {
MManager
.
getInstance
().
setMaxSeriesNumberAmongStorageGroup
(
i
/
30
+
1
);
MManager
.
getInstance
().
setMaxSeriesNumberAmongStorageGroup
(
i
/
30
+
1
);
}
}
}
catch
(
ConfigAdjusterException
e
)
{
}
catch
(
ConfigAdjusterException
e
)
{
System
.
out
.
println
(
i
);
assertEquals
(
"The IoTDB system load is too large to add timeseries."
,
e
.
getMessage
());
assertEquals
(
"The IoTDB system load is too large to add timeseries."
,
e
.
getMessage
());
}
}
int
j
=
0
;
int
j
=
0
;
...
@@ -141,7 +140,6 @@ public class IoTDBConfigDynamicAdapterTest {
...
@@ -141,7 +140,6 @@ public class IoTDBConfigDynamicAdapterTest {
MManager
.
getInstance
().
setMaxSeriesNumberAmongStorageGroup
(
MManager
.
getInstance
().
getMaximalSeriesNumberAmongStorageGroups
()
+
1
);
MManager
.
getInstance
().
setMaxSeriesNumberAmongStorageGroup
(
MManager
.
getInstance
().
getMaximalSeriesNumberAmongStorageGroups
()
+
1
);
}
}
}
catch
(
ConfigAdjusterException
e
)
{
}
catch
(
ConfigAdjusterException
e
)
{
System
.
out
.
println
(
j
);
assertEquals
(
"The IoTDB system load is too large to add timeseries."
,
e
.
getMessage
());
assertEquals
(
"The IoTDB system load is too large to add timeseries."
,
e
.
getMessage
());
}
}
}
}
...
...
iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemTablePoolTest.java
浏览文件 @
24b981ed
...
@@ -41,7 +41,6 @@ public class MemTablePoolTest {
...
@@ -41,7 +41,6 @@ public class MemTablePoolTest {
public
void
tearDown
()
throws
Exception
{
public
void
tearDown
()
throws
Exception
{
isFinished
=
true
;
isFinished
=
true
;
thread
.
join
();
thread
.
join
();
System
.
out
.
println
(
MemTablePool
.
getInstance
().
getSize
());
}
}
@Test
@Test
...
@@ -55,7 +54,7 @@ public class MemTablePoolTest {
...
@@ -55,7 +54,7 @@ public class MemTablePoolTest {
System
.
out
.
println
(
"memtable pool use deque and synchronized consume:"
+
time
);
System
.
out
.
println
(
"memtable pool use deque and synchronized consume:"
+
time
);
}
}
@Test
//
@Test
public
void
testSort
()
{
public
void
testSort
()
{
long
start
=
System
.
currentTimeMillis
();
long
start
=
System
.
currentTimeMillis
();
TreeMap
<
Long
,
Long
>
treeMap
=
new
TreeMap
<>();
TreeMap
<
Long
,
Long
>
treeMap
=
new
TreeMap
<>();
...
@@ -63,7 +62,7 @@ public class MemTablePoolTest {
...
@@ -63,7 +62,7 @@ public class MemTablePoolTest {
treeMap
.
put
((
long
)
i
,
(
long
)
i
);
treeMap
.
put
((
long
)
i
,
(
long
)
i
);
}
}
start
=
System
.
currentTimeMillis
()
-
start
;
start
=
System
.
currentTimeMillis
()
-
start
;
System
.
out
.
println
(
"time cost: "
+
start
);
System
.
out
.
println
(
"time cost
of sort
: "
+
start
);
}
}
...
...
iotdb/src/test/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessorTest.java
浏览文件 @
24b981ed
...
@@ -59,7 +59,6 @@ public class StorageGroupProcessorTest {
...
@@ -59,7 +59,6 @@ public class StorageGroupProcessorTest {
@Test
@Test
public
void
testSequenceSyncClose
()
{
public
void
testSequenceSyncClose
()
{
for
(
int
j
=
1
;
j
<=
10
;
j
++)
{
for
(
int
j
=
1
;
j
<=
10
;
j
++)
{
System
.
out
.
println
(
j
);
TSRecord
record
=
new
TSRecord
(
j
,
deviceId
);
TSRecord
record
=
new
TSRecord
(
j
,
deviceId
);
record
.
addTuple
(
DataPoint
.
getDataPoint
(
TSDataType
.
INT32
,
measurementId
,
String
.
valueOf
(
j
)));
record
.
addTuple
(
DataPoint
.
getDataPoint
(
TSDataType
.
INT32
,
measurementId
,
String
.
valueOf
(
j
)));
processor
.
insert
(
new
InsertPlan
(
record
));
processor
.
insert
(
new
InsertPlan
(
record
));
...
...
iotdb/src/test/java/org/apache/iotdb/db/integration/IOTDBFillIT.java
浏览文件 @
24b981ed
...
@@ -142,7 +142,6 @@ public class IOTDBFillIT {
...
@@ -142,7 +142,6 @@ public class IOTDBFillIT {
while
(
resultSet
.
next
())
{
while
(
resultSet
.
next
())
{
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
.
getString
(
TEMPERATURE_STR
)
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
.
getString
(
TEMPERATURE_STR
)
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
System
.
out
.
println
(
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
}
}
...
@@ -160,7 +159,6 @@ public class IOTDBFillIT {
...
@@ -160,7 +159,6 @@ public class IOTDBFillIT {
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
System
.
out
.
println
(
ans
);
}
}
statement
.
close
();
statement
.
close
();
...
@@ -176,7 +174,6 @@ public class IOTDBFillIT {
...
@@ -176,7 +174,6 @@ public class IOTDBFillIT {
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
System
.
out
.
println
(
ans
);
}
}
statement
.
close
();
statement
.
close
();
...
@@ -190,7 +187,6 @@ public class IOTDBFillIT {
...
@@ -190,7 +187,6 @@ public class IOTDBFillIT {
while
(
resultSet
.
next
())
{
while
(
resultSet
.
next
())
{
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
.
getString
(
TEMPERATURE_STR
)
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
.
getString
(
TEMPERATURE_STR
)
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
System
.
out
.
println
(
cnt
+
" "
+
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
}
}
...
@@ -244,7 +240,6 @@ public class IOTDBFillIT {
...
@@ -244,7 +240,6 @@ public class IOTDBFillIT {
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
System
.
out
.
println
(
ans
);
}
}
statement
.
close
();
statement
.
close
();
...
@@ -260,7 +255,6 @@ public class IOTDBFillIT {
...
@@ -260,7 +255,6 @@ public class IOTDBFillIT {
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
System
.
out
.
println
(
ans
);
}
}
statement
.
close
();
statement
.
close
();
Assert
.
assertEquals
(
retArray1
.
length
,
cnt
);
Assert
.
assertEquals
(
retArray1
.
length
,
cnt
);
...
@@ -312,7 +306,6 @@ public class IOTDBFillIT {
...
@@ -312,7 +306,6 @@ public class IOTDBFillIT {
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
+
","
+
resultSet
.
getString
(
STATUS_STR
)
+
","
+
resultSet
.
getString
(
HARDWARE_STR
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
System
.
out
.
println
(
ans
);
}
}
statement
.
close
();
statement
.
close
();
...
...
iotdb/src/test/java/org/apache/iotdb/db/integration/IOTDBGroupByIT.java
浏览文件 @
24b981ed
...
@@ -274,7 +274,6 @@ public class IOTDBGroupByIT {
...
@@ -274,7 +274,6 @@ public class IOTDBGroupByIT {
+
","
+
resultSet
.
getString
(
min_time
(
"root.ln.wf01.wt01.temperature"
));
+
","
+
resultSet
.
getString
(
min_time
(
"root.ln.wf01.wt01.temperature"
));
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
cnt
++;
cnt
++;
//System.out.println(ans);
}
}
Assert
.
assertEquals
(
retArray2
.
length
,
cnt
);
Assert
.
assertEquals
(
retArray2
.
length
,
cnt
);
statement
.
close
();
statement
.
close
();
...
@@ -331,7 +330,6 @@ public class IOTDBGroupByIT {
...
@@ -331,7 +330,6 @@ public class IOTDBGroupByIT {
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
));
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
));
System
.
out
.
println
(
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
}
}
...
@@ -351,7 +349,6 @@ public class IOTDBGroupByIT {
...
@@ -351,7 +349,6 @@ public class IOTDBGroupByIT {
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
String
ans
=
resultSet
.
getString
(
TIMESTAMP_STR
)
+
","
+
resultSet
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
));
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
));
System
.
out
.
println
(
ans
);
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
cnt
++;
cnt
++;
}
}
...
@@ -423,7 +420,6 @@ public class IOTDBGroupByIT {
...
@@ -423,7 +420,6 @@ public class IOTDBGroupByIT {
+
","
+
resultSet
.
getString
(
min_time
(
"root.ln.wf01.wt01.temperature"
));
+
","
+
resultSet
.
getString
(
min_time
(
"root.ln.wf01.wt01.temperature"
));
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
cnt
++;
cnt
++;
//System.out.println(ans);
}
}
Assert
.
assertEquals
(
retArray2
.
length
,
cnt
);
Assert
.
assertEquals
(
retArray2
.
length
,
cnt
);
statement
.
close
();
statement
.
close
();
...
@@ -468,7 +464,6 @@ public class IOTDBGroupByIT {
...
@@ -468,7 +464,6 @@ public class IOTDBGroupByIT {
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
resultSet
.
getString
(
sum
(
"root.ln.wf01.wt01.temperature"
));
+
resultSet
.
getString
(
sum
(
"root.ln.wf01.wt01.temperature"
));
System
.
out
.
println
(
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray1
[
cnt
],
ans
);
cnt
++;
cnt
++;
}
}
...
@@ -489,7 +484,6 @@ public class IOTDBGroupByIT {
...
@@ -489,7 +484,6 @@ public class IOTDBGroupByIT {
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
.
getString
(
last
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
","
+
resultSet
.
getString
(
first
(
"root.ln.wf01.wt01.temperature"
))
+
","
+
resultSet
.
getString
(
sum
(
"root.ln.wf01.wt01.temperature"
));
+
resultSet
.
getString
(
sum
(
"root.ln.wf01.wt01.temperature"
));
System
.
out
.
println
(
ans
);
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
Assert
.
assertEquals
(
retArray2
[
cnt
],
ans
);
cnt
++;
cnt
++;
}
}
...
...
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBAggregationLargeDataIT.java
浏览文件 @
24b981ed
...
@@ -853,7 +853,6 @@ public class IoTDBAggregationLargeDataIT {
...
@@ -853,7 +853,6 @@ public class IoTDBAggregationLargeDataIT {
}
}
statement
.
execute
(
"flush"
);
statement
.
execute
(
"flush"
);
System
.
out
.
println
(
"cnt = "
+
cnt
);
// insert large amount of data
// insert large amount of data
for
(
int
time
=
3700
;
time
<
4000
;
time
++)
{
for
(
int
time
=
3700
;
time
<
4000
;
time
++)
{
...
@@ -878,10 +877,6 @@ public class IoTDBAggregationLargeDataIT {
...
@@ -878,10 +877,6 @@ public class IoTDBAggregationLargeDataIT {
}
}
// statement.execute("merge");
// statement.execute("merge");
System
.
out
.
println
(
"large insert cnt = "
+
cnt
);
System
.
out
.
println
(
"d0s0sum = "
+
d0s0sum
+
"; d0s1sum = "
+
d0s1sum
+
"; d0s2sum = "
+
d0s2sum
);
for
(
String
sql
:
insertSql
)
{
for
(
String
sql
:
insertSql
)
{
statement
.
execute
(
sql
);
statement
.
execute
(
sql
);
}
}
...
...
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
浏览文件 @
24b981ed
...
@@ -34,12 +34,15 @@ import org.junit.After;
...
@@ -34,12 +34,15 @@ import org.junit.After;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
/**
* Notice that, all test begins with "IoTDB" is integration test. All test which will start the IoTDB server should be
* Notice that, all test begins with "IoTDB" is integration test. All test which will start the IoTDB server should be
* defined as integration test.
* defined as integration test.
*/
*/
public
class
IoTDBAuthorizationIT
{
public
class
IoTDBAuthorizationIT
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
IoTDBAuthorizationIT
.
class
);
private
IoTDB
daemon
;
private
IoTDB
daemon
;
...
@@ -626,9 +629,10 @@ public class IoTDBAuthorizationIT {
...
@@ -626,9 +629,10 @@ public class IoTDBAuthorizationIT {
userStmt
.
executeBatch
();
userStmt
.
executeBatch
();
userStmt
.
clearBatch
();
userStmt
.
clearBatch
();
}
}
System
.
out
.
println
(
if
(
logger
.
isDebugEnabled
())
{
"User inserted "
+
insertCnt
+
" data points used "
+
(
System
.
currentTimeMillis
()
-
time
)
logger
.
debug
(
"User inserted {} data points used {} ms with {} privileges."
,
insertCnt
,
+
" ms with "
+
privilegeCnt
+
" privileges"
);
System
.
currentTimeMillis
()
-
time
,
privilegeCnt
);
}
time
=
System
.
currentTimeMillis
();
time
=
System
.
currentTimeMillis
();
for
(
int
i
=
0
;
i
<
insertCnt
;
)
{
for
(
int
i
=
0
;
i
<
insertCnt
;
)
{
...
@@ -639,10 +643,10 @@ public class IoTDBAuthorizationIT {
...
@@ -639,10 +643,10 @@ public class IoTDBAuthorizationIT {
adminStmt
.
executeBatch
();
adminStmt
.
executeBatch
();
adminStmt
.
clearBatch
();
adminStmt
.
clearBatch
();
}
}
System
.
out
.
println
(
if
(
logger
.
isDebugEnabled
())
{
"admin inserted "
+
insertCnt
+
" data points used "
+
(
System
.
currentTimeMillis
()
-
time
)
logger
.
debug
(
"User inserted {} data points used {} ms with {} privileges."
,
insertCnt
,
+
" ms with "
+
privilegeCnt
+
" privileges"
);
System
.
currentTimeMillis
()
-
time
,
privilegeCnt
);
}
adminCon
.
close
();
adminCon
.
close
();
userCon
.
close
();
userCon
.
close
();
}
}
...
...
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
浏览文件 @
24b981ed
...
@@ -190,7 +190,7 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -190,7 +190,7 @@ public class IoTDBEngineTimeGeneratorIT {
*/
*/
@Test
@Test
public
void
testOneSeriesWithValueAndTimeFilter
()
throws
IOException
,
StorageEngineException
{
public
void
testOneSeriesWithValueAndTimeFilter
()
throws
IOException
,
StorageEngineException
{
System
.
out
.
println
(
"Test >>> root.vehicle.d0.s0 >= 14 && time > 500"
);
//
System.out.println("Test >>> root.vehicle.d0.s0 >= 14 && time > 500");
Path
pd0s0
=
new
Path
(
Constant
.
d0s0
);
Path
pd0s0
=
new
Path
(
Constant
.
d0s0
);
ValueFilter
.
ValueGtEq
valueGtEq
=
ValueFilter
.
gtEq
(
14
);
ValueFilter
.
ValueGtEq
valueGtEq
=
ValueFilter
.
gtEq
(
14
);
...
@@ -216,7 +216,7 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -216,7 +216,7 @@ public class IoTDBEngineTimeGeneratorIT {
*/
*/
@Test
@Test
public
void
testEmptySeriesWithValueFilter
()
throws
IOException
,
StorageEngineException
{
public
void
testEmptySeriesWithValueFilter
()
throws
IOException
,
StorageEngineException
{
System
.
out
.
println
(
"Test >>> root.vehicle.d1.s0 >= 5"
);
//
System.out.println("Test >>> root.vehicle.d1.s0 >= 5");
Path
pd1s0
=
new
Path
(
Constant
.
d1s0
);
Path
pd1s0
=
new
Path
(
Constant
.
d1s0
);
ValueFilter
.
ValueGtEq
valueGtEq
=
ValueFilter
.
gtEq
(
5
);
ValueFilter
.
ValueGtEq
valueGtEq
=
ValueFilter
.
gtEq
(
5
);
...
...
iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSeriesReaderIT.java
浏览文件 @
24b981ed
...
@@ -241,7 +241,7 @@ public class IoTDBSeriesReaderIT {
...
@@ -241,7 +241,7 @@ public class IoTDBSeriesReaderIT {
@Test
@Test
public
void
selectAllTest
()
throws
IOException
,
StorageEngineException
{
public
void
selectAllTest
()
throws
IOException
,
StorageEngineException
{
String
selectSql
=
"select * from root"
;
String
selectSql
=
"select * from root"
;
System
.
out
.
println
(
"Test >>> "
+
selectSql
);
//
System.out.println("Test >>> " + selectSql);
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
...
@@ -273,7 +273,7 @@ public class IoTDBSeriesReaderIT {
...
@@ -273,7 +273,7 @@ public class IoTDBSeriesReaderIT {
public
void
selectOneSeriesWithValueFilterTest
()
throws
IOException
,
StorageEngineException
{
public
void
selectOneSeriesWithValueFilterTest
()
throws
IOException
,
StorageEngineException
{
String
selectSql
=
"select s0 from root.vehicle.d0 where s0 >= 20"
;
String
selectSql
=
"select s0 from root.vehicle.d0 where s0 >= 20"
;
System
.
out
.
println
(
"Test >>> "
+
selectSql
);
//
System.out.println("Test >>> " + selectSql);
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
...
@@ -302,7 +302,7 @@ public class IoTDBSeriesReaderIT {
...
@@ -302,7 +302,7 @@ public class IoTDBSeriesReaderIT {
@Test
@Test
public
void
seriesTimeDigestReadTest
()
throws
IOException
,
StorageEngineException
{
public
void
seriesTimeDigestReadTest
()
throws
IOException
,
StorageEngineException
{
String
selectSql
=
"select s0 from root.vehicle.d0 where time >= 22987"
;
String
selectSql
=
"select s0 from root.vehicle.d0 where time >= 22987"
;
System
.
out
.
println
(
"Test >>> "
+
selectSql
);
//
System.out.println("Test >>> " + selectSql);
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
...
@@ -329,7 +329,7 @@ public class IoTDBSeriesReaderIT {
...
@@ -329,7 +329,7 @@ public class IoTDBSeriesReaderIT {
@Test
@Test
public
void
crossSeriesReadUpdateTest
()
throws
IOException
,
StorageEngineException
{
public
void
crossSeriesReadUpdateTest
()
throws
IOException
,
StorageEngineException
{
System
.
out
.
println
(
"Test >>> select s1 from root.vehicle.d0 where s0 < 111"
);
//
System.out.println("Test >>> select s1 from root.vehicle.d0 where s0 < 111");
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
EngineQueryRouter
engineExecutor
=
new
EngineQueryRouter
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
QueryExpression
queryExpression
=
QueryExpression
.
create
();
Path
path1
=
new
Path
(
Constant
.
d0s0
);
Path
path1
=
new
Path
(
Constant
.
d0s0
);
...
...
iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerImproveTest.java
浏览文件 @
24b981ed
...
@@ -32,8 +32,11 @@ import org.apache.iotdb.tsfile.read.common.Path;
...
@@ -32,8 +32,11 @@ import org.apache.iotdb.tsfile.read.common.Path;
import
org.junit.After
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
MManagerImproveTest
{
public
class
MManagerImproveTest
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
MManagerImproveTest
.
class
);
private
static
final
int
TIMESERIES_NUM
=
1000
;
private
static
final
int
TIMESERIES_NUM
=
1000
;
private
static
final
int
DEVICE_NUM
=
10
;
private
static
final
int
DEVICE_NUM
=
10
;
...
@@ -120,11 +123,11 @@ public class MManagerImproveTest {
...
@@ -120,11 +123,11 @@ public class MManagerImproveTest {
endTime
=
System
.
currentTimeMillis
();
endTime
=
System
.
currentTimeMillis
();
get_seriestype
+=
endTime
-
startTime
;
get_seriestype
+=
endTime
-
startTime
;
System
.
out
.
println
(
"string combine:\t"
+
string_combine
);
logger
.
debug
(
"string combine:\t"
+
string_combine
);
System
.
out
.
println
(
"seriesPath exist:\t"
+
path_exist
);
logger
.
debug
(
"seriesPath exist:\t"
+
path_exist
);
System
.
out
.
println
(
"list init:\t"
+
list_init
);
logger
.
debug
(
"list init:\t"
+
list_init
);
System
.
out
.
println
(
"check file level:\t"
+
check_filelevel
);
logger
.
debug
(
"check file level:\t"
+
check_filelevel
);
System
.
out
.
println
(
"get series type:\t"
+
get_seriestype
);
logger
.
debug
(
"get series type:\t"
+
get_seriestype
);
}
}
public
void
doOriginTest
(
String
deviceId
,
List
<
String
>
measurementList
)
public
void
doOriginTest
(
String
deviceId
,
List
<
String
>
measurementList
)
...
@@ -239,42 +242,42 @@ public class MManagerImproveTest {
...
@@ -239,42 +242,42 @@ public class MManagerImproveTest {
doOriginTest
(
deviceId
,
measurementList
);
doOriginTest
(
deviceId
,
measurementList
);
}
}
endTime
=
System
.
currentTimeMillis
();
endTime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"origin:\t"
+
(
endTime
-
startTime
));
logger
.
debug
(
"origin:\t"
+
(
endTime
-
startTime
));
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
for
(
String
deviceId
:
deviceIdList
)
{
for
(
String
deviceId
:
deviceIdList
)
{
doPathLoopOnceTest
(
deviceId
,
measurementList
);
doPathLoopOnceTest
(
deviceId
,
measurementList
);
}
}
endTime
=
System
.
currentTimeMillis
();
endTime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"seriesPath loop once:\t"
+
(
endTime
-
startTime
));
logger
.
debug
(
"seriesPath loop once:\t"
+
(
endTime
-
startTime
));
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
for
(
String
deviceId
:
deviceIdList
)
{
for
(
String
deviceId
:
deviceIdList
)
{
doDealdeviceIdOnceTest
(
deviceId
,
measurementList
);
doDealdeviceIdOnceTest
(
deviceId
,
measurementList
);
}
}
endTime
=
System
.
currentTimeMillis
();
endTime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"deal deviceId once:\t"
+
(
endTime
-
startTime
));
logger
.
debug
(
"deal deviceId once:\t"
+
(
endTime
-
startTime
));
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
for
(
String
deviceId
:
deviceIdList
)
{
for
(
String
deviceId
:
deviceIdList
)
{
doRemoveListTest
(
deviceId
,
measurementList
);
doRemoveListTest
(
deviceId
,
measurementList
);
}
}
endTime
=
System
.
currentTimeMillis
();
endTime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"remove list:\t"
+
(
endTime
-
startTime
));
logger
.
debug
(
"remove list:\t"
+
(
endTime
-
startTime
));
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
for
(
String
deviceId
:
deviceIdList
)
{
for
(
String
deviceId
:
deviceIdList
)
{
doAllImproveTest
(
deviceId
,
measurementList
);
doAllImproveTest
(
deviceId
,
measurementList
);
}
}
endTime
=
System
.
currentTimeMillis
();
endTime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"improve all:\t"
+
(
endTime
-
startTime
));
logger
.
debug
(
"improve all:\t"
+
(
endTime
-
startTime
));
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
for
(
String
deviceId
:
deviceIdList
)
{
for
(
String
deviceId
:
deviceIdList
)
{
doCacheTest
(
deviceId
,
measurementList
);
doCacheTest
(
deviceId
,
measurementList
);
}
}
endTime
=
System
.
currentTimeMillis
();
endTime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"add cache:\t"
+
(
endTime
-
startTime
));
logger
.
debug
(
"add cache:\t"
+
(
endTime
-
startTime
));
}
}
@After
@After
...
...
iotdb/src/test/java/org/apache/iotdb/db/metadata/MTreeTest.java
浏览文件 @
24b981ed
...
@@ -117,7 +117,6 @@ public class MTreeTest {
...
@@ -117,7 +117,6 @@ public class MTreeTest {
assertEquals
(
"root.a.d1.s0"
,
result
.
get
(
"root.a.d1"
).
get
(
0
));
assertEquals
(
"root.a.d1.s0"
,
result
.
get
(
"root.a.d1"
).
get
(
0
));
assertTrue
(
result
.
containsKey
(
"root.a.d0"
));
assertTrue
(
result
.
containsKey
(
"root.a.d0"
));
assertEquals
(
"root.a.d0.s0"
,
result
.
get
(
"root.a.d0"
).
get
(
0
));
assertEquals
(
"root.a.d0.s0"
,
result
.
get
(
"root.a.d0"
).
get
(
0
));
System
.
out
.
println
(
result
);
result
=
root
.
getAllPath
(
"root.a.*.*.s0"
);
result
=
root
.
getAllPath
(
"root.a.*.*.s0"
);
assertTrue
(
result
.
containsKey
(
"root.a.b.d0"
));
assertTrue
(
result
.
containsKey
(
"root.a.b.d0"
));
...
...
iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
浏览文件 @
24b981ed
...
@@ -93,7 +93,6 @@ public class PhysicalPlanTest {
...
@@ -93,7 +93,6 @@ public class PhysicalPlanTest {
String
sql
=
"grant role xm privileges 'SET_STORAGE_GROUP','DELETE_TIMESERIES' on root.vehicle.d1.s1"
;
String
sql
=
"grant role xm privileges 'SET_STORAGE_GROUP','DELETE_TIMESERIES' on root.vehicle.d1.s1"
;
QueryProcessor
processor
=
new
QueryProcessor
(
new
MemIntQpExecutor
());
QueryProcessor
processor
=
new
QueryProcessor
(
new
MemIntQpExecutor
());
AuthorPlan
plan
=
(
AuthorPlan
)
processor
.
parseSQLToPhysicalPlan
(
sql
);
AuthorPlan
plan
=
(
AuthorPlan
)
processor
.
parseSQLToPhysicalPlan
(
sql
);
System
.
out
.
println
(
plan
.
toString
());
assertEquals
(
assertEquals
(
"userName: null\n"
+
"roleName: xm\n"
+
"password: null\n"
+
"newPassword: null\n"
"userName: null\n"
+
"roleName: xm\n"
+
"password: null\n"
+
"newPassword: null\n"
+
"permissions: [0, 5]\n"
+
"nodeName: root.vehicle.d1.s1\n"
+
"authorType: GRANT_ROLE"
,
+
"permissions: [0, 5]\n"
+
"nodeName: root.vehicle.d1.s1\n"
+
"authorType: GRANT_ROLE"
,
...
...
iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java
浏览文件 @
24b981ed
...
@@ -105,7 +105,7 @@ public class IoTDBLogFileSizeTest {
...
@@ -105,7 +105,7 @@ public class IoTDBLogFileSizeTest {
Statement
statement
=
connection
.
createStatement
();
Statement
statement
=
connection
.
createStatement
();
while
(
true
)
{
while
(
true
)
{
if
(
Thread
.
interrupted
())
{
if
(
Thread
.
interrupted
())
{
System
.
out
.
println
(
"Exit after "
+
cnt
+
" insertion"
);
//
System.out.println("Exit after " + cnt + " insertion");
break
;
break
;
}
}
String
sql
=
String
.
format
(
String
sql
=
String
.
format
(
...
@@ -139,9 +139,6 @@ public class IoTDBLogFileSizeTest {
...
@@ -139,9 +139,6 @@ public class IoTDBLogFileSizeTest {
while
(
writeThread
.
isAlive
())
{
while
(
writeThread
.
isAlive
())
{
}
}
System
.
out
.
println
(
"Max size of seq wal is "
+
MemUtils
.
bytesCntToStr
(
maxLength
[
0
])
+
" after "
+
runtime
+
"ms continuous writing"
);
}
}
@Test
@Test
...
@@ -165,7 +162,7 @@ public class IoTDBLogFileSizeTest {
...
@@ -165,7 +162,7 @@ public class IoTDBLogFileSizeTest {
Statement
statement
=
connection
.
createStatement
();
Statement
statement
=
connection
.
createStatement
();
while
(
true
)
{
while
(
true
)
{
if
(
Thread
.
interrupted
())
{
if
(
Thread
.
interrupted
())
{
System
.
out
.
println
(
"Exit after "
+
cnt
+
" insertion"
);
//
System.out.println("Exit after " + cnt + " insertion");
break
;
break
;
}
}
String
sql
=
String
String
sql
=
String
...
@@ -199,9 +196,6 @@ public class IoTDBLogFileSizeTest {
...
@@ -199,9 +196,6 @@ public class IoTDBLogFileSizeTest {
while
(
writeThread
.
isAlive
())
{
while
(
writeThread
.
isAlive
())
{
}
}
System
.
out
.
println
(
"Max size of unsequence wal is "
+
MemUtils
.
bytesCntToStr
(
maxLength
[
0
])
+
" after "
+
runtime
+
"ms continuous writing"
);
}
}
private
void
executeSQL
(
String
[]
sqls
)
throws
ClassNotFoundException
,
SQLException
{
private
void
executeSQL
(
String
[]
sqls
)
throws
ClassNotFoundException
,
SQLException
{
...
...
iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java
浏览文件 @
24b981ed
...
@@ -95,7 +95,7 @@ public class PerformanceTest {
...
@@ -95,7 +95,7 @@ public class PerformanceTest {
logNode
.
write
(
deletePlan
);
logNode
.
write
(
deletePlan
);
}
}
logNode
.
forceSync
();
logNode
.
forceSync
();
System
.
out
.
println
(
"forceWalPeriodInMs = "
+
config
.
getForceWalPeriodInMs
());
System
.
out
.
println
(
System
.
out
.
println
(
3000000
+
" logs use "
+
(
System
.
currentTimeMillis
()
-
time
)
+
" ms at batch size "
3000000
+
" logs use "
+
(
System
.
currentTimeMillis
()
-
time
)
+
" ms at batch size "
+
config
.
getFlushWalThreshold
());
+
config
.
getFlushWalThreshold
());
...
...
tsfile/src/test/java/org/apache/iotdb/tsfile/compress/SnappyTest.java
浏览文件 @
24b981ed
...
@@ -79,7 +79,6 @@ public class SnappyTest {
...
@@ -79,7 +79,6 @@ public class SnappyTest {
.
allocateDirect
(
Snappy
.
uncompressedLength
(
compressed
)
+
1
);
.
allocateDirect
(
Snappy
.
uncompressedLength
(
compressed
)
+
1
);
Snappy
.
uncompress
(
compressed
,
uncompressedByteBuffer
);
Snappy
.
uncompress
(
compressed
,
uncompressedByteBuffer
);
System
.
out
.
println
(
"decompression time cost:"
+
(
System
.
currentTimeMillis
()
-
time
));
System
.
out
.
println
(
"decompression time cost:"
+
(
System
.
currentTimeMillis
()
-
time
));
System
.
out
.
println
(
uncompressedByteBuffer
.
remaining
());
assert
input
.
equals
(
ReadWriteIOUtils
.
readStringFromDirectByteBuffer
(
uncompressedByteBuffer
));
assert
input
.
equals
(
ReadWriteIOUtils
.
readStringFromDirectByteBuffer
(
uncompressedByteBuffer
));
}
}
...
...
tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java
浏览文件 @
24b981ed
...
@@ -46,7 +46,6 @@ public class DeltaBinaryEncoderIntegerTest {
...
@@ -46,7 +46,6 @@ public class DeltaBinaryEncoderIntegerTest {
@Test
@Test
public
void
testBasic
()
throws
IOException
{
public
void
testBasic
()
throws
IOException
{
System
.
out
.
println
(
"write basic"
);
int
data
[]
=
new
int
[
ROW_NUM
];
int
data
[]
=
new
int
[
ROW_NUM
];
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
data
[
i
]
=
i
*
i
;
data
[
i
]
=
i
*
i
;
...
@@ -56,7 +55,6 @@ public class DeltaBinaryEncoderIntegerTest {
...
@@ -56,7 +55,6 @@ public class DeltaBinaryEncoderIntegerTest {
@Test
@Test
public
void
testBoundInt
()
throws
IOException
{
public
void
testBoundInt
()
throws
IOException
{
System
.
out
.
println
(
"write bounded int"
);
int
data
[]
=
new
int
[
ROW_NUM
];
int
data
[]
=
new
int
[
ROW_NUM
];
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
boundInt
(
i
,
data
);
boundInt
(
i
,
data
);
...
@@ -64,7 +62,6 @@ public class DeltaBinaryEncoderIntegerTest {
...
@@ -64,7 +62,6 @@ public class DeltaBinaryEncoderIntegerTest {
}
}
private
void
boundInt
(
int
power
,
int
[]
data
)
throws
IOException
{
private
void
boundInt
(
int
power
,
int
[]
data
)
throws
IOException
{
System
.
out
.
println
(
"the bound of 2 power:"
+
power
);
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
data
[
i
]
=
ran
.
nextInt
((
int
)
Math
.
pow
(
2
,
power
));
data
[
i
]
=
ran
.
nextInt
((
int
)
Math
.
pow
(
2
,
power
));
}
}
...
@@ -73,7 +70,6 @@ public class DeltaBinaryEncoderIntegerTest {
...
@@ -73,7 +70,6 @@ public class DeltaBinaryEncoderIntegerTest {
@Test
@Test
public
void
testRandom
()
throws
IOException
{
public
void
testRandom
()
throws
IOException
{
System
.
out
.
println
(
"write random"
);
int
data
[]
=
new
int
[
ROW_NUM
];
int
data
[]
=
new
int
[
ROW_NUM
];
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
data
[
i
]
=
ran
.
nextInt
();
data
[
i
]
=
ran
.
nextInt
();
...
@@ -83,7 +79,6 @@ public class DeltaBinaryEncoderIntegerTest {
...
@@ -83,7 +79,6 @@ public class DeltaBinaryEncoderIntegerTest {
@Test
@Test
public
void
testMaxMin
()
throws
IOException
{
public
void
testMaxMin
()
throws
IOException
{
System
.
out
.
println
(
"write maxmin"
);
int
data
[]
=
new
int
[
ROW_NUM
];
int
data
[]
=
new
int
[
ROW_NUM
];
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
for
(
int
i
=
0
;
i
<
ROW_NUM
;
i
++)
{
data
[
i
]
=
(
i
&
1
)
==
0
?
Integer
.
MAX_VALUE
:
Integer
.
MIN_VALUE
;
data
[
i
]
=
(
i
&
1
)
==
0
?
Integer
.
MAX_VALUE
:
Integer
.
MIN_VALUE
;
...
@@ -99,11 +94,11 @@ public class DeltaBinaryEncoderIntegerTest {
...
@@ -99,11 +94,11 @@ public class DeltaBinaryEncoderIntegerTest {
}
}
private
void
shouldReadAndWrite
(
int
[]
data
,
int
length
)
throws
IOException
{
private
void
shouldReadAndWrite
(
int
[]
data
,
int
length
)
throws
IOException
{
System
.
out
.
println
(
"source data size:"
+
4
*
length
+
" byte"
);
//
System.out.println("source data size:" + 4 * length + " byte");
out
=
new
ByteArrayOutputStream
();
out
=
new
ByteArrayOutputStream
();
writeData
(
data
,
length
);
writeData
(
data
,
length
);
byte
[]
page
=
out
.
toByteArray
();
byte
[]
page
=
out
.
toByteArray
();
System
.
out
.
println
(
"encoding data size:"
+
page
.
length
+
" byte"
);
//
System.out.println("encoding data size:" + page.length + " byte");
buffer
=
ByteBuffer
.
wrap
(
page
);
buffer
=
ByteBuffer
.
wrap
(
page
);
int
i
=
0
;
int
i
=
0
;
while
(
reader
.
hasNext
(
buffer
))
{
while
(
reader
.
hasNext
(
buffer
))
{
...
...
tsfile/src/test/java/org/apache/iotdb/tsfile/utils/BytesUtilsTest.java
浏览文件 @
24b981ed
...
@@ -284,7 +284,6 @@ public class BytesUtilsTest {
...
@@ -284,7 +284,6 @@ public class BytesUtilsTest {
@Test
@Test
public
void
testLongToBytesWithWidth
()
{
public
void
testLongToBytesWithWidth
()
{
System
.
out
.
println
();
int
bitLen
=
42
;
int
bitLen
=
42
;
long
basic
=
(
1
<<
30
)
*
2
l
;
long
basic
=
(
1
<<
30
)
*
2
l
;
long
b1
=
(
1
<<
(
bitLen
%
32
))
*
basic
+
r
.
nextInt
();
long
b1
=
(
1
<<
(
bitLen
%
32
))
*
basic
+
r
.
nextInt
();
...
...
tsfile/src/test/java/org/apache/iotdb/tsfile/write/WriteTest.java
浏览文件 @
24b981ed
...
@@ -222,7 +222,6 @@ public class WriteTest {
...
@@ -222,7 +222,6 @@ public class WriteTest {
strings
=
getNextRecord
(
lineCount
,
stageState
);
strings
=
getNextRecord
(
lineCount
,
stageState
);
for
(
String
str
:
strings
)
{
for
(
String
str
:
strings
)
{
TSRecord
record
=
RecordUtils
.
parseSimpleTupleRecord
(
str
,
schema
);
TSRecord
record
=
RecordUtils
.
parseSimpleTupleRecord
(
str
,
schema
);
System
.
out
.
println
(
str
);
tsFileWriter
.
write
(
record
);
tsFileWriter
.
write
(
record
);
}
}
lineCount
++;
lineCount
++;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录