zerolbsony commented on code in PR #17279:
URL: https://github.com/apache/iotdb/pull/17279#discussion_r2944156669
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndex.java:
##########
@@ -120,6 +121,41 @@ public Set<IDeviceID> getDevices(String tsFilePath,
TsFileResource tsFileResourc
}
}
+ @Override
+ public Set<IDeviceID> getDevices(
+ String tsFilePath, TsFileResource tsFileResource, LeakyBucketRateLimiter
limiter) {
+ tsFileResource.readLock();
+ try (InputStream inputStream =
+ FSFactoryProducer.getFSFactory()
+ .getBufferedInputStream(tsFilePath +
TsFileResource.RESOURCE_SUFFIX)) {
+ // The first byte is VERSION_NUMBER, second byte is timeIndexType.
+ byte[] bytes = ReadWriteIOUtils.readBytes(inputStream, 2);
+ limiter.acquire(bytes.length);
+ if (bytes[1] == ARRAY_DEVICE_TIME_INDEX_TYPE) {
+ return ArrayDeviceTimeIndex.getDevices(inputStream);
Review Comment:
Changed yet
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]