Ask Your Question
4

What is the process of adjusting timestamp precision from milliseconds to microseconds or nanoseconds if the timestamp_precision settings indicate an error in Apache IoTDB?

asked 2023-05-10 16:12:46 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2023-05-10 16:30:02 +0000

ladyg gravatar image

The process of adjusting timestamp precision from milliseconds to microseconds or nanoseconds if there's an error in Apache IoTDB's timestamp_precision settings can be done by modifying the storage group's TTL (Time to Live) and DPI (Data Point Interval) parameters. Here are the steps for doing this:

  1. Check the current timestamp_precision setting of IoTDB by executing the following command in the IoTDB shell:

SHOW CONCAT(TIME, '', TIMESTAMPPRECISION)

  1. If the current timestampprecision setting is incorrect, modify the DPI parameter of the storage group to match the desired timestampprecision. For example, to set the timestamp_precision to microseconds (µs), set the DPI to 1000 µs as follows:

SET STORAGE GROUP <storage_group_name> TTL <ttl_value> DPI 1000

  1. Verify that the DPI was set correctly by executing the following command:

SHOW STORAGE GROUP <storage_group_name>

  1. After the DPI has been modified, adjust the TTL to match the desired timestampprecision. For example, to set the timestampprecision to nanoseconds (ns), set the TTL to 1000000 ns as follows:

SET STORAGE GROUP <storage_group_name> TTL 1000000 DPI <dpi_value>

  1. Verify that the TTL was set correctly by executing the following command:

SHOW STORAGE GROUP <storage_group_name>

  1. Finally, check the timestamp_precision setting by executing the SHOW command again to ensure that it has been adjusted correctly:

SHOW CONCAT(TIME, '', TIMESTAMPPRECISION)

By following these steps, the timestamp precision in IoTDB can be adjusted from milliseconds to microseconds or nanoseconds as desired.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-10 16:12:46 +0000

Seen: 8 times

Last updated: May 10 '23