Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Iotdb
提交
c3def622
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,发现更多精彩内容 >>
提交
c3def622
编写于
1月 25, 2019
作者:
L
lta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reimplement postback based on new tsfile structure
上级
ade75b0f
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
636 addition
and
670 deletion
+636
-670
iotdb/pom.xml
iotdb/pom.xml
+0
-27
iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java
...iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java
+1
-1
iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java
...pache/iotdb/db/engine/overflow/ioV2/OverflowResource.java
+1
-1
iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerServiceImpl.java
.../apache/iotdb/db/postback/receiver/ServerServiceImpl.java
+624
-631
iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriterTest.java
...b/db/engine/bufferwrite/RestorableTsFileIOWriterTest.java
+2
-2
tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadata.java
...g/apache/iotdb/tsfile/file/metadata/TsDeviceMetadata.java
+1
-1
tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java
...tdb/tsfile/read/controller/MetadataQuerierByFileImpl.java
+2
-2
tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/Utils.java
...va/org/apache/iotdb/tsfile/file/metadata/utils/Utils.java
+5
-5
未找到文件。
iotdb/pom.xml
浏览文件 @
c3def622
...
...
@@ -53,33 +53,6 @@
<version>
${project.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
cn.edu.fudan.dsm
</groupId>
<artifactId>
kvmatch-iotdb
</artifactId>
<version>
1.0.3
</version>
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
<exclusion>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.apache.iotdb
</groupId>
<artifactId>
tsfile
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-collections4
</artifactId>
...
...
iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java
浏览文件 @
c3def622
...
...
@@ -202,7 +202,7 @@ public class RestorableTsFileIOWriter extends TsFileIOWriter {
randomAccessFile
.
read
(
thriftBytes
);
ByteArrayInputStream
inputStream
=
new
ByteArrayInputStream
(
thriftBytes
);
TsDeviceMetadata
tsDeviceMetadata
=
TsDeviceMetadata
.
deserializeFrom
(
inputStream
);
groupMetaDatas
.
addAll
(
tsDeviceMetadata
.
getChunkGroup
s
());
groupMetaDatas
.
addAll
(
tsDeviceMetadata
.
getChunkGroup
MetaDataList
());
point
=
randomAccessFile
.
getFilePointer
();
}
// read the tsfile position information using byte[8] which is a long.
...
...
iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java
浏览文件 @
c3def622
...
...
@@ -142,7 +142,7 @@ public class OverflowResource {
insertIO
.
getReader
().
position
(
position
-
FOOTER_LENGTH
-
metadataLength
-
POS_LENGTH
);
insertIO
.
getReader
().
read
(
bytesPosition
,
0
,
POS_LENGTH
);
position
=
BytesUtils
.
bytesToLong
(
bytesPosition
);
for
(
ChunkGroupMetaData
rowGroupMetaData
:
tsDeviceMetadata
.
getChunkGroup
s
())
{
for
(
ChunkGroupMetaData
rowGroupMetaData
:
tsDeviceMetadata
.
getChunkGroup
MetaDataList
())
{
String
deviceId
=
rowGroupMetaData
.
getDeviceID
();
if
(!
insertMetadatas
.
containsKey
(
deviceId
))
{
insertMetadatas
.
put
(
deviceId
,
new
HashMap
<>());
...
...
iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerServiceImpl.java
浏览文件 @
c3def622
此差异已折叠。
点击以展开。
iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriterTest.java
浏览文件 @
c3def622
...
...
@@ -178,7 +178,7 @@ public class RestorableTsFileIOWriterTest {
assertEquals
(
2
,
metaData
.
getDeviceMap
().
size
());
List
<
ChunkGroupMetaData
>
chunkGroups
=
reader
.
readTsDeviceMetaData
(
metaData
.
getDeviceMap
().
get
(
"d1"
))
.
getChunkGroup
s
();
.
getChunkGroup
MetaDataList
();
assertEquals
(
1
,
chunkGroups
.
size
());
List
<
ChunkMetaData
>
chunks
=
chunkGroups
.
get
(
0
).
getChunkMetaDataList
();
...
...
@@ -192,7 +192,7 @@ public class RestorableTsFileIOWriterTest {
assertEquals
(
chunks
.
get
(
1
).
getEndTime
(),
3
);
assertEquals
(
chunks
.
get
(
1
).
getNumOfPoints
(),
2
);
chunkGroups
=
reader
.
readTsDeviceMetaData
(
metaData
.
getDeviceMap
().
get
(
"d2"
)).
getChunkGroup
s
();
chunkGroups
=
reader
.
readTsDeviceMetaData
(
metaData
.
getDeviceMap
().
get
(
"d2"
)).
getChunkGroup
MetaDataList
();
assertEquals
(
1
,
chunkGroups
.
size
());
chunks
=
chunkGroups
.
get
(
0
).
getChunkMetaDataList
();
assertEquals
(
1
,
chunks
.
size
());
...
...
tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadata.java
浏览文件 @
c3def622
...
...
@@ -143,7 +143,7 @@ public class TsDeviceMetadata {
}
}
public
List
<
ChunkGroupMetaData
>
getChunkGroup
s
()
{
public
List
<
ChunkGroupMetaData
>
getChunkGroup
MetaDataList
()
{
return
Collections
.
unmodifiableList
(
chunkGroupMetadataList
);
}
...
...
tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java
浏览文件 @
c3def622
...
...
@@ -104,7 +104,7 @@ public class MetadataQuerierByFileImpl implements MetadataQuerier {
// d1
for
(
ChunkGroupMetaData
chunkGroupMetaData
:
tsDeviceMetadata
.
getChunkGroup
s
())
{
// TODO make this function
.
getChunkGroup
MetaDataList
())
{
// TODO make this function
// better
if
(
enough
)
{
...
...
@@ -159,7 +159,7 @@ public class MetadataQuerierByFileImpl implements MetadataQuerier {
// get all ChunkMetaData of this path included in all ChunkGroups of this device
List
<
ChunkMetaData
>
chunkMetaDataList
=
new
ArrayList
<>();
for
(
ChunkGroupMetaData
chunkGroupMetaData
:
tsDeviceMetadata
.
getChunkGroup
s
())
{
for
(
ChunkGroupMetaData
chunkGroupMetaData
:
tsDeviceMetadata
.
getChunkGroup
MetaDataList
())
{
List
<
ChunkMetaData
>
chunkMetaDataListInOneChunkGroup
=
chunkGroupMetaData
.
getChunkMetaDataList
();
for
(
ChunkMetaData
chunkMetaData
:
chunkMetaDataListInOneChunkGroup
)
{
...
...
tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/Utils.java
浏览文件 @
c3def622
...
...
@@ -137,12 +137,12 @@ public class Utils {
assertEquals
(
metadata1
.
getStartTime
(),
metadata2
.
getStartTime
());
assertEquals
(
metadata1
.
getEndTime
(),
metadata2
.
getEndTime
());
if
(
Utils
.
isTwoObjectsNotNULL
(
metadata1
.
getChunkGroup
s
(),
metadata2
.
getChunkGroups
(),
if
(
Utils
.
isTwoObjectsNotNULL
(
metadata1
.
getChunkGroup
MetaDataList
(),
metadata2
.
getChunkGroupMetaDataList
(),
"Rowgroup metadata list"
))
{
assertEquals
(
metadata1
.
getChunkGroup
s
().
size
(),
metadata2
.
getChunkGroups
().
size
());
for
(
int
i
=
0
;
i
<
metadata1
.
getChunkGroup
s
().
size
();
i
++)
{
Utils
.
isChunkGroupMetaDataEqual
(
metadata1
.
getChunkGroup
s
().
get
(
i
),
metadata1
.
getChunkGroup
s
().
get
(
i
));
assertEquals
(
metadata1
.
getChunkGroup
MetaDataList
().
size
(),
metadata2
.
getChunkGroupMetaDataList
().
size
());
for
(
int
i
=
0
;
i
<
metadata1
.
getChunkGroup
MetaDataList
().
size
();
i
++)
{
Utils
.
isChunkGroupMetaDataEqual
(
metadata1
.
getChunkGroup
MetaDataList
().
get
(
i
),
metadata1
.
getChunkGroup
MetaDataList
().
get
(
i
));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录