WAGED simulation API doesn't provide actual reason for the assignment calculation fail
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu từ HelixUtil.getTargetAssignmentForWagedFullAuto() và theo dõi đường dẫn lỗi của getIdealAssignmentForWagedFullAuto() để xem FAILED_TO_CALCULATE bị thay thế bằng HelixException chung ở đâu. Xem lại ngữ cảnh liên quan trong pull request #1701. Được xem là hoàn tất khi util hiển thị lỗi tính toán thực tế thay vì chỉ thông báo chung.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
I've tried to using HelixUtil.getTargetAssignmentForWagedFullAuto() to check capacity availability for a resource before adding it to the cluster (refer to the below snippet). However, it ends up in a HelixException with getIdealAssignmentForWagedFullAuto(): Calculation failed: Failed to compute BestPossibleState! as the cause. Is it because the cluster doesn't have enough capacity for the resource? If so, is there a way to get actual FAILED_TO_CALCULATE exception propagated here, instead of having a generic cause?
To Reproduce
try {
IdealState newIS = getIdealState(resourceName);
ResourceConfig newResourceConfig = new ResourceConfig(resourceName);
// Set PARTITION_CAPACITY_MAP
Map<String, String> capacityDataMap = ImmutableMap.of("CPU", "20", "MEMORY", "60");
newResourceConfig.getRecord().setMapField(ResourceConfig.ResourceConfigProperty.PARTITION_CAPACITY_MAP.name(),
Collections.singletonMap(ResourceConfig.DEFAULT_PARTITION_KEY, OBJECT_MAPPER.writeValueAsString(capacityDataMap)));
// Read existing cluster/instances/resources info
final ZKHelixDataAccessor dataAccessor = new ZKHelixDataAccessor(CLUSTER_NAME,
new ZkBaseDataAccessor.Builder<ZNRecord>().setZkAddress(ZK_ADDRESS).build());
ClusterConfig clusterConfig = dataAccessor.getProperty(dataAccessor.keyBuilder().clusterConfig());
List<InstanceConfig> instanceConfigs = dataAccessor.getChildValues(dataAccessor.keyBuilder().instanceConfigs(), true);
List<String> liveInstances = dataAccessor.getChildNames(dataAccessor.keyBuilder().liveInstances());
List<IdealState> idealStates = dataAccessor.getChildValues(dataAccessor.keyBuilder().idealStates(), true);
List<ResourceConfig> resourceConfigs = dataAccessor.getChildValues(dataAccessor.keyBuilder().resourceConfigs(), true);
// Do we need add this?
idealStates.add(newIS);
resourceConfigs.add(newResourceConfig);
// Verify that utilResult contains the assignment for the resources added
Map<String, ResourceAssignment> utilResult = HelixUtil
.getTargetAssignmentForWagedFullAuto(ZK_ADDRESS, clusterConfig, instanceConfigs,
liveInstances, idealStates, resourceConfigs);
} catch (HelixException e) {
// Getting "getIdealAssignmentForWagedFullAuto(): Calculation failed: Failed to compute BestPossibleState!"
// means not enough capacity?
}
Expected behavior
- Get actual
FAILED_TO_CALCULATEexception propagated to the util, instead of having the genericHelixException.
Additional context
- Ngôn ngữ chính
- Java
- Star
- 505
- Fork
- 258
- Merge trung bình
- 4 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/helix
-
Four TestConstraintBasedAlgorithm tests pass when nothing is thrownCó thể đã có người làm @sharanggupta đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Helix ZkClient times out after successful ZooKeeper SASL DIGEST-MD5 authenticationCó thể đã có người làm @adityaanikam đã nhận 43 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
NPE in canCompleteSwap if path doesn't existsCó thể đã có người làm @waterWang đã nhận 106 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
-
Legacy IZkStateListenerI0ItecImpl causes zombie participants by discarding session IDsCó thể đã có người làm @LZD-PratyushBhatt đã nhận 457 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Issue tương tự
-
bug documentation good first issue help wanted priority low size XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
martin-francois/symphony-trello#1351 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add test coverage for ConvertUtil.parseDate() with NULL inputCó thể đã có người làm @mirajul-mollah7 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
eclipse-sw360/sw360#4792 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-emulator#30 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100