use of com.linkedin.pinot.common.segment.SegmentMetadata in project pinot by linkedin.
the class ValidationManager method computeRealtimeTotalDocumentInSegments.
public static long computeRealtimeTotalDocumentInSegments(List<SegmentMetadata> segmentMetadataList, boolean countHLCSegments) {
long totalDocumentCount = 0;
String groupId = "";
for (SegmentMetadata segmentMetadata : segmentMetadataList) {
String segmentName = segmentMetadata.getName();
if (SegmentName.isHighLevelConsumerSegmentName(segmentName)) {
if (countHLCSegments) {
HLCSegmentName hlcSegmentName = new HLCSegmentName(segmentName);
String segmentGroupIdName = hlcSegmentName.getGroupId();
if (groupId.isEmpty()) {
groupId = segmentGroupIdName;
}
// Discard all segments with different groupids as they are replicas
if (groupId.equals(segmentGroupIdName) && segmentMetadata.getTotalRawDocs() >= 0) {
totalDocumentCount += segmentMetadata.getTotalRawDocs();
}
}
} else {
// Low level segments
if (!countHLCSegments) {
totalDocumentCount += segmentMetadata.getTotalRawDocs();
}
}
}
return totalDocumentCount;
}
use of com.linkedin.pinot.common.segment.SegmentMetadata in project pinot by linkedin.
the class TableViewsTest method addOneSegment.
private void addOneSegment(String tableName) {
SegmentMetadata metadata = new SimpleSegmentMetadata(tableName);
pinotHelixResourceManager.addSegment(metadata, "someurl");
}
use of com.linkedin.pinot.common.segment.SegmentMetadata in project pinot by linkedin.
the class ControllerInstanceToggleTest method addOneOfflineSegment.
private void addOneOfflineSegment(String resourceName) {
final SegmentMetadata segmentMetadata = new SimpleSegmentMetadata(resourceName);
_pinotResourceManager.addSegment(segmentMetadata, "downloadUrl");
}
use of com.linkedin.pinot.common.segment.SegmentMetadata in project pinot by linkedin.
the class PinotResourceManagerTest method addOneSegment.
private void addOneSegment(String resourceName) {
final SegmentMetadata segmentMetadata = new SimpleSegmentMetadata(resourceName);
LOGGER.info("Trying to add IndexSegment : " + segmentMetadata.getName());
_pinotHelixResourceManager.addSegment(segmentMetadata, "downloadUrl");
}
use of com.linkedin.pinot.common.segment.SegmentMetadata in project pinot by linkedin.
the class ControllerSentinelTestV2 method addOneOfflineSegment.
private void addOneOfflineSegment(String resourceName) {
final SegmentMetadata segmentMetadata = new SimpleSegmentMetadata(resourceName);
_pinotResourceManager.addSegment(segmentMetadata, "downloadUrl");
}
Aggregations