Skip to content

Commit

Permalink
Rst (#2)
Browse files Browse the repository at this point in the history
* Corrected method name due to conflict with parent class.

* Added documentation.

* Bump the parent pom version.

* Changed the title of the documentation.

* Added more documentation.

* Moved to 0.10.2.1-cp2
  • Loading branch information
jcustenborder authored Jul 18, 2017
1 parent 06c2c69 commit 02f984a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 20 deletions.
38 changes: 38 additions & 0 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
========================
Amazon Kinesis Connector
========================

The Amazon Kinesis Connector provides a :term:`source connector for reading data from `Amazon Kinesis <https://aws.amazon.com/kinesis/>`_
and persisting the data to a :term:`Kafka topic`.

.. toctree::
:maxdepth: 1
:caption: Source Connectors:
:glob:

sources/*


.. toctree::
:maxdepth: 1
:caption: Sink Connectors:
:glob:

sinks/*


.. toctree::
:maxdepth: 1
:caption: Transformations:
:glob:

transformations/*


.. toctree::
:maxdepth: 0
:caption: Schemas:
:hidden:

schemas

5 changes: 1 addition & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.github.jcustenborder.kafka.connect</groupId>
<artifactId>kafka-connect-parent</artifactId>
<version>0.10.2.0-cp1</version>
<version>0.10.2.1-cp2</version>
</parent>
<artifactId>kafka-connect-kinesis</artifactId>
<version>0.1.0-SNAPSHOT</version>
Expand All @@ -47,9 +47,6 @@
</roles>
</developer>
</developers>
<prerequisites>
<maven>3.3.0</maven>
</prerequisites>
<scm>
<connection>scm:git:https://github.com/jcustenborder/kafka-connect-kinesis.git</connection>
<developerConnection>scm:git:[email protected]:jcustenborder/kafka-connect-kinesis.git</developerConnection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.amazonaws.services.kinesis.model.Shard;
import com.amazonaws.services.kinesis.model.StreamDescription;
import com.github.jcustenborder.kafka.connect.utils.VersionUtil;
import com.github.jcustenborder.kafka.connect.utils.config.Description;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.apache.kafka.common.config.ConfigDef;
Expand All @@ -36,6 +37,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@Description("The KinesisSourceConnector is a :term:`Source Connector` that is used to pull data from Amazon Kinesis in " +
"realtime and persist the data to a Kafka topic.")
public class KinesisSourceConnector extends SourceConnector {
private static final Logger log = LoggerFactory.getLogger(KinesisSourceConnector.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
package com.github.jcustenborder.kafka.connect.kinesis;

import com.github.jcustenborder.kafka.connect.utils.BaseDocumentationTest;
import com.github.jcustenborder.kafka.connect.utils.config.MarkdownFormatter;
import org.apache.kafka.connect.data.Schema;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;
import java.util.List;

public class DocumentationTest extends BaseDocumentationTest {
private static final Logger log = LoggerFactory.getLogger(DocumentationTest.class);

Expand All @@ -30,19 +31,8 @@ protected String[] packages() {
return new String[]{this.getClass().getPackage().getName()};
}

@Test
public void schema() {
Schema[] schemas = new Schema[]{
RecordConverter.SCHEMA_KINESIS_KEY,
RecordConverter.SCHEMA_KINESIS_VALUE
};

StringBuilder builder = new StringBuilder();
for (Schema schema : schemas) {
builder.append(MarkdownFormatter.toMarkdown(schema));
builder.append('\n');
}

log.info("\n{}", builder);
@Override
protected List<Schema> schemas() {
return Arrays.asList(RecordConverter.SCHEMA_KINESIS_KEY, RecordConverter.SCHEMA_KINESIS_VALUE);
}
}

0 comments on commit 02f984a

Please sign in to comment.