当前位置: 首页>>代码示例>>Java>>正文


Java SourceConnector类代码示例

本文整理汇总了Java中org.apache.kafka.connect.source.SourceConnector的典型用法代码示例。如果您正苦于以下问题:Java SourceConnector类的具体用法?Java SourceConnector怎么用?Java SourceConnector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SourceConnector类属于org.apache.kafka.connect.source包,在下文中一共展示了SourceConnector类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testListConnectorPlugins

import org.apache.kafka.connect.source.SourceConnector; //导入依赖的package包/类
@Test
public void testListConnectorPlugins() throws Exception {
    expectPlugins();
    Set<ConnectorPluginInfo> connectorPlugins = new HashSet<>(connectorPluginsResource.listConnectorPlugins());
    assertFalse(connectorPlugins.contains(newInfo(Connector.class, "0.0")));
    assertFalse(connectorPlugins.contains(newInfo(SourceConnector.class, "0.0")));
    assertFalse(connectorPlugins.contains(newInfo(SinkConnector.class, "0.0")));
    assertFalse(connectorPlugins.contains(newInfo(VerifiableSourceConnector.class)));
    assertFalse(connectorPlugins.contains(newInfo(VerifiableSinkConnector.class)));
    assertFalse(connectorPlugins.contains(newInfo(MockSourceConnector.class)));
    assertFalse(connectorPlugins.contains(newInfo(MockSinkConnector.class)));
    assertFalse(connectorPlugins.contains(newInfo(MockConnector.class)));
    assertFalse(connectorPlugins.contains(newInfo(SchemaSourceConnector.class)));
    assertTrue(connectorPlugins.contains(newInfo(ConnectorPluginsResourceTestConnector.class)));
    PowerMock.verifyAll();
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:17,代码来源:ConnectorPluginsResourceTest.java

示例2: before

import org.apache.kafka.connect.source.SourceConnector; //导入依赖的package包/类
@BeforeEach
public void before() throws MalformedURLException {
  log.info("before() - Configuring reflections to use package '{}'", packages());

  if (null == this.reflections) {
    this.reflections = new Reflections(new ConfigurationBuilder()
        .setUrls(ClasspathHelper.forJavaClassPath())
        .forPackages(packages())
    );
  }

  List<Class<? extends Transformation>> transformClasses = list(Transformation.class);
  List<Class<? extends SourceConnector>> sourceConnectorClasses = list(SourceConnector.class);
  List<Class<? extends SinkConnector>> sinkConnectorClasses = list(SinkConnector.class);

  this.pluginTemplate = PluginTemplate.from(sourceConnectorClasses, sinkConnectorClasses, transformClasses);
}
 
开发者ID:jcustenborder,项目名称:connect-utils,代码行数:18,代码来源:BaseDocumentationTest.java

示例3: from

import org.apache.kafka.connect.source.SourceConnector; //导入依赖的package包/类
public static PluginTemplate from(List<Class<? extends SourceConnector>> sourceConnectorClasses, List<Class<? extends SinkConnector>> sinkConnectorClasses, List<Class<? extends Transformation>> transformationClasses) {
  final List<SourceConnectorTemplate> sourceConnectors = sourceConnectorClasses.stream()
      .map(aClass -> new SourceConnectorTemplate(aClass))
      .collect(Collectors.toList());
  final List<SinkConnectorTemplate> sinkConnectors = sinkConnectorClasses.stream()
      .map(aClass -> new SinkConnectorTemplate(aClass))
      .collect(Collectors.toList());
  final List<TransformationTemplate> transformations = transformationClasses.stream()
      .map(aClass -> new TransformationTemplate(aClass))
      .collect(Collectors.toList());

  return new PluginTemplate(sourceConnectors, sinkConnectors, transformations);
}
 
开发者ID:jcustenborder,项目名称:connect-utils,代码行数:14,代码来源:PluginTemplate.java

示例4: testConnectorType

import org.apache.kafka.connect.source.SourceConnector; //导入依赖的package包/类
@Test
public void testConnectorType() {
    Connector connector = new MQSourceConnector();
    assertTrue(SourceConnector.class.isAssignableFrom(connector.getClass()));
}
 
开发者ID:ibm-messaging,项目名称:kafka-connect-mq-source,代码行数:6,代码来源:MQSourceConnectorTest.java


注:本文中的org.apache.kafka.connect.source.SourceConnector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。