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 2019/05/13 10:42:58 UTC

[incubator-iotdb] branch master updated: change print to log (#176)

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 451e87d  change print to log (#176)
451e87d is described below

commit 451e87d4d55c191ed9a1868e7bc412b6841d2b93
Author: RUI, LEI <33...@users.noreply.github.com>
AuthorDate: Mon May 13 18:42:53 2019 +0800

    change print to log (#176)
---
 .../apache/iotdb/tsfile/read/ReadInPartitionTest.java | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadInPartitionTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadInPartitionTest.java
index a7cc8d9..a0d1bbf 100644
--- a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadInPartitionTest.java
+++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadInPartitionTest.java
@@ -39,23 +39,26 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ReadInPartitionTest {
 
   private static final String FILE_PATH = TsFileGeneratorForTest.outputDataFile;
   private TsFileSequenceReader reader;
   private static ReadOnlyTsFile roTsFile = null;
+  private static final Logger LOG = LoggerFactory.getLogger(ReadInPartitionTest.class);
 
   @Before
   public void before() throws InterruptedException, WriteProcessException, IOException {
     TsFileGeneratorForTest.generateFile(1000000, 1024 * 1024, 10000);
     reader = new TsFileSequenceReader(FILE_PATH);
 
-    System.out.println("file length: " + new File(FILE_PATH).length());
-    System.out.println("file magic head: " + reader.readHeadMagic());
-    System.out.println("file magic tail: " + reader.readTailMagic());
-    System.out.println("Level 1 metadata position: " + reader.getFileMetadataPos());
-    System.out.println("Level 1 metadata size: " + reader.getFileMetadataPos());
+    LOG.info("file length: {}", new File(FILE_PATH).length());
+    LOG.info("file magic head: {}", reader.readHeadMagic());
+    LOG.info("file magic tail: {}", reader.readTailMagic());
+    LOG.info("Level 1 metadata position: {}", reader.getFileMetadataPos());
+    LOG.info("Level 1 metadata size: {}", reader.getFileMetadataPos());
     TsFileMetaData metaData = reader.readFileMetadata();
     System.out.println("[Metadata]");
     List<TsDeviceMetadataIndex> deviceMetadataIndexList = metaData.getDeviceMap().values().stream()
@@ -64,9 +67,9 @@ public class ReadInPartitionTest {
       TsDeviceMetadata deviceMetadata = reader.readTsDeviceMetaData(index);
       List<ChunkGroupMetaData> chunkGroupMetaDataList = deviceMetadata.getChunkGroupMetaDataList();
       for (ChunkGroupMetaData chunkGroupMetaData : chunkGroupMetaDataList) {
-        System.out.println(String
-            .format("\t[Device]Device %s", chunkGroupMetaData.getDeviceID()));
-        System.out.println("chunkGroupMetaData.start: "+chunkGroupMetaData.getStartOffsetOfChunkGroup()+" ,end: "+
+        LOG.info("t[Device]Device:{}", chunkGroupMetaData.getDeviceID());
+        LOG.info("chunkGroupMetaData.start:{}, end:{}",
+            chunkGroupMetaData.getStartOffsetOfChunkGroup(),
             chunkGroupMetaData.getEndOffsetOfChunkGroup());
 
 //        for (ChunkMetaData chunkMetadata : chunkGroupMetaData.getChunkMetaDataList()) {