mirror of https://github.com/apache/nifi.git
NIFI-1805
Expose BackPressureObjectThreshold and BackPressureDataSizeThreshold to ConnectionStatus This closes #377. Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
parent
e6250d18cf
commit
406d8a1991
|
@ -27,6 +27,8 @@ public class ConnectionStatus implements Cloneable {
|
|||
private String sourceName;
|
||||
private String destinationId;
|
||||
private String destinationName;
|
||||
private String backPressureDataSizeThreshold;
|
||||
private long backPressureObjectThreshold;
|
||||
private int inputCount;
|
||||
private long inputBytes;
|
||||
private int queuedCount;
|
||||
|
@ -106,6 +108,22 @@ public class ConnectionStatus implements Cloneable {
|
|||
this.destinationName = destinationName;
|
||||
}
|
||||
|
||||
public String getBackPressureDataSizeThreshold() {
|
||||
return backPressureDataSizeThreshold;
|
||||
}
|
||||
|
||||
public void setBackPressureDataSizeThreshold(String backPressureDataSizeThreshold) {
|
||||
this.backPressureDataSizeThreshold = backPressureDataSizeThreshold;
|
||||
}
|
||||
|
||||
public long getBackPressureObjectThreshold() {
|
||||
return backPressureObjectThreshold;
|
||||
}
|
||||
|
||||
public void setBackPressureObjectThreshold(long backPressureObjectThreshold) {
|
||||
this.backPressureObjectThreshold = backPressureObjectThreshold;
|
||||
}
|
||||
|
||||
public long getInputBytes() {
|
||||
return inputBytes;
|
||||
}
|
||||
|
@ -154,6 +172,8 @@ public class ConnectionStatus implements Cloneable {
|
|||
clonedObj.sourceName = sourceName;
|
||||
clonedObj.destinationId = destinationId;
|
||||
clonedObj.destinationName = destinationName;
|
||||
clonedObj.backPressureDataSizeThreshold = backPressureDataSizeThreshold;
|
||||
clonedObj.backPressureObjectThreshold = backPressureObjectThreshold;
|
||||
return clonedObj;
|
||||
}
|
||||
|
||||
|
@ -174,6 +194,10 @@ public class ConnectionStatus implements Cloneable {
|
|||
builder.append(destinationId);
|
||||
builder.append(", destinationName=");
|
||||
builder.append(destinationName);
|
||||
builder.append(", backPressureDataSizeThreshold=");
|
||||
builder.append(backPressureDataSizeThreshold);
|
||||
builder.append(", backPressureObjectThreshold=");
|
||||
builder.append(backPressureObjectThreshold);
|
||||
builder.append(", inputCount=");
|
||||
builder.append(inputCount);
|
||||
builder.append(", inputBytes=");
|
||||
|
|
|
@ -2216,6 +2216,8 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
|
|||
connStatus.setSourceName(conn.getSource().getName());
|
||||
connStatus.setDestinationId(conn.getDestination().getIdentifier());
|
||||
connStatus.setDestinationName(conn.getDestination().getName());
|
||||
connStatus.setBackPressureDataSizeThreshold(conn.getFlowFileQueue().getBackPressureDataSizeThreshold());
|
||||
connStatus.setBackPressureObjectThreshold(conn.getFlowFileQueue().getBackPressureObjectThreshold());
|
||||
|
||||
final FlowFileEvent connectionStatusReport = statusReport.getReportEntry(conn.getIdentifier());
|
||||
if (connectionStatusReport != null) {
|
||||
|
|
Loading…
Reference in New Issue