Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The code is:
//代码占位符 ReadOnlyTsFile tsFileReader = new ReadOnlyTsFile(new TsFileSequenceReader("file.tsfile")); ArrayList<Path> paths = new ArrayList<>(); paths.add(new Path("system.test_cpu")); // no filter, should select 1 2 3 4 6 7 8 queryAndPrint(paths, tsFileReader, null); tsFileReader.close();
, and actually the correct path is "root.app.system.test_cpu". Now because I define an incorrect path (i.e., not exist in the tsfile), then I get an exception:
WARN [2019-10-24 06:29:41,832] [main] org.apache.iotdb.tsfile.common.conf.TSFileDescriptor:87 - Failed to find config file tsfile-format.properties at classpath, use default configuration WARN [2019-10-24 06:29:41,832] [main] org.apache.iotdb.tsfile.common.conf.TSFileDescriptor:87 - Failed to find config file tsfile-format.properties at classpath, use default configuration Exception in thread "main" java.lang.NullPointerException at org.apache.iotdb.tsfile.read.TsFileSequenceReader.readTsDeviceMetaData(TsFileSequenceReader.java:276) at org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl.loadChunkMetaDatas(MetadataQuerierByFileImpl.java:110) at org.apache.iotdb.tsfile.read.query.executor.TsFileExecutor.execute(TsFileExecutor.java:57) at org.apache.iotdb.tsfile.read.ReadOnlyTsFile.query(ReadOnlyTsFile.java:48) at cn.edu.thu.accessdata.TsFileQuery.queryAndPrint(TsFileQuery.java:30) at cn.edu.thu.accessdata.TsFileQuery.main(TsFileQuery.java:21)
Attachments
Issue Links
- links to