samperson1997 commented on a change in pull request #1100:
URL: https://github.com/apache/incubator-iotdb/pull/1100#discussion_r415343387
##########
File path:
tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsFileMetadata.java
##########
@@ -123,10 +124,11 @@ public int serializeTo(OutputStream outputStream) throws
IOException {
// deviceMetadataIndex
if (deviceMetadataIndex != null) {
byteLen += ReadWriteIOUtils.write(deviceMetadataIndex.size(),
outputStream);
- for (Map.Entry<String, Pair<Long, Integer>> entry :
deviceMetadataIndex.entrySet()) {
- byteLen += ReadWriteIOUtils.write(entry.getKey(), outputStream);
- byteLen += ReadWriteIOUtils.write(entry.getValue().left, outputStream);
- byteLen += ReadWriteIOUtils.write(entry.getValue().right,
outputStream);
+ for (MetadataIndex metadataIndex : deviceMetadataIndex) {
+ byteLen += ReadWriteIOUtils.write(metadataIndex.getName(),
outputStream);
+ byteLen += ReadWriteIOUtils.write(metadataIndex.getOffset(),
outputStream);
+ byteLen += ReadWriteIOUtils
+ .write(metadataIndex.getChildMetadataIndexType().serialize(),
outputStream);
Review comment:
Replaced
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]