-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #65: added some documentation * Minor alignment * #65: Added various contexts usable within SDK * #65: update data exchange * Class fix * #65: added support functions * Update exception used in methods * #65: General review of .NET side Connect SDK classes * Update test/template classes following review of SDK classes * Documentation update * Fix class name * Fixed namespace naming
- Loading branch information
1 parent
9d4262b
commit 486e384
Showing
32 changed files
with
521 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# KNet: Connect SDK | ||
|
||
This is only a quick start guide, many other information related to Apache Kafka Connect can be found at the following link https://kafka.apache.org/documentation/#connect | ||
|
||
## General | ||
|
||
To start a Connect session the user shall use the [KNet CLI](usageCLI.md). | ||
|
||
The commands related to Apache Kafka Connect are: | ||
- ConnectDistributed | ||
- ConnectStandalone | ||
|
||
To go in detail look at https://kafka.apache.org/documentation/#connect and https://kafka.apache.org/quickstart#quickstart_kafkaconnect. | ||
|
||
## Standalone | ||
|
||
In this guide we focus on the standalone version. | ||
The guide start from the assumption that an assembly was generated: see [Template Usage Guide](usageTemplates.md). | ||
Put the assembly within a folder (__C:\MyConnect__), then go within it. | ||
As explained in https://kafka.apache.org/documentation/#connect Apache Kafka Connect needs at least one configuration file, in standalone mode it needs two configuration files: | ||
1. The first file is **connect-standalone.properties** (or **connect-distributed.properties** for distributed environments): this file contains configuration information for Apache Kafka Connect; | ||
2. The second optional file defines the connector to use and its options. | ||
|
||
In the [config folder](https://github.com/masesgroup/KNet/tree/master/src/config) the user can found many configuration files. | ||
The files named **connect-knet-sink.properties** and **connect-knet-source.properties** contain examples for sink and source connectors. | ||
|
||
Copy within __C:\MyConnect__ **connect-standalone.properties** and update it especially on line containing __bootstrap.servers__, then copy **connect-knet-sink.properties** or **connect-knet-source.properties** depending on the connector type. | ||
The main options related to KNet Connect SDK are: | ||
- __connector.class=**KNetSinkConnector**__ where the value is the connector Java class and must be: | ||
- __KNetSinkConnector__ for sink connectors | ||
- __KNetSourceConnector__ for source connectors | ||
- __knet.dotnet.classname=MASES.KNetTemplate.KNetConnect.KNetConnectSink, knetConnectSink__ where the value is the .NET class name in the form of __**FullName**, **AssemblyName**__ | ||
|
||
When the __C:\MyConnect__ folder contains all the files it is possible to run Apache Kafka Connect: | ||
|
||
> | ||
> knet -ClassToRun ConnectStandalone connect-standalone.properties connect-knet-sink.properties | ||
> | ||
## Distributed | ||
|
||
As stated in [Apache Kafka Connect Guide](https://kafka.apache.org/documentation/#connect ) the distributed version does not use the connector file definition, instead it shall be managed using the REST interface. | ||
The start-up command within __C:\MyConnect__ folder becomes: | ||
|
||
> | ||
> knet -ClassToRun ConnectDistributed connect-distributed.properties | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
- name: Introduction | ||
href: intro.md | ||
- name: Roadmap | ||
- name: KNet Roadmap | ||
href: roadmap.md | ||
- name: Actual state | ||
- name: KNet Actual state | ||
href: actualstate.md | ||
- name: Performance | ||
- name: KNet Performance | ||
href: performance.md | ||
- name: APIs extendibility | ||
- name: KNet APIs extendibility | ||
href: API_extensibility.md | ||
- name: JVM callbacks | ||
- name: KNet JVM callbacks | ||
href: jvm_callbacks.md | ||
- name: Usage | ||
- name: KNet Connect SDK | ||
href: connectSDK.md | ||
- name: KNet Usage | ||
href: usage.md | ||
- name: Usage CLI | ||
- name: KNet CLI Usage | ||
href: usageCLI.md | ||
- name: KNet Template Usage Guide | ||
href: usageTemplates.md | ||
- name: How to build from scratch | ||
href: howtobuild.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# KNet: Template Usage Guide | ||
|
||
For more information related to .NET templates look at https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new-sdk-templates. | ||
|
||
## Installation | ||
|
||
To install the templates executes the following command within a command shell: | ||
|
||
> | ||
> dotnet new --install MASES.KNet.Templates | ||
> | ||
The command installs the latest version and on success will list all templates added to the list of available templates. | ||
They are: | ||
1. knetConsumerApp: a project to create a consumer application for Apache Kafka | ||
2. knetPipeStreamApp: a project to create a pipe stream application for Apache Kafka Streams | ||
3. knetProducerApp: a project to create a producer application for Apache Kafka | ||
4. knetConnectSink: a project to create a library which conforms to an Apache Kafka Connect Sink Connector written in .NET | ||
5. knetConnectSource: a project to create a library which conforms to an Apache Kafka Connect Source Connector written in .NET | ||
|
||
## Simple usage | ||
|
||
The first three templates are ready made project with enough code to use them directly. | ||
To use one of the available templates run the following command: | ||
|
||
> | ||
> dotnet new knetConsumerApp | ||
> | ||
the previous command will create a .NET project for an executable. The user can modify the code or just execute it against an Apache Kafka server. | ||
|
||
## SDK templates | ||
|
||
The last two templates (knetConnectSink, knetConnectSource) are not ready made project: they are skeletons for Apache Kafka Connect Source/Sink Connector written in .NET. | ||
The available code does not do anything: the functions in the code shall be filled to obtain some results. | ||
|
||
With the available code the user can verify how an Apache Kafka Connect Source/Sink Connector, written in .NET, works; to do this the projects can be compiled to obtain an assembly. | ||
See [Connect SDK](connectSDK.md) for some information on how use it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.