Java Code Examples for org.apache.nifi.web.api.dto.RemoteProcessGroupPortDTO#setUseCompression()

The following examples show how to use org.apache.nifi.web.api.dto.RemoteProcessGroupPortDTO#setUseCompression() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestRemoteProcessGroupAuditor.java    From localization_nifi with Apache License 2.0 6 votes vote down vote up
@Test
public void testConfigurePortCompression() throws Throwable {

    final RemoteGroupPort existingRPGPort = defaultRemoteGroupPort();
    when(existingRPGPort.getName()).thenReturn("input-port-1");

    final RemoteProcessGroupPortDTO inputRPGPortDTO = defaultRemoteProcessGroupPortDTO();
    inputRPGPortDTO.setUseCompression(true);

    final Collection<Action> actions = updateProcessGroupInputPortConfiguration(inputRPGPortDTO, existingRPGPort);

    assertEquals(1, actions.size());
    final Action action = actions.iterator().next();
    assertEquals(Operation.Configure, action.getOperation());
    assertConfigureDetails(action.getActionDetails(), "input-port-1.Compressed", "false", "true");

}
 
Example 2
Source File: RemoteInputPortSchemaTest.java    From nifi-minifi with Apache License 2.0 6 votes vote down vote up
@Before
public void setup() {
    dto = new RemoteProcessGroupPortDTO();
    dto.setId(testId);
    dto.setName(testName);
    dto.setComments(testComment);
    dto.setConcurrentlySchedulableTaskCount(testMaxConcurrentTasks);
    dto.setUseCompression(testUseCompression);

    map = new HashMap<>();
    map.put(CommonPropertyKeys.ID_KEY, testId);
    map.put(CommonPropertyKeys.NAME_KEY, testName);
    map.put(CommonPropertyKeys.COMMENT_KEY, testComment);
    map.put(CommonPropertyKeys.MAX_CONCURRENT_TASKS_KEY, testMaxConcurrentTasks);
    map.put(CommonPropertyKeys.USE_COMPRESSION_KEY, testUseCompression);
}
 
Example 3
Source File: TestRemoteProcessGroupAuditor.java    From nifi with Apache License 2.0 6 votes vote down vote up
@Test
public void testConfigurePortCompression() throws Throwable {

    final RemoteGroupPort existingRPGPort = defaultRemoteGroupPort();
    when(existingRPGPort.getName()).thenReturn("input-port-1");

    final RemoteProcessGroupPortDTO inputRPGPortDTO = defaultRemoteProcessGroupPortDTO();
    inputRPGPortDTO.setUseCompression(true);

    final Collection<Action> actions = updateProcessGroupInputPortConfiguration(inputRPGPortDTO, existingRPGPort);

    assertEquals(1, actions.size());
    final Action action = actions.iterator().next();
    assertEquals(Operation.Configure, action.getOperation());
    assertConfigureDetails(action.getActionDetails(), "input-port-1.Compressed", "false", "true");

}
 
Example 4
Source File: TestRemoteProcessGroupAuditor.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
private RemoteProcessGroupPortDTO defaultRemoteProcessGroupPortDTO() {
    final RemoteProcessGroupPortDTO inputRPGPortDTO = new RemoteProcessGroupPortDTO();
    inputRPGPortDTO.setConcurrentlySchedulableTaskCount(1);
    inputRPGPortDTO.setUseCompression(false);
    return inputRPGPortDTO;
}
 
Example 5
Source File: TestRemoteProcessGroupAuditor.java    From nifi with Apache License 2.0 4 votes vote down vote up
private RemoteProcessGroupPortDTO defaultRemoteProcessGroupPortDTO() {
    final RemoteProcessGroupPortDTO inputRPGPortDTO = new RemoteProcessGroupPortDTO();
    inputRPGPortDTO.setConcurrentlySchedulableTaskCount(1);
    inputRPGPortDTO.setUseCompression(false);
    return inputRPGPortDTO;
}