Search in sources :

Example 6 with InputOutputPort

use of com.thinkbiganalytics.nifi.feedmgr.InputOutputPort in project kylo by Teradata.

the class NifiRestTest method testCreateFeed.

// @Test
public void testCreateFeed() throws Exception {
    TemplateDTO templateDTO = restClient.getTemplateByName("New Data Ingest");
    String inputType = "org.apache.nifi.processors.standard.GetFile";
    NifiProcessorSchedule schedule = new NifiProcessorSchedule();
    schedule.setSchedulingStrategy("TIMER_DRIVEN");
    schedule.setSchedulingPeriod("10 sec");
    String inputPortName = "From Data Ingest Feed";
    String feedOutputPortName = "To Data Ingest";
    FeedMetadata feedMetadata = new FeedMetadata();
    feedMetadata.setCategory(new FeedCategory());
    feedMetadata.getCategory().setSystemName("online");
    feedMetadata.setSystemFeedName("Scotts Feed");
    CreateFeedBuilder.newFeed(restClient, nifiFlowCache, feedMetadata, templateDTO.getId(), new PropertyExpressionResolver(), propertyDescriptorTransform, createFeedBuilderCache, templateConnectionUtil).inputProcessorType(inputType).feedSchedule(schedule).addInputOutputPort(new InputOutputPort(inputPortName, feedOutputPortName)).build();
}
Also used : FeedCategory(com.thinkbiganalytics.feedmgr.rest.model.FeedCategory) TemplateDTO(org.apache.nifi.web.api.dto.TemplateDTO) FeedMetadata(com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata) InputOutputPort(com.thinkbiganalytics.nifi.feedmgr.InputOutputPort) PropertyExpressionResolver(com.thinkbiganalytics.feedmgr.nifi.PropertyExpressionResolver) NifiProcessorSchedule(com.thinkbiganalytics.nifi.rest.model.NifiProcessorSchedule)

Aggregations

InputOutputPort (com.thinkbiganalytics.nifi.feedmgr.InputOutputPort)6 Stopwatch (com.google.common.base.Stopwatch)4 PropertyExpressionResolver (com.thinkbiganalytics.feedmgr.nifi.PropertyExpressionResolver)3 FeedMetadata (com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata)3 FeedCategory (com.thinkbiganalytics.feedmgr.rest.model.FeedCategory)2 NifiClientRuntimeException (com.thinkbiganalytics.nifi.rest.client.NifiClientRuntimeException)2 ProcessGroupDTO (org.apache.nifi.web.api.dto.ProcessGroupDTO)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 Sets (com.google.common.collect.Sets)1 HadoopAuthorizationService (com.thinkbiganalytics.datalake.authorization.service.HadoopAuthorizationService)1 CreateFeedBuilder (com.thinkbiganalytics.feedmgr.nifi.CreateFeedBuilder)1 TemplateConnectionUtil (com.thinkbiganalytics.feedmgr.nifi.TemplateConnectionUtil)1 NifiFlowCache (com.thinkbiganalytics.feedmgr.nifi.cache.NifiFlowCache)1 EntityVersion (com.thinkbiganalytics.feedmgr.rest.model.EntityVersion)1 EntityVersionDifference (com.thinkbiganalytics.feedmgr.rest.model.EntityVersionDifference)1 FeedSummary (com.thinkbiganalytics.feedmgr.rest.model.FeedSummary)1 FeedVersions (com.thinkbiganalytics.feedmgr.rest.model.FeedVersions)1 NifiFeed (com.thinkbiganalytics.feedmgr.rest.model.NifiFeed)1 RegisteredTemplate (com.thinkbiganalytics.feedmgr.rest.model.RegisteredTemplate)1 RegisteredTemplateRequest (com.thinkbiganalytics.feedmgr.rest.model.RegisteredTemplateRequest)1