-
-
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.
Remove dependencies from knet connect sdk of jnet types (Map, Collect…
…ion, etc) (#127) * #92: upgrade to JNet 1.4.15 * #125: upgrade API to remove usage of Java types like Map, Collection and so on * #125: test upgrade
- Loading branch information
1 parent
b94dd99
commit 6a8ead8
Showing
10 changed files
with
105 additions
and
83 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
24 changes: 12 additions & 12 deletions
24
src/net/templates/templates/knetConnectSink/KNetConnectSink.cs
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,42 +1,42 @@ | ||
using Java.Util; | ||
using MASES.KNet.Connect; | ||
using MASES.KNet.Connect; | ||
using MASES.KNet.Connect.Sink; | ||
using System.Collections.Generic; | ||
|
||
namespace MASES.KNetTemplate.KNetConnect | ||
{ | ||
public class KNetConnectSink : KNetSinkConnector<KNetConnectSink, KNetConnectSinkTask> | ||
{ | ||
public override void Start(Map<string, string> props) | ||
public override void Start(IReadOnlyDictionary<string, string> props) | ||
{ | ||
|
||
// starts the connector, the method receives the configuration properties | ||
} | ||
|
||
public override void Stop() | ||
{ | ||
|
||
// stops the connector | ||
} | ||
|
||
public override void TaskConfigs(int index, Map<string, string> config) | ||
public override void TaskConfigs(int index, IDictionary<string, string> config) | ||
{ | ||
|
||
// fill in the properties for task configuration | ||
} | ||
} | ||
|
||
public class KNetConnectSinkTask : KNetSinkTask<KNetConnectSinkTask> | ||
{ | ||
public override void Put(Collection<SinkRecord> collection) | ||
public override void Put(IEnumerable<SinkRecord> collection) | ||
{ | ||
|
||
// receives the records from Apache Kafka Connect to be used from connector | ||
} | ||
|
||
public override void Start(Map<string, string> props) | ||
public override void Start(IReadOnlyDictionary<string, string> props) | ||
{ | ||
|
||
// starts the task with the configuration set from connector | ||
} | ||
|
||
public override void Stop() | ||
{ | ||
|
||
// stops the task | ||
} | ||
} | ||
} |
33 changes: 12 additions & 21 deletions
33
src/net/templates/templates/knetConnectSource/KNetConnectSource.cs
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,52 +1,43 @@ | ||
using Java.Util; | ||
using MASES.KNet.Connect; | ||
using MASES.KNet.Connect; | ||
using MASES.KNet.Connect.Source; | ||
using System.Collections.Generic; | ||
|
||
namespace MASES.KNetTemplate.KNetConnect | ||
{ | ||
public class KNetConnectSource : KNetSourceConnector<KNetConnectSource, KNetConnectSourceTask> | ||
{ | ||
public override void Start(Map<string, string> props) | ||
public override void Start(IReadOnlyDictionary<string, string> props) | ||
{ | ||
|
||
// starts the connector, the method receives the configuration properties | ||
} | ||
|
||
public override void Stop() | ||
{ | ||
|
||
} | ||
|
||
public override void TaskConfigs(int index, Map<string, string> config) | ||
{ | ||
|
||
// stops the connector | ||
} | ||
|
||
public override ExactlyOnceSupport ExactlyOnceSupport() | ||
public override void TaskConfigs(int index, IDictionary<string, string> config) | ||
{ | ||
return KNet.Connect.Source.ExactlyOnceSupport.UNSUPPORTED; | ||
} | ||
|
||
public override ConnectorTransactionBoundaries CanDefineTransactionBoundaries() | ||
{ | ||
return ConnectorTransactionBoundaries.UNSUPPORTED; | ||
// fill in the properties for task configuration | ||
} | ||
} | ||
|
||
public class KNetConnectSourceTask : KNetSourceTask<KNetConnectSourceTask> | ||
{ | ||
public override List<SourceRecord> Poll() | ||
public override IList<SourceRecord> Poll() | ||
{ | ||
// returns the records to Apache Kafka Connect to be used from connector | ||
return null; | ||
} | ||
|
||
public override void Start(Map<string, string> props) | ||
public override void Start(IReadOnlyDictionary<string, string> props) | ||
{ | ||
|
||
// starts the task with the configuration set from connector | ||
} | ||
|
||
public override void Stop() | ||
{ | ||
|
||
// stops the task | ||
} | ||
} | ||
} |
Oops, something went wrong.