public class FlowExecutionResourceLocalHandler extends Object implements FlowExecutionResourceHandler
| Constructor and Description |
|---|
FlowExecutionResourceLocalHandler(FlowStatusGenerator flowStatusGenerator) |
| Modifier and Type | Method and Description |
|---|---|
static FlowExecution |
convertFlowStatus(FlowStatus monitoringFlowStatus)
Forms a
FlowExecution from a FlowStatus |
com.linkedin.restli.server.UpdateResponse |
delete(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key)
Kill a running
FlowExecution |
static long |
estimateCopyTimeLeft(Long currentTime,
Long startTime,
int completionPercentage)
Estimate the time left to complete the copy based on the following formula -
timeLeft = (100/completionPercentage - 1) * timeElapsed
|
FlowExecution |
get(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key)
Get
FlowExecution |
static FlowStatus |
getFlowStatusFromGenerator(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key,
FlowStatusGenerator flowStatusGenerator) |
List<FlowExecution> |
getLatestFlowExecution(com.linkedin.restli.server.PagingContext context,
FlowId flowId,
Integer count,
String tag,
String executionStatus)
Get latest
FlowExecution |
static List<FlowStatus> |
getLatestFlowStatusesFromGenerator(FlowId flowId,
Integer count,
String tag,
String executionStatus,
FlowStatusGenerator flowStatusGenerator) |
void |
resume(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key)
Resume a failed
FlowExecution from the point before failure |
@Inject public FlowExecutionResourceLocalHandler(FlowStatusGenerator flowStatusGenerator)
public FlowExecution get(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key)
FlowExecutionResourceHandlerFlowExecutionget in interface FlowExecutionResourceHandlerpublic List<FlowExecution> getLatestFlowExecution(com.linkedin.restli.server.PagingContext context, FlowId flowId, Integer count, String tag, String executionStatus)
FlowExecutionResourceHandlerFlowExecutiongetLatestFlowExecution in interface FlowExecutionResourceHandlerpublic void resume(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key)
FlowExecutionResourceHandlerFlowExecution from the point before failureresume in interface FlowExecutionResourceHandlerpublic com.linkedin.restli.server.UpdateResponse delete(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key)
FlowExecutionResourceHandlerFlowExecutiondelete in interface FlowExecutionResourceHandlerpublic static FlowStatus getFlowStatusFromGenerator(com.linkedin.restli.common.ComplexResourceKey<FlowStatusId,com.linkedin.restli.common.EmptyRecord> key, FlowStatusGenerator flowStatusGenerator)
public static List<FlowStatus> getLatestFlowStatusesFromGenerator(FlowId flowId, Integer count, String tag, String executionStatus, FlowStatusGenerator flowStatusGenerator)
public static FlowExecution convertFlowStatus(FlowStatus monitoringFlowStatus)
FlowExecution from a FlowStatusmonitoringFlowStatus - FlowExecution converted from a FlowStatuspublic static long estimateCopyTimeLeft(Long currentTime, Long startTime, int completionPercentage)
currentTime - as an epochstartTime - as an epochcompletionPercentage - of the job