-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
120 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...er/src/main/java/org/apache/pinot/controller/api/resources/TableStaleSegmentResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.apache.pinot.controller.api.resources; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
import org.apache.pinot.segment.local.data.manager.StaleSegment; | ||
|
||
|
||
public class TableStaleSegmentResponse { | ||
private final List<StaleSegment> _staleSegmentList; | ||
private final boolean _isValidResponse; | ||
private final String _errorMessage; | ||
|
||
@JsonCreator | ||
public TableStaleSegmentResponse(@JsonProperty("staleSegmentList") List<StaleSegment> staleSegmentList, | ||
@JsonProperty("validResponse") boolean isValidResponse, | ||
@JsonProperty("errorMessage") String errorMessage) { | ||
_staleSegmentList = staleSegmentList; | ||
_isValidResponse = isValidResponse; | ||
_errorMessage = errorMessage; | ||
} | ||
|
||
public TableStaleSegmentResponse(List<StaleSegment> staleSegmentList) { | ||
_staleSegmentList = staleSegmentList; | ||
_isValidResponse = true; | ||
_errorMessage = null; | ||
} | ||
|
||
public TableStaleSegmentResponse(String errorMessage) { | ||
_staleSegmentList = null; | ||
_isValidResponse = false; | ||
_errorMessage = errorMessage; | ||
} | ||
|
||
@JsonProperty | ||
public List<StaleSegment> getStaleSegmentList() { | ||
return _staleSegmentList; | ||
} | ||
|
||
@JsonProperty | ||
public boolean isValidResponse() { | ||
return _isValidResponse; | ||
} | ||
|
||
@JsonProperty | ||
public String getErrorMessage() { | ||
return _errorMessage; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.