Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-17215

Remove get-prefix for all getters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • streams, streams-test-utils

    Description

      Kafka traditionally does not use a `get` prefix for getter methods. However, for multiple public interfaces, we don't follow this common pattern, but actually have a get-prefix.

      We might want to clean this up. The upcoming 4.0 release might be a good opportunity to deprecate existing methods and add them back with the "correct" name.

      We should maybe also do multiple smaller KIPs instead of just one big KIP. We do know of the following

      • StreamsConfig (getMainConsumerConfigs, getRestoreConsumerConfigs, getGlobalConsumerConfigs, getProducerConfigs, getAdminConfigs, getClientTags, getKafkaClientSupplier – for some of these, we might even consider to remove them; it's questionable if it makes sense to have them in the public API (cf https://github.com/apache/kafka/pull/14548) – we should also consider https://issues.apache.org/jira/browse/KAFKA-16945 for this work)
      • TopologyConfig (getTaskConfig)
      • KafkaClientSupplier (getAdmin, getProducer, getConsumer, getRestoreConsumer, getGlobalConsumer)
      • Contexts (maybe not worth it... we might deprecate the whole class soon):
        • ProcessorContext (getStateStore)
        • MockProcessorContext (getStateStore)
        • MockProcessorContext#CapturedPunctuator (getIntervalMs, getType, getPunctuator),
      • api.ProcessingContext (getStateStore)
        • api.FixedKeyProcessorContext (getStateStore)
        • api.MockProcessorContext (getStateStore, getStateStoreContext)
        • api.MockProcessorContext#CapturedPunctuator (getInterval, getType, getPunctuator)
      • StateStore (getPosition)

       

      • IQv2: officially an evolving API (maybe we can rename in 4.0 directly w/o deprecation period, but might be nasty...)
        • KeyQuery (getKey) 
        • Position (getTopics, getPartitionPositions)
        • QueryResult (getExecutionInfo, getPosition, getFailureReason, getFailureMessage, getResult)
        • RangeQuery (getLowerBound, getUpperBound)
        • StateQueryRequest (getStoreName, getPositionBound, getQuery, getPartitions)
        • StateQueryResult (getPartitionResults, getOnlyPartitionResult, getGlobalResult, getPosition)
        • WindowKeyQuery (getKey, getTimeFrom, getTimeTo, 
        • WindowRangeQuery (getKey, getTimeFrom, getTimeTo)

       

      • TopologyTestDriver (getAllStateStores, getStateStore, getKeyValueStore, getTimestampedKeyValueStore, getVersionedKeyValueStore, getWindowStore, getTimestampedWindowStore, getSessionStore)
      • TestOutputTopic (getQueueSize)
      • TestRecord (getHeaders, getKey, getValue, getRecordTime)

      Attachments

        Activity

          People

            Unassigned Unassigned
            mjsax Matthias J. Sax
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: