You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2025/07/01 19:00:25 UTC
[PR] Allows limiting per tablet information retrieved [accumulo]
keith-turner opened a new pull request, #5700:
URL: https://github.com/apache/accumulo/pull/5700
When calling TableOperations.getTabletInformation() it currently retrieves a lot of tablet metadata. If this information is not of interest then a lot of time could be spent gathering information that is never used (especially for the per tablet file data). Modified TableOperations.getTabletInformation() to allow specifying a subset of tablet metadata to fetch.
This is a WIP, it still needs tests. Posting API changes fore review before adding test.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allows limiting per tablet information retrieved [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner merged PR #5700:
URL: https://github.com/apache/accumulo/pull/5700
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allows limiting per tablet information retrieved [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5700:
URL: https://github.com/apache/accumulo/pull/5700#discussion_r2301499125
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TabletInformationImpl.java:
##########
@@ -32,23 +32,36 @@
import org.apache.accumulo.core.metadata.schema.TabletMetadata;
import org.apache.accumulo.core.metadata.schema.TabletMetadata.Location;
+import com.google.common.base.Suppliers;
+
public class TabletInformationImpl implements TabletInformation {
private final TabletMetadata tabletMetadata;
- private long estimatedSize;
- private long estimatedEntries;
- private final String tabletState;
+
+ private final Supplier<String> tabletState;
private final Supplier<Duration> currentTime;
+ private final Supplier<FileInfo> fileInfo;
+
+ private class FileInfo {
+ private final long estimatedSize;
+ private final long estimatedEntries;
+
+ FileInfo() {
+ long estimatedEntries = 0L;
+ long estimatedSize = 0L;
+ for (DataFileValue dfv : tabletMetadata.getFilesMap().values()) {
Review Comment:
This is ok because the construction of FileInfo is memoized in the TabletInformationImpl constructor. So it will only throw an exception when the getter is called and not when scainning. The new ITs tests this.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allows limiting per tablet information retrieved [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on PR #5700:
URL: https://github.com/apache/accumulo/pull/5700#issuecomment-3025211339
#5667 will probably need this type of functionality. When balancing tablets would not want to bother retrieving every tablets list of files if the balancer would not use that information.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allows limiting per tablet information retrieved [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #5700:
URL: https://github.com/apache/accumulo/pull/5700#discussion_r2195661432
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TabletInformationImpl.java:
##########
@@ -32,23 +32,36 @@
import org.apache.accumulo.core.metadata.schema.TabletMetadata;
import org.apache.accumulo.core.metadata.schema.TabletMetadata.Location;
+import com.google.common.base.Suppliers;
+
public class TabletInformationImpl implements TabletInformation {
private final TabletMetadata tabletMetadata;
- private long estimatedSize;
- private long estimatedEntries;
- private final String tabletState;
+
+ private final Supplier<String> tabletState;
private final Supplier<Duration> currentTime;
+ private final Supplier<FileInfo> fileInfo;
+
+ private class FileInfo {
+ private final long estimatedSize;
+ private final long estimatedEntries;
+
+ FileInfo() {
+ long estimatedEntries = 0L;
+ long estimatedSize = 0L;
+ for (DataFileValue dfv : tabletMetadata.getFilesMap().values()) {
Review Comment:
getFilesMap will throw an IllegalStateException if FILES is not fetched. Do you need to handle that here given the other changes?
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org