Skip to content

Commit

Permalink
Refactor: fix doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
KKCorps committed Jan 27, 2025
1 parent b804a69 commit 609942d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2199,18 +2199,16 @@ URI createSegmentPath(String rawTableName, String segmentName) {
}

/**
* Re-ingests segments that are in DONE status with a missing download URL, but also
* have no peer copy on any server. This method will call the server reIngestSegment API
* Re-ingests segments that are in ERROR state in EV but ONLINE in IS with no peer copy on any server. This method
* will call the server reIngestSegment API
* on one of the alive servers that are supposed to host that segment according to IdealState.
*
* API signature:
* POST http://[serverURL]/reIngestSegment
* Request body (JSON):
* {
* "tableNameWithType": [tableName],
* "segmentName": [segmentName],
* "uploadURI": [leadControllerUrl],
* "uploadSegment": true
* "segmentName": [segmentName]
* }
*
* @param tableNameWithType The table name with type, e.g. "myTable_REALTIME"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ public class ReIngestionResource {

// Keep track of jobs by jobId => job info
private static final ConcurrentHashMap<String, ReIngestionJob> RUNNING_JOBS = new ConcurrentHashMap<>();
public static final long CONSUMPTION_END_TIMEOUT_MS = 300000L;
public static final long UPLOAD_END_TIMEOUT_MS = 300000L;

@Inject
private ServerInstance _serverInstance;
Expand Down Expand Up @@ -290,7 +292,7 @@ private void doReIngestSegment(SimpleRealtimeSegmentDataManager manager, String
throws Exception {
try {
manager.startConsumption();
waitForCondition((Void) -> manager.isDoneConsuming(), 1000, 300_000, 0);
waitForCondition((Void) -> manager.isDoneConsuming(), 1000, CONSUMPTION_END_TIMEOUT_MS, 0);
manager.stopConsumption();

if (!manager.isSuccess()) {
Expand Down Expand Up @@ -338,7 +340,7 @@ private void doReIngestSegment(SimpleRealtimeSegmentDataManager manager, String
}
SegmentDataManager segDataManager = tableDataManager.acquireSegment(segmentName);
return segDataManager instanceof ImmutableSegmentDataManager;
}, 5000, 300_000, 0);
}, 5000, UPLOAD_END_TIMEOUT_MS, 0);

// Trigger segment reset
HttpClient httpClient = HttpClient.getInstance();
Expand Down

0 comments on commit 609942d

Please sign in to comment.