Class AbstractSpout

    • Field Detail

      • ESStatusBucketFieldParamName

        protected static final String ESStatusBucketFieldParamName
        Field name to use for aggregating *
        See Also:
        Constant Field Values
      • ESStatusBucketSortFieldParamName

        protected static final String ESStatusBucketSortFieldParamName
        Field name to use for sorting the URLs within a bucket, not used if empty or null.
        See Also:
        Constant Field Values
      • ESStatusGlobalSortFieldParamName

        protected static final String ESStatusGlobalSortFieldParamName
        Field name to use for sorting the buckets, not used if empty or null.
        See Also:
        Constant Field Values
      • filterQueries

        protected List<String> filterQueries
        Query to use as a positive filter, set by es.status.filterQuery
      • indexName

        protected String indexName
      • client

        protected static org.elasticsearch.client.RestHighLevelClient client
      • shardID

        protected int shardID
        when using multiple instances - each one is in charge of a specific shard useful when sharding based on host or domain to guarantee a good mix of URLs
      • logIdprefix

        protected String logIdprefix
        Used to distinguish between instances in the logs *
      • partitionField

        protected String partitionField
        Field name used for field collapsing e.g. key *
      • maxURLsPerBucket

        protected int maxURLsPerBucket
      • maxBucketNum

        protected int maxBucketNum
      • bucketSortField

        protected List<String> bucketSortField
      • totalSortField

        protected String totalSortField
      • queryDate

        protected Date queryDate
      • queryTimeout

        protected int queryTimeout
    • Constructor Detail

      • AbstractSpout

        public AbstractSpout()
    • Method Detail

      • open

        public void open​(Map<String,​Object> stormConf,
                         org.apache.storm.task.TopologyContext context,
                         org.apache.storm.spout.SpoutOutputCollector collector)
        Specified by:
        open in interface org.apache.storm.spout.ISpout
        Overrides:
        open in class AbstractQueryingSpout
      • populateBuffer

        protected abstract void populateBuffer()
        Builds a query and use it retrieve the results from ES *
        Specified by:
        populateBuffer in class AbstractQueryingSpout
      • addHitToBuffer

        protected final boolean addHitToBuffer​(org.elasticsearch.search.SearchHit hit)
      • ack

        public void ack​(Object msgId)
        Specified by:
        ack in interface org.apache.storm.spout.ISpout
        Overrides:
        ack in class AbstractQueryingSpout
      • fail

        public void fail​(Object msgId)
        Specified by:
        fail in interface org.apache.storm.spout.ISpout
        Overrides:
        fail in class AbstractQueryingSpout
      • close

        public void close()
        Specified by:
        close in interface org.apache.storm.spout.ISpout
        Overrides:
        close in class org.apache.storm.topology.base.BaseRichSpout