[IOTDB-5254][IOTDB-5251] BUG FIX (#10)

11 files changed
tree: 82bc051f37b11153d1d67f22bf63c42780eb7d7f
  1. imgs/
  2. tsfile-viewer-core/
  3. tsfile-viewer-web/
  4. tsfile-viewer-web-frontend/
  5. .asf.yaml
  6. .gitignore
  7. LICENSE
  8. LICENSE-binary
  9. NOTICE
  10. NOTICE-binary
  11. pom.xml
  12. README.md
README.md

iotdb-tsfile-viewer

Outline

Introduction

tsfile-viewer is a tool to view TSFILE. Currently, we support bit granularity parsing of TsFile and provide visual display.
we have three modules in the project

  • tsfile-viewer-core: core jar package project
  • tsfile-viewer-web: web viewer backend,When you execute the mvn install command in the parent project, it will package the front-end project code together
  • tsfile-viewer-web-frontend: web viewer frontend
  1. overview: This tool can Clearly display information of each part of TsFile, details are as follows:

    1. The versionNumber.

    2. The data layer: contains details of each level and statistic information.

      i. ChunkGroup

      ii. Chunk

      iii. Page

      iv. Point

    3. The index layer: displayed in a tree like structure then you can easily view the overall structure of the secondary index(entity and measurement granularity).

  2. Timeseries and measurement search: In addition to displaying data, we also provide the function of querying TimeSeries by keyword. There is a linkage between the index layer and the data layer, it can quickly locate the desired TimeSeries with details.

Quick Start

Prerequisites

To use the tool, you need to have:

  1. Java >= 1.8
  2. Maven >= 3.6

Of course, you will also notice that there is a front-end project in the project. When you execute the mvn install command, the project will download its corresponding environment, and you don't have to configure the environment separately for it.

Compile

You can download the source code from:

git@github.com:apache/iotdb-tsfile-viewer.git
https://github.com/apache/iotdb-tsfile-viewer.git

Under the root path of iotdb-tsfile-viewer:

mvn clean install

then you can start this tool in the tsfile-viewer-web project you can add ‘-Dfile.endoding=utf8’ command to avoid some Chinese garbled problems,mainly to solve the situation that some device names in the tsfile file contain Chinese

java -jar iotdb-tsfile-viewer-web-0.13.2-SNAPSHOT.jar
java -Dfile.endoding=utf8 -jar iotdb-tsfile-viewer-web-0.13.2-SNAPSHOT.jar

you can also specify a configuration file through the ‘--spring.config.location=./data/application.yml’ command

java -jar iotdb-tsfile-viewer-web-0.13.2-SNAPSHOT.jar --spring.config.location=./data/application.yml

The default url is

http://localhost:8080/

You can modify the port through the file

iotdb-tsfile-viewer\tsfile-viewer-web-frontend\config\config.js
tsfile-viewer-web\src\main\resources\application.yml

You can specify the parent folder location for tsfiles

tsfile-viewer-web\src\main\resources\application.yml

tsviewer:
  web:
     baseDirectory: C:\Users\Administrator\Desktop\

The system can load up to 5 tsfile files by default, you can modify this value through application.yml

tsfile-viewer-web\src\main\resources\application.yml

tsviewer:
  web:
     containerSize: 5

User Guide

When you visit http://locallhost:8080, you will get the following page.
image

  • 1 you can get some tips when your mouse over this icon
  • 2 multilingual switching
  • 3 file management,when you click this button, you will get the following page.

image

  • 1 click to change the directory
  • 2 the status of the files
  • 3 get the loaded files
  • 4 the operation, open a tsfile, when the file loaded success, you will get the following page.

image

  • 1 ChunkGroups
  • 2 TimeseriesIndexs
  • 3 IndexOfTimeseriesIndexs

The white blocks are clickable, when you click on them, their corresponding simple information will be displayed on the right.
You can get more infos by click the ‘more info’ block.

image

  • 1 the ChunkGroups,the name is the device name
  • 2 the brief info of a ChunkGroup
  • 3 click here to get the Chunks info of a ChunkGroup image

Click the page node to get pageData.

image

The TimeseriesIndexs is used similarly to ChunkGroups

image

Display the index structure in the form of a tree

image

image

Data Search function:
image

Build Docker Image

There is a dockerfile in tsfile-viewer-web, through which you can easily build a docker image.
After you have successfully executed the ‘mvn clean install’ command,enter the tsfile-viewer-web project and execute the following command

docker build -t iotdb-tsfile-viewer:0.13.2-SNAPSHOT .
docker run --volume=D:\tsfile:/tsfile -p 8080:8080 -d iotdb-tsfile-viewer:0.13.2-SNAPSHOT

docker.yml is the corresponding configuration file in docker image. If you want to modify the folder path of tsfile, you need to modify docker.yml, dockerfile and the --volume parameter of the dock run command.

Maintainers

Contributing

Feel free to dive in! Open an issue or submit PRs.

Contributors

This project exists thanks to all the people who contribute.

FAQ Summary

  • 1 After the project is cloned, use mvn clean install to report a spotless exception; usually found on windows, the reason is that when git clones the project on windows, LF will be converted to CRLF, in this case, execute the mvn spotless:apply command to solve the problem
  • 2 Some front-end components cannot be downloaded, enter the tsfile-viewer-web-frontend project, enter the node folder, and execute the command “.\yarn\dist\bin\yarn set registry http://registry.npm.taobao.org/” switch to Taobao mirror