Class URLPartitioner


  • public class URLPartitioner
    extends Object
    Generates a partition key for a given URL based on the hostname, domain or IP address. This can be called by the URLPartitionerBolt or any other component.
    • Constructor Detail

      • URLPartitioner

        public URLPartitioner()
    • Method Detail

      • getPartition

        public static String getPartition​(String url,
                                          Metadata metadata,
                                          String partitionMode)
        Returns the host, domain, IP of a URL so that it can be partitioned for politeness, depending on the value of the parameter partitionMode.
      • getPartition

        public String getPartition​(String url,
                                   Metadata metadata)
        Returns the host, domain, IP of a URL so that it can be partitioned for politeness, depending on the value of the config partition.url.mode.
      • configure

        public void configure​(Map stormConf)