You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "clintropolis (via GitHub)" <gi...@apache.org> on 2026/05/17 02:32:23 UTC
[PR] minor: add fileGroup to V10 segment SegmentFileContainerMetadata, switch default metadata compression to zstd (druid)
clintropolis opened a new pull request, #19468:
URL: https://github.com/apache/druid/pull/19468
### Description
Adds a `fileGroup` field to `SegmentFileContainerMetadata` of V10 segments, which after #19375 associated containers with `startFileGroup` to place all internal files under the same group in the same container. This just adds that field to the container so on the read side we have an easy way to get a list of the internal file bundles present in a v10 segment, making some things easier for partial download.
While I was here, I also set the default metadata compression for v10 segments to use zstd instead of uncompressed. I can't really think of much downside to doing this, I just hadn't got around to switching it yet, so did it now since I had to update the expected size of a test anyway.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] minor: add fileGroup to V10 segment SegmentFileContainerMetadata, switch default metadata compression to zstd (druid)
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #19468:
URL: https://github.com/apache/druid/pull/19468#discussion_r3254100491
##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/QueryVirtualStorageTest.java:
##########
@@ -305,11 +306,12 @@
@Test
void testQuerySysTables()
{
- String query = "SELECT curr_size, max_size, storage_size FROM sys.servers WHERE tier IS NOT NULL AND server_type = 'historical'";
- Assertions.assertEquals(
- StringUtils.format("%s,%s,%s", SIZE_BYTES, MAX_SIZE, CACHE_SIZE),
- cluster.callApi().runSql(query)
- );
+ final String query = "SELECT curr_size, max_size, storage_size FROM sys.servers WHERE tier IS NOT NULL AND server_type = 'historical'";
+ final String resultString = cluster.callApi().runSql(query);
+ final String[] split = resultString.split(",");
+ Assertions.assertTrue(Long.parseLong(split[0]) <= SIZE_BYTES);
+ Assertions.assertEquals(MAX_SIZE, Long.parseLong(split[1]));
+ Assertions.assertEquals(CACHE_SIZE, Long.parseLong(split[2]));
Review Comment:
## CodeQL / Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more details](https://github.com/apache/druid/security/code-scanning/11233)
##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/QueryVirtualStorageTest.java:
##########
@@ -305,11 +306,12 @@
@Test
void testQuerySysTables()
{
- String query = "SELECT curr_size, max_size, storage_size FROM sys.servers WHERE tier IS NOT NULL AND server_type = 'historical'";
- Assertions.assertEquals(
- StringUtils.format("%s,%s,%s", SIZE_BYTES, MAX_SIZE, CACHE_SIZE),
- cluster.callApi().runSql(query)
- );
+ final String query = "SELECT curr_size, max_size, storage_size FROM sys.servers WHERE tier IS NOT NULL AND server_type = 'historical'";
+ final String resultString = cluster.callApi().runSql(query);
+ final String[] split = resultString.split(",");
+ Assertions.assertTrue(Long.parseLong(split[0]) <= SIZE_BYTES);
+ Assertions.assertEquals(MAX_SIZE, Long.parseLong(split[1]));
Review Comment:
## CodeQL / Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more details](https://github.com/apache/druid/security/code-scanning/11232)
##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/QueryVirtualStorageTest.java:
##########
@@ -305,11 +306,12 @@
@Test
void testQuerySysTables()
{
- String query = "SELECT curr_size, max_size, storage_size FROM sys.servers WHERE tier IS NOT NULL AND server_type = 'historical'";
- Assertions.assertEquals(
- StringUtils.format("%s,%s,%s", SIZE_BYTES, MAX_SIZE, CACHE_SIZE),
- cluster.callApi().runSql(query)
- );
+ final String query = "SELECT curr_size, max_size, storage_size FROM sys.servers WHERE tier IS NOT NULL AND server_type = 'historical'";
+ final String resultString = cluster.callApi().runSql(query);
+ final String[] split = resultString.split(",");
+ Assertions.assertTrue(Long.parseLong(split[0]) <= SIZE_BYTES);
Review Comment:
## CodeQL / Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more details](https://github.com/apache/druid/security/code-scanning/11231)
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] minor: add fileGroup to V10 segment SegmentFileContainerMetadata, switch default metadata compression to zstd (druid)
Posted by "clintropolis (via GitHub)" <gi...@apache.org>.
clintropolis merged PR #19468:
URL: https://github.com/apache/druid/pull/19468
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org