Skip to content

[To rel/0.13][IOTDB-4675] Support load mlog.bin#7650

Merged
qiaojialin merged 8 commits intoapache:rel/0.13from
Cpaulyz:IOTDB-4675
Oct 20, 2022
Merged

[To rel/0.13][IOTDB-4675] Support load mlog.bin#7650
qiaojialin merged 8 commits intoapache:rel/0.13from
Cpaulyz:IOTDB-4675

Conversation

@Cpaulyz
Copy link
Copy Markdown
Contributor

@Cpaulyz Cpaulyz commented Oct 18, 2022

Description

Support load mlog.bin and tlog.txt

usage: MLogLoad -mlog <mlog file> [-tlog <tlog file>] [-h <receiver host>]
       [-p <receiver port>] [-u <user>] [-pw <password>] [-help]
 -mlog <mlog file>    Need to specify a binary mlog.bin file to parse
                      (required)
 -tlog <tlog file>    Could specify a binary tlog.txt file to parse. Tags
                      and attributes will be ignored if not specified
                      (optional)
 -h <receiver host>   Could specify a specify the receiver host, default
                      is 127.0.0.1 (optional)
 -p <receiver port>   Could specify a specify the receiver port, default
                      is 6667 (optional)
 -u <user>            Could specify the user name, default is root
                      (optional)
 -pw <password>       Could specify the password, default is root
                      (optional)
 -help,--help         Display help information

Note: If tlog is not specified, the MLogLoad tool will ignore tags and attributes management.

* Get a mlog.bin file in an IoTDB, and load this mlog.bin into another IoTDB. This tool receives a
* mlog.bin and IoTDB ip, port. It reads this mlog.bin and use session interface to replay.
*/
public class MLogLoad {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to MLogLoader or some name as a noun.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Load tool,MLogLoader class

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. Should rename mLogLoad.sh/bat to mLogLoader.sh/bat?


public class MLogLoadTest {

File file = new File("target" + File.separator + "tmp" + File.separator + "text.mlog");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
File file = new File("target" + File.separator + "tmp" + File.separator + "text.mlog");
File file = new File("target" + File.separator + "tmp" + File.separator + "mlog.bin.bak");

Comment on lines +119 to +120
// args = new
// String[]{"-f","/Users/chenyanze/projects/JavaProjects/iotdb/iotdb/data/system/schema/mlog.bin"};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

* Get a mlog.bin file in an IoTDB, and load this mlog.bin into another IoTDB. This tool receives a
* mlog.bin and IoTDB ip, port. It reads this mlog.bin and use session interface to replay.
*/
public class MLogLoad {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Load tool,MLogLoader class

fillTagsAndOffset(createTimeSeriesPlan);
}
}
session.createTimeseries(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to createMultiTimeseries interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants