New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add micro and nano timestamp precision #285
Conversation
|
||
public class IoTDBConfigCheck { | ||
|
||
// this file is located in Data/System/Schema/system_properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// this file is located in Data/System/Schema/system_properties. | |
// this file is located in data/system/schema/system.properties |
public class IoTDBConfigCheck { | ||
|
||
// this file is located in Data/System/Schema/system_properties. | ||
// If user delete folder "Data", system_properties can reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// If user delete folder "Data", system_properties can reset. | |
// If user delete folder "data", system.properties can reset. |
// If user delete folder "Data", system_properties can reset. | ||
public static final String DEFAULT_FILEPATH = "system.properties"; | ||
public static final String PROPERTY_HOME = | ||
"data" + File.separator + "system" + File.separator + "schema"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"data" + File.separator + "system" + File.separator + "schema"; | |
IoTDBDescriptor.getInstance().getConfig().getSystemDIr() + File.separator + "schema"; |
File dir = new File(filepath); | ||
if (!dir.exists()) { | ||
dir.mkdirs(); | ||
logger.info(" {} dir has been made.", PROPERTY_HOME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.info(" {} dir has been made.", PROPERTY_HOME); | |
logger.info(" {} dir has been created.", PROPERTY_HOME); |
// this file is located in Data/System/Schema/system_properties. | ||
// If user delete folder "Data", system_properties can reset. | ||
public static final String DEFAULT_FILEPATH = "system.properties"; | ||
public static final String PROPERTY_HOME = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final String PROPERTY_HOME = | |
public static final String SCHEMA_DIR = |
private static final Logger logger = LoggerFactory.getLogger(IoTDBDescriptor.class); | ||
private Properties properties = new Properties(); | ||
// this is a initial parameter. | ||
public static String TIMESTAMP_PRECISION = "ms"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use a local variable is good
|
||
// this file is located in Data/System/Schema/system_properties. | ||
// If user delete folder "Data", system_properties can reset. | ||
public static final String DEFAULT_FILEPATH = "system.properties"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final String DEFAULT_FILEPATH = "system.properties"; | |
public static final String PROPERTIES_FILE_NAME = "system.properties"; |
// get existed properties from system_properties.txt | ||
File inputFile = new File(filepath + File.separator + DEFAULT_FILEPATH); | ||
try (FileInputStream inputStream = new FileInputStream(inputFile.toString())) { | ||
properties.load(new InputStreamReader(inputStream, "utf-8")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
properties.load(new InputStreamReader(inputStream, "utf-8")); | |
properties.load(new InputStreamReader(inputStream, TSFILEConfig.STRING_ENCODING)); |
* Fix 'latest' in documents link url to version number
IoTDB only provide millisecond timestamp. Therefore, I make an effort to help IoTDB recognizing microsecond and nanosecond timestamp while inserting or querying.