Class GetZendesk

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.zendesk.AbstractZendesk
org.apache.nifi.processors.zendesk.GetZendesk
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

@PrimaryNodeOnly @TriggerSerially @InputRequirement(INPUT_FORBIDDEN) @DefaultSettings(yieldDuration="20 sec") @Tags("zendesk") @CapabilityDescription("Incrementally fetches data from Zendesk API.") @Stateful(scopes=CLUSTER, description="Paging cursor for Zendesk API is stored. Cursor is updated after each successful request.") @WritesAttributes(@WritesAttribute(attribute="record.count",description="The number of records fetched by the processor.")) @DefaultSchedule(strategy=TIMER_DRIVEN, period="1 min") public class GetZendesk extends AbstractZendesk
  • Field Details

    • HTTP_TOO_MANY_REQUESTS

      static final int HTTP_TOO_MANY_REQUESTS
      See Also:
    • ZENDESK_EXPORT_METHOD_NAME

      static final String ZENDESK_EXPORT_METHOD_NAME
      See Also:
    • ZENDESK_RESOURCE_NAME

      static final String ZENDESK_RESOURCE_NAME
      See Also:
    • ZENDESK_QUERY_START_TIMESTAMP_NAME

      static final String ZENDESK_QUERY_START_TIMESTAMP_NAME
      See Also:
    • RELATIONSHIPS

      private static final Set<org.apache.nifi.processor.Relationship> RELATIONSHIPS
    • ZENDESK_EXPORT_METHOD

      public static final org.apache.nifi.components.PropertyDescriptor ZENDESK_EXPORT_METHOD
    • ZENDESK_RESOURCE

      public static final org.apache.nifi.components.PropertyDescriptor ZENDESK_RESOURCE
    • ZENDESK_QUERY_START_TIMESTAMP

      public static final org.apache.nifi.components.PropertyDescriptor ZENDESK_QUERY_START_TIMESTAMP
    • DESCRIPTORS

      private static final List<org.apache.nifi.components.PropertyDescriptor> DESCRIPTORS
    • OBJECT_MAPPER

      private static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
    • JSON_FACTORY

      private static final com.fasterxml.jackson.core.JsonFactory JSON_FACTORY
  • Constructor Details

    • GetZendesk

      public GetZendesk()
  • Method Details

    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.apache.nifi.processor.AbstractSessionFactoryProcessor
    • getSupportedPropertyDescriptors

      public List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • customValidate

      protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext)
      Overrides:
      customValidate in class org.apache.nifi.components.AbstractConfigurableComponent
    • onTrigger

      public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session)
      Specified by:
      onTrigger in class org.apache.nifi.processor.AbstractProcessor
    • createUri

      private URI createUri(org.apache.nifi.processor.ProcessContext context, ZendeskResource zendeskResource, ZendeskExportMethod exportMethod)
    • getCursorState

      private String getCursorState(org.apache.nifi.processor.ProcessContext context, ZendeskResource zendeskResource, ZendeskExportMethod exportMethod)
    • httpResponseParser

      private org.apache.nifi.processor.io.OutputStreamCallback httpResponseParser(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.web.client.api.HttpResponseEntity response, ZendeskResource zendeskResource, ZendeskExportMethod exportMethod, AtomicInteger resultCount)
    • extractZendeskResourceData

      private int extractZendeskResourceData(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
      Throws:
      IOException
    • updateCursorState

      private void updateCursorState(org.apache.nifi.processor.ProcessContext context, ZendeskResource zendeskResource, ZendeskExportMethod exportMethod, String cursor)