You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/04/07 09:27:38 UTC
[incubator-iotdb] branch master updated: change file writer open
log to debug level
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 4a2c5b0 change file writer open log to debug level
4a2c5b0 is described below
commit 4a2c5b0d860ffb844dcdfa4875e849274922692f
Author: qiaojialin <64...@qq.com>
AuthorDate: Tue Apr 7 17:27:24 2020 +0800
change file writer open log to debug level
---
.../iotdb/tsfile/write/writer/TsFileIOWriter.java | 23 +++++++++-------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java
index a8146c8..658297e 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java
@@ -100,8 +100,8 @@ public class TsFileIOWriter {
public TsFileIOWriter(File file) throws IOException {
this.out = new DefaultTsFileOutput(file);
this.file = file;
- if (resourceLogger.isInfoEnabled()) {
- resourceLogger.info("{} writer is opened.", file.getName());
+ if (resourceLogger.isDebugEnabled()) {
+ resourceLogger.debug("{} writer is opened.", file.getName());
}
startFile();
}
@@ -135,7 +135,9 @@ public class TsFileIOWriter {
public void startChunkGroup(String deviceId) throws IOException {
this.currentChunkGroupDeviceId = deviceId;
currentChunkGroupStartOffset = out.getPosition();
- logger.debug("start chunk group:{}, file position {}", deviceId, out.getPosition());
+ if (logger.isDebugEnabled()) {
+ logger.debug("start chunk group:{}, file position {}", deviceId, out.getPosition());
+ }
chunkMetadataList = new ArrayList<>();
}
@@ -151,7 +153,6 @@ public class TsFileIOWriter {
chunkMetadataList.size());
chunkGroupFooter.serializeTo(out.wrapAsStream());
chunkGroupMetadataList.add(new ChunkGroupMetadata(currentChunkGroupDeviceId, chunkMetadataList));
- logger.debug("end chunk group:{}", chunkMetadataList);
currentChunkGroupDeviceId = null;
chunkMetadataList = null;
}
@@ -176,18 +177,10 @@ public class TsFileIOWriter {
out.getPosition(),
statistics);
- // flush ChunkHeader to TsFileIOWriter
- if (logger.isDebugEnabled()) {
- logger.debug("start series chunk:{}, file position {}", measurementSchema, out.getPosition());
- }
-
ChunkHeader header = new ChunkHeader(measurementSchema.getMeasurementId(), dataSize, tsDataType,
compressionCodecName, encodingType, numOfPages);
header.serializeTo(out.wrapAsStream());
- if (logger.isDebugEnabled()) {
- logger.debug("finish series chunk:{} header, file position {}", header, out.getPosition());
- }
}
/**
@@ -201,8 +194,10 @@ public class TsFileIOWriter {
chunkHeader.serializeTo(out.wrapAsStream());
out.write(chunk.getData());
endCurrentChunk();
- logger.debug("end flushing a chunk:{}, totalvalue:{}", currentChunkMetadata,
- chunkMetadata.getNumOfPoints());
+ if (logger.isDebugEnabled()) {
+ logger.debug("end flushing a chunk:{}, totalvalue:{}", currentChunkMetadata,
+ chunkMetadata.getNumOfPoints());
+ }
}
/**