forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-8537] [table] Add a Kafka table source factory with Avro forma…
…t support This closes apache#5610.
- Loading branch information
Showing
33 changed files
with
1,288 additions
and
433 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...main/java/org/apache/flink/streaming/connectors/kafka/Kafka010AvroTableSourceFactory.java
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,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_010; | ||
|
||
/** | ||
* Factory for creating configured instances of {@link Kafka010AvroTableSource}. | ||
*/ | ||
public class Kafka010AvroTableSourceFactory extends KafkaAvroTableSourceFactory { | ||
|
||
@Override | ||
protected KafkaAvroTableSource.Builder createKafkaAvroBuilder() { | ||
return new Kafka010AvroTableSource.Builder(); | ||
} | ||
|
||
@Override | ||
protected String kafkaVersion() { | ||
return CONNECTOR_VERSION_VALUE_010; | ||
} | ||
} |
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
37 changes: 37 additions & 0 deletions
37
.../java/org/apache/flink/streaming/connectors/kafka/Kafka010AvroTableSourceFactoryTest.java
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,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_010; | ||
|
||
/** | ||
* Tests for {@link Kafka010AvroTableSourceFactory}. | ||
*/ | ||
public class Kafka010AvroTableSourceFactoryTest extends KafkaAvroTableSourceFactoryTestBase { | ||
|
||
@Override | ||
protected String version() { | ||
return CONNECTOR_VERSION_VALUE_010; | ||
} | ||
|
||
@Override | ||
protected KafkaAvroTableSource.Builder builder() { | ||
return Kafka010AvroTableSource.builder(); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...main/java/org/apache/flink/streaming/connectors/kafka/Kafka011AvroTableSourceFactory.java
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,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_011; | ||
|
||
/** | ||
* Factory for creating configured instances of {@link Kafka011AvroTableSource}. | ||
*/ | ||
public class Kafka011AvroTableSourceFactory extends KafkaAvroTableSourceFactory { | ||
|
||
@Override | ||
protected KafkaAvroTableSource.Builder createKafkaAvroBuilder() { | ||
return new Kafka011AvroTableSource.Builder(); | ||
} | ||
|
||
@Override | ||
protected String kafkaVersion() { | ||
return CONNECTOR_VERSION_VALUE_011; | ||
} | ||
} |
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
37 changes: 37 additions & 0 deletions
37
.../java/org/apache/flink/streaming/connectors/kafka/Kafka011AvroTableSourceFactoryTest.java
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,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_011; | ||
|
||
/** | ||
* Tests for {@link Kafka011AvroTableSourceFactory}. | ||
*/ | ||
public class Kafka011AvroTableSourceFactoryTest extends KafkaAvroTableSourceFactoryTestBase { | ||
|
||
@Override | ||
protected String version() { | ||
return CONNECTOR_VERSION_VALUE_011; | ||
} | ||
|
||
@Override | ||
protected KafkaAvroTableSource.Builder builder() { | ||
return Kafka011AvroTableSource.builder(); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
.../main/java/org/apache/flink/streaming/connectors/kafka/Kafka08AvroTableSourceFactory.java
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,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_08; | ||
|
||
/** | ||
* Factory for creating configured instances of {@link Kafka08AvroTableSource}. | ||
*/ | ||
public class Kafka08AvroTableSourceFactory extends KafkaAvroTableSourceFactory { | ||
|
||
@Override | ||
protected KafkaAvroTableSource.Builder createKafkaAvroBuilder() { | ||
return new Kafka08AvroTableSource.Builder(); | ||
} | ||
|
||
@Override | ||
protected String kafkaVersion() { | ||
return CONNECTOR_VERSION_VALUE_08; | ||
} | ||
} |
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
37 changes: 37 additions & 0 deletions
37
...t/java/org/apache/flink/streaming/connectors/kafka/Kafka08AvroTableSourceFactoryTest.java
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,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_08; | ||
|
||
/** | ||
* Tests for {@link Kafka08AvroTableSourceFactory}. | ||
*/ | ||
public class Kafka08AvroTableSourceFactoryTest extends KafkaAvroTableSourceFactoryTestBase { | ||
|
||
@Override | ||
protected String version() { | ||
return CONNECTOR_VERSION_VALUE_08; | ||
} | ||
|
||
@Override | ||
protected KafkaAvroTableSource.Builder builder() { | ||
return Kafka08AvroTableSource.builder(); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
.../main/java/org/apache/flink/streaming/connectors/kafka/Kafka09AvroTableSourceFactory.java
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,36 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_09; | ||
|
||
/** | ||
* Factory for creating configured instances of {@link Kafka09AvroTableSource}. | ||
*/ | ||
public class Kafka09AvroTableSourceFactory extends KafkaAvroTableSourceFactory { | ||
@Override | ||
protected KafkaAvroTableSource.Builder createKafkaAvroBuilder() { | ||
return new Kafka09AvroTableSource.Builder(); | ||
} | ||
|
||
@Override | ||
protected String kafkaVersion() { | ||
return CONNECTOR_VERSION_VALUE_09; | ||
} | ||
} |
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
37 changes: 37 additions & 0 deletions
37
...t/java/org/apache/flink/streaming/connectors/kafka/Kafka09AvroTableSourceFactoryTest.java
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,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.streaming.connectors.kafka; | ||
|
||
import static org.apache.flink.table.descriptors.KafkaValidator.CONNECTOR_VERSION_VALUE_09; | ||
|
||
/** | ||
* Tests for {@link Kafka09AvroTableSourceFactory}. | ||
*/ | ||
public class Kafka09AvroTableSourceFactoryTest extends KafkaAvroTableSourceFactoryTestBase { | ||
|
||
@Override | ||
protected String version() { | ||
return CONNECTOR_VERSION_VALUE_09; | ||
} | ||
|
||
@Override | ||
protected KafkaAvroTableSource.Builder builder() { | ||
return Kafka09AvroTableSource.builder(); | ||
} | ||
} |
Oops, something went wrong.