Added batch support and displayName to ModifyBytes processor
This closes
@@ -30,6 +30,7 @@ import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.InputRequirement;
import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.components.PropertyDescriptor;
@@ -50,6 +51,7 @@ import org.apache.nifi.util.StopWatch;
@EventDriven
@SideEffectFree
+@SupportsBatching
@Tags({"binary", "discard", "keep"})
@InputRequirement(Requirement.INPUT_REQUIRED)
@CapabilityDescription("Discard byte range at the start and end or all content of a binary file.")
@@ -63,6 +65,7 @@ public class ModifyBytes extends AbstractProcessor {
private final Set<Relationship> relationships;
public static final PropertyDescriptor START_OFFSET = new PropertyDescriptor.Builder()
.name("Start Offset")
+ .displayName("Start Offset")
.description("Number of bytes removed at the beginning of the file.")
.required(true)
.addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
@@ -71,6 +74,7 @@ public class ModifyBytes extends AbstractProcessor {
.build();
public static final PropertyDescriptor END_OFFSET = new PropertyDescriptor.Builder()
.name("End Offset")
+ .displayName("End Offset")
.description("Number of bytes removed at the end of the file.")
.required(true)
.addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
@@ -79,6 +83,7 @@ public class ModifyBytes extends AbstractProcessor {
.build();
public static final PropertyDescriptor REMOVE_ALL = new PropertyDescriptor.Builder()
.name("Remove All Content")
+ .displayName("Remove All Content")
.description("Remove all content from the FlowFile superseding Start Offset and End Offset properties.")
.required(true)
.allowableValues("true", "false")
