Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,16 @@ public List<ShowTimeSeriesResult> showTimeseries(ShowTimeSeriesPlan plan, QueryC
ExecutorService pool =
new ThreadPoolExecutor(
THREAD_POOL_SIZE, THREAD_POOL_SIZE, 0, TimeUnit.SECONDS, new LinkedBlockingDeque<>());
List<PartitionGroup> globalGroups = metaGroupMember.getPartitionTable().getGlobalGroups();

List<PartitionGroup> globalGroups = new ArrayList<>();
try {
PartitionGroup partitionGroup =
metaGroupMember.getPartitionTable().partitionByPathTime(plan.getPath(), 0);
globalGroups.add(partitionGroup);
} catch (MetadataException e) {
// if the path location is not find, obtain the path location from all groups.
globalGroups = metaGroupMember.getPartitionTable().getGlobalGroups();
}

int limit = plan.getLimit() == 0 ? Integer.MAX_VALUE : plan.getLimit();
int offset = plan.getOffset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,15 @@ public void previousFill(
.previousFill(request, resultHandler))
.start();
}

@Override
public void getAllMeasurementSchema(
Node header, ByteBuffer planBinary, AsyncMethodCallback<ByteBuffer> resultHandler) {
new Thread(
() -> {
new DataAsyncService(dataGroupMemberMap.get(header))
.getAllMeasurementSchema(header, planBinary, resultHandler);
})
.start();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.iotdb.db.metadata.PartialPath;
import org.apache.iotdb.db.metadata.mnode.StorageGroupMNode;
import org.apache.iotdb.db.qp.physical.crud.RawDataQueryPlan;
import org.apache.iotdb.db.qp.physical.sys.ShowTimeSeriesPlan;
import org.apache.iotdb.db.query.context.QueryContext;
import org.apache.iotdb.db.query.control.QueryResourceManager;
import org.apache.iotdb.db.service.IoTDB;
Expand Down Expand Up @@ -88,4 +89,24 @@ public void testGetAllStorageGroupNodes() {
allStorageGroupNodes.get(i).getFullPath());
}
}

@Test
public void testShowTimeseries()
throws StorageEngineException, QueryFilterOptimizationException, MetadataException,
IOException, InterruptedException, QueryProcessException {
ShowTimeSeriesPlan showTimeSeriesPlan = new ShowTimeSeriesPlan(pathList.get(0));
QueryContext context =
new RemoteQueryContext(QueryResourceManager.getInstance().assignQueryId(true, 1024, -1));
try {
QueryDataSet dataSet = queryExecutor.processQuery(showTimeSeriesPlan, context);
int count = 0;
while (dataSet.hasNext()) {
dataSet.next();
count++;
}
assertEquals(count, 1);
} finally {
QueryResourceManager.getInstance().endQuery(context.getQueryId());
}
}
}
6 changes: 3 additions & 3 deletions server/src/assembly/resources/conf/iotdb-engine.properties
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ timestamp_precision=ms

# Memory Allocation Ratio: Write, Read, Schema and Free Memory.
# The parameter form is a:b:c:d, where a, b, c and d are integers. for example: 1:1:1:1 , 6:2:1:1
# If you have high level of writing pressure and low level of reading pressure, please adjust it to for example 6:1:1:2
# If you have high level of writing pressure and low level of reading pressure, please adjust it to for example 6:1:1:2
# write_read_schema_free_memory_proportion=4:3:1:2

# primitive array size (length of each array) in array pool
Expand All @@ -263,7 +263,7 @@ timestamp_precision=ms
# buffered_arrays_memory_proportion=0.6

# Ratio of write memory for rejecting insertion, 0.8 by default
# If you have extremely high write load (like batch=1000) and the physical memory size is large enough,
# If you have extremely high write load (like batch=1000) and the physical memory size is large enough,
# it can be set higher than the default value like 0.9
# reject_proportion=0.8

Expand Down Expand Up @@ -682,4 +682,4 @@ timestamp_precision=ms

# admin password, default is root
# Datatype: string
# admin_password=root
# admin_password=root