Skip to content

Comments

KAFKA-6938: Add documentation for accessing Headers on Kafka Streams Processor API#5128

Merged
guozhangwang merged 2 commits intoapache:trunkfrom
jeqo:feature/docs-streams-headers
Jun 4, 2018
Merged

KAFKA-6938: Add documentation for accessing Headers on Kafka Streams Processor API#5128
guozhangwang merged 2 commits intoapache:trunkfrom
jeqo:feature/docs-streams-headers

Conversation

@jeqo
Copy link
Contributor

@jeqo jeqo commented Jun 3, 2018

Adding documentation to access Processor Context on Processor API.

@jeqo jeqo changed the title Documentation of streams ProcessorContext access KAFKA-6938: Add documentation for accessing Headers on Kafka Streams Processor API Jun 3, 2018
@jeqo
Copy link
Contributor Author

jeqo commented Jun 3, 2018

@guozhangwang here is a first draft of docs for accessing Processor Context. Let me now if the scope is fine. Also don't know how to test it. There is a gradle command to generate the docs?

Copy link
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeqo you can follow this page https://cwiki.apache.org/confluence/display/KAFKA/Setup+Kafka+Website+on+Local+Apache+Server

to check the result of the added content (feel free to also add a snapshot of the rendered page in the PR for other reviewers to check).

</ul>
</li>
<li><a class="reference internal" href="#connecting-processors-and-state-stores" id="id8">Connecting Processors and State Stores</a></li>
<li><a class="reference internal" href="#accessing-processor-context" id="id10">Accessing Processor Context</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why skip id9 and use id10 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id9 is already used by:

                <li><a class="reference internal" href="#unit-testing-processors" id="id9">Unit Testing Processors</a></li>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, thanks.

</div>
<div class="section" id="accessing-processor-context">
<h2><a class="toc-backref" href="#id10">Accessing Processor Context</a><a class="headerlink" href="#accessing-processor-context" title="Permalink to this headline"></a></h2>
<p><code class="docutils literal"><span class="pre">ProcessorContext</span></code> gives access to metadata related with Processor state and the current record being processed.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add one more sentence at the beginning: As we have mentioned in <href=#defining-a-stream-processor>Defining a Stream Processor<\href>, a <code>ProcessorContext</code> to control the processing workflow, such as scheduling a punctuation function, and committing the current processed state. This object can also be used to access the metadata related with...

@guozhangwang guozhangwang merged commit e8ddb76 into apache:trunk Jun 4, 2018
@mjsax
Copy link
Member

mjsax commented Jun 5, 2018

Should we add a section to the upgrade guide, "Streams API changes in 2.0.0" , too?

@guozhangwang
Copy link
Contributor

@mjsax I had thought about that when reviewing. I think we do not necessarily need to record all API changes if they are not directly related to upgrade path.

@mjsax
Copy link
Member

mjsax commented Jun 5, 2018

From my understanding, there are two sections: the one that describes relevant changes for upgrading only, and one that describes all API changes/improvements. Is my understanding incorrect?

ijuma added a commit to edoardocomar/kafka that referenced this pull request Jun 6, 2018
…grained-acl-create-topics

* apache-github/trunk:
  KAFKA-5588: Remove deprecated --new-consumer tools option (apache#5097)
  MINOR: Fix for the location of the trogdor.sh executable file in the documentation. (apache#5040)
  KAFKA-6997: Exclude test-sources.jar when $INCLUDE_TEST_JARS is FALSE
  MINOR: docs should point to latest version (apache#5132)
  KAFKA-6981: Move the error handling configuration properties into the ConnectorConfig and SinkConnectorConfig classes (KIP-298)
  [KAFKA-6730] Simplify State Store Recovery (apache#5013)
  MINOR: Rename package `internal` to `internals` for consistency (apache#5137)
  KAFKA-6704: InvalidStateStoreException from IQ when StreamThread closes store (apache#4801)
  MINOR: Add missing configs for resilience settings
  MINOR: Add regression tests for KTable mapValues and filter (apache#5134)
  KAFKA-6750: Add listener name to authentication context (KIP-282) (apache#4829)
  KAFKA-3665: Enable TLS hostname verification by default (KIP-294) (apache#4956)
  KAFKA-6938: Add documentation for accessing Headers on Kafka Streams Processor API (apache#5128)
  KAFKA-6813: return to double-counting for count topology names (apache#5075)
  KAFKA-5919; Adding checks on "version" field for tools using it
  MINOR: Remove deprecated KafkaStreams constructors in docs (apache#5118)
ijuma added a commit to big-andy-coates/kafka that referenced this pull request Jun 6, 2018
…refix

* apache-github/trunk:
  KAFKA-6726: Fine Grained ACL for CreateTopics (KIP-277) (apache#4795)
  KAFKA-5588: Remove deprecated --new-consumer tools option (apache#5097)
  MINOR: Fix for the location of the trogdor.sh executable file in the documentation. (apache#5040)
  KAFKA-6997: Exclude test-sources.jar when $INCLUDE_TEST_JARS is FALSE
  MINOR: docs should point to latest version (apache#5132)
  KAFKA-6981: Move the error handling configuration properties into the ConnectorConfig and SinkConnectorConfig classes (KIP-298)
  [KAFKA-6730] Simplify State Store Recovery (apache#5013)
  MINOR: Rename package `internal` to `internals` for consistency (apache#5137)
  KAFKA-6704: InvalidStateStoreException from IQ when StreamThread closes store (apache#4801)
  MINOR: Add missing configs for resilience settings
  MINOR: Add regression tests for KTable mapValues and filter (apache#5134)
  KAFKA-6750: Add listener name to authentication context (KIP-282) (apache#4829)
  KAFKA-3665: Enable TLS hostname verification by default (KIP-294) (apache#4956)
  KAFKA-6938: Add documentation for accessing Headers on Kafka Streams Processor API (apache#5128)
  KAFKA-6813: return to double-counting for count topology names (apache#5075)
  KAFKA-5919; Adding checks on "version" field for tools using it
  MINOR: Remove deprecated KafkaStreams constructors in docs (apache#5118)
@mjsax
Copy link
Member

mjsax commented Jun 14, 2018

From my understanding, there are two sections: the one that describes relevant changes for upgrading only, and one that describes all API changes/improvements. Is my understanding incorrect?

\cc @guozhangwang Comments?

@guozhangwang
Copy link
Contributor

Sorry for the late reply.

I think you are correct. We should add this into the docs upgrade section. @jeqo could you file a follow-up PR? If you do not have time we can do it to make sure it gets in before the code freeze.

@jeqo
Copy link
Contributor Author

jeqo commented Jun 19, 2018 via email

@guozhangwang
Copy link
Contributor

No worries, I can pick it up.

ying-zheng pushed a commit to ying-zheng/kafka that referenced this pull request Jul 6, 2018
…Processor API (apache#5128)

Reviewers: Guozhang Wang <wangguoz@gmail.com>
@jeqo jeqo deleted the feature/docs-streams-headers branch August 8, 2020 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants