You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by li...@apache.org on 2019/06/13 09:45:40 UTC
[incubator-iotdb] 01/01: test NativeRestorableIOWriter
This is an automated email from the ASF dual-hosted git repository.
liurui pushed a commit to branch test_fix_nativeRestoreTsFileWriter_if_file_is_complete
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit 34c3a5f6eb1133699357b0512d68236575af07b2
Author: liuruiyiyang <24...@qq.com>
AuthorDate: Thu Jun 13 17:45:11 2019 +0800
test NativeRestorableIOWriter
---
.../iotdb/tsfile/write/writer/NativeRestorableIOWriter.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriter.java
index 9281ff7..b59682a 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriter.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriter.java
@@ -122,4 +122,17 @@ public class NativeRestorableIOWriter extends TsFileIOWriter {
public void endFile() throws IOException {
super.endFile(new FileSchema(knownSchemas));
}
+
+ public static void main(String[] args) {
+ String path = args[0];
+ String append = args[1];
+ try {
+ long start = System.currentTimeMillis();
+ new NativeRestorableIOWriter(new File(path), Boolean.parseBoolean(append));
+ long elapse = System.currentTimeMillis() - start;
+ System.out.println("new NativeRestorableIOWriter cost " + elapse + " ms");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
}