public class FailureInjectionPolicy extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DELAY_KEY_SUBSTRING
Keys containing this substring will be subject to delayed visibility.
|
Constructor and Description |
---|
FailureInjectionPolicy(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
int |
getFailureLimit() |
float |
getThrottleProbability() |
void |
setFailureLimit(int failureLimit) |
void |
setThrottleProbability(float throttleProbability)
Set the probability of throttling a request.
|
String |
toString() |
static boolean |
trueWithProbability(float p) |
public static final String DEFAULT_DELAY_KEY_SUBSTRING
public FailureInjectionPolicy(org.apache.hadoop.conf.Configuration conf)
public float getThrottleProbability()
public int getFailureLimit()
public void setFailureLimit(int failureLimit)
public void setThrottleProbability(float throttleProbability)
throttleProbability
- the probability of a request being throttled.public static boolean trueWithProbability(float p)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.