Search in sources :

Example 36 with FeedMetadata

use of com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata in project kylo by Teradata.

the class IntegrationTestBase method createSimpleFeed.

protected FeedMetadata createSimpleFeed(String feedName, String testFile) {
    FeedCategory category = createCategory(FUNCTIONAL_TESTS);
    ImportTemplate template = importSimpleTemplate();
    FeedMetadata request = makeCreateFeedRequest(category, template, feedName, testFile);
    FeedMetadata response = createFeed(request).getFeedMetadata();
    Assert.assertEquals(request.getFeedName(), response.getFeedName());
    return response;
}
Also used : FeedCategory(com.thinkbiganalytics.feedmgr.rest.model.FeedCategory) FeedMetadata(com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata) ImportTemplate(com.thinkbiganalytics.feedmgr.service.template.importing.model.ImportTemplate)

Example 37 with FeedMetadata

use of com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata in project kylo by Teradata.

the class EntityLevelAccessIT method assertAnalystCantEditFeed.

private void assertAnalystCantEditFeed(String errorMessage) {
    LOG.debug("EntityLevelAccessIT.assertAnalystCantEditFeed");
    runAs(ANALYST);
    FeedMetadata editFeedRequest = getEditFeedRequest();
    NifiFeed feed = createFeed(editFeedRequest);
    Assert.assertEquals(1, feed.getErrorMessages().size());
    Assert.assertTrue(feed.getErrorMessages().get(0).startsWith(errorMessage));
}
Also used : FeedMetadata(com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata) NifiFeed(com.thinkbiganalytics.feedmgr.rest.model.NifiFeed)

Example 38 with FeedMetadata

use of com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata in project kylo by Teradata.

the class EntityLevelAccessIT method createFeedWithAdmin.

private void createFeedWithAdmin() {
    LOG.debug("EntityLevelAccessIT.createFeedWithAdmin");
    runAs(ADMIN);
    FeedMetadata feedRequest = makeCreateFeedRequest(category, template, "Feed A", TEST_FILE);
    feed = createFeed(feedRequest).getFeedMetadata();
}
Also used : FeedMetadata(com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata)

Example 39 with FeedMetadata

use of com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata in project kylo by Teradata.

the class FeedIT method testDataIngestFeed.

@Test
public void testDataIngestFeed() throws Exception {
    prepare();
    importSystemFeeds();
    copyDataToDropzone();
    // create new category
    FeedCategory category = createCategory(CATEGORY_NAME);
    ImportTemplate ingest = importDataIngestTemplate();
    // create standard ingest feed
    FeedMetadata feed = getCreateFeedRequest(category, ingest, createNewFeedName());
    FeedMetadata response = createFeed(feed).getFeedMetadata();
    Assert.assertEquals(feed.getFeedName(), response.getFeedName());
    waitForFeedToComplete();
    assertExecutedJobs(response.getFeedName(), response.getFeedId());
    failJobs(response.getCategoryAndFeedName());
    abandonAllJobs(response.getCategoryAndFeedName());
}
Also used : FeedCategory(com.thinkbiganalytics.feedmgr.rest.model.FeedCategory) FeedMetadata(com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata) ImportTemplate(com.thinkbiganalytics.feedmgr.service.template.importing.model.ImportTemplate) Test(org.junit.Test)

Example 40 with FeedMetadata

use of com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata in project kylo by Teradata.

the class SlaIT method testSla.

@Test
public void testSla() throws IOException {
    copyDataToDropzone(TEST_FILE);
    LocalDateTime now = LocalDateTime.now();
    String systemName = now.format(DateTimeFormatter.ofPattern("HH_mm_ss_SSS"));
    FeedMetadata response = createSimpleFeed("sla_" + systemName, TEST_FILE);
    waitForFeedToComplete();
    ServiceLevelAgreementGroup oneHourAgoSla = createOneHourAgoFeedProcessingDeadlineSla(response.getCategoryAndFeedName(), response.getFeedId());
    triggerSla(oneHourAgoSla.getName());
    assertSLA(oneHourAgoSla.getId(), FAILURE);
    assertFilterByFailuresContains(oneHourAgoSla.getId());
    assertFilterBySuccessContainsNot(oneHourAgoSla.getId());
    assertFailedSlaAppearsInAlerts(oneHourAgoSla.getId());
    ServiceLevelAgreementGroup oneHourAheadSla = createOneHourAheadFeedProcessingDeadlineSla(response.getCategoryAndFeedName(), response.getFeedId());
    triggerSla(oneHourAheadSla.getName());
    assertFilterByFailuresContainsNot(oneHourAheadSla.getId());
    assertFilterBySuccessContains(oneHourAheadSla.getId());
    assertSuccessfulSlaAppearsNotInAlerts(oneHourAheadSla.getId());
    deleteExistingSla();
}
Also used : LocalDateTime(java.time.LocalDateTime) FeedMetadata(com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata) ServiceLevelAgreementGroup(com.thinkbiganalytics.feedmgr.sla.ServiceLevelAgreementGroup) Test(org.junit.Test)

Aggregations

FeedMetadata (com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata)76 NifiProperty (com.thinkbiganalytics.nifi.rest.model.NifiProperty)26 NifiFeed (com.thinkbiganalytics.feedmgr.rest.model.NifiFeed)23 FeedCategory (com.thinkbiganalytics.feedmgr.rest.model.FeedCategory)21 ArrayList (java.util.ArrayList)21 List (java.util.List)20 Collectors (java.util.stream.Collectors)20 RegisteredTemplate (com.thinkbiganalytics.feedmgr.rest.model.RegisteredTemplate)18 Set (java.util.Set)18 StringUtils (org.apache.commons.lang3.StringUtils)18 UIFeed (com.thinkbiganalytics.feedmgr.rest.model.UIFeed)17 Feed (com.thinkbiganalytics.metadata.api.feed.Feed)17 FeedSummary (com.thinkbiganalytics.feedmgr.rest.model.FeedSummary)16 Map (java.util.Map)16 Inject (javax.inject.Inject)16 Logger (org.slf4j.Logger)16 LoggerFactory (org.slf4j.LoggerFactory)16 FeedServicesAccessControl (com.thinkbiganalytics.feedmgr.security.FeedServicesAccessControl)15 AccessController (com.thinkbiganalytics.security.AccessController)15 Optional (java.util.Optional)15