You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/05/20 07:54:52 UTC
[GitHub] [flink] deadwind4 opened a new pull request, #19775: [FLINK-27690][python][connector/pulsar] Add Python documentation and examples for Pulsar connector
deadwind4 opened a new pull request, #19775:
URL: https://github.com/apache/flink/pull/19775
## What is the purpose of the change
Add Python documentation and examples for Pulsar connector
## Brief change log
- *Add a pulsar example in examples/datastream/connectors*
- *Add pulsar source documents*
## Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
- The serializer: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (docs)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #19775: [FLINK-27690][python][connector/pulsar] Add Python documentation and examples for Pulsar connector
Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #19775:
URL: https://github.com/apache/flink/pull/19775#issuecomment-1132597683
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e87bf9dd9ed6f07964219ce1d04a2554ff5885f8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e87bf9dd9ed6f07964219ce1d04a2554ff5885f8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e87bf9dd9ed6f07964219ce1d04a2554ff5885f8 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] dianfu commented on a diff in pull request #19775: [FLINK-27690][python][connector/pulsar] Add Python documentation and examples for Pulsar connector
Posted by GitBox <gi...@apache.org>.
dianfu commented on code in PR #19775:
URL: https://github.com/apache/flink/pull/19775#discussion_r879373137
##########
docs/content/docs/connectors/datastream/pulsar.md:
##########
@@ -169,13 +224,32 @@ you can use the predefined `PulsarDeserializationSchema`. Pulsar connector provi
PulsarDeserializationSchema.pulsarSchema(Schema, Class, Class);
```
- Decode the message by using Flink's `DeserializationSchema`
+ {{< tabs "pulsar-deserializer-deserialization-schema" >}}
+ {{< tab "Java" >}}
```java
PulsarDeserializationSchema.flinkSchema(DeserializationSchema);
```
+ {{< /tab >}}
+ {{< tab "Python" >}}
+ ```python
+ PulsarDeserializationSchema.flink_schema(DeserializationSchema)
+ ```
+ {{< /tab >}}
+ {{< /tabs >}}
+
- Decode the message by using Flink's `TypeInformation`
+ {{< tabs "pulsar-deserializer-type-information" >}}
+ {{< tab "Java" >}}
```java
PulsarDeserializationSchema.flinkTypeInfo(TypeInformation, ExecutionConfig);
```
+ {{< /tab >}}
+ {{< tab "Python" >}}
+ ```python
+ PulsarDeserializationSchema.flink_type_info(TypeInformation, ExecutionConfig)
Review Comment:
Currently, it's not possible to create ExecutionConfig in Python and so I have merged one commit(https://github.com/apache/flink/commit/73590f432d8dc4cd53f0357025e250a823e6b857) to allow create PulsarDeserializationSchema without specifying ExecutionConfig. So what about suggest users to use `PulsarDeserializationSchema.flink_type_info(TypeInformation)` here?
##########
docs/content/docs/connectors/datastream/pulsar.md:
##########
@@ -335,12 +486,27 @@ job, the Pulsar source periodically discover new partitions under a provided
topic-partition subscription pattern. To enable partition discovery, you can set a non-negative value for
the `PulsarSourceOptions.PULSAR_PARTITION_DISCOVERY_INTERVAL_MS` option:
+{{< tabs "pulsar-dynamic-partition-discovery" >}}
+{{< tab "Java" >}}
+
```java
// discover new partitions per 10 seconds
PulsarSource.builder()
.setConfig(PulsarSourceOptions.PULSAR_PARTITION_DISCOVERY_INTERVAL_MS, 10000);
```
+{{< /tab >}}
+{{< tab "Python" >}}
+
+```python
+# discover new partitions per 10 seconds
+PulsarSource.builder()
+ .set_config(PulsarSourceOptions.PULSAR_PARTITION_DISCOVERY_INTERVAL_MS, 10000)
Review Comment:
```suggestion
.set_config("pulsar.source.partitionDiscoveryIntervalMs", 10000)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] dianfu closed pull request #19775: [FLINK-27690][python][connector/pulsar] Add Python documentation and examples for Pulsar connector
Posted by GitBox <gi...@apache.org>.
dianfu closed pull request #19775: [FLINK-27690][python][connector/pulsar] Add Python documentation and examples for Pulsar connector
URL: https://github.com/apache/flink/pull/19775
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deadwind4 commented on pull request #19775: [FLINK-27690][python][connector/pulsar] Add Python documentation and examples for Pulsar connector
Posted by GitBox <gi...@apache.org>.
deadwind4 commented on PR #19775:
URL: https://github.com/apache/flink/pull/19775#issuecomment-1132597175
When https://github.com/apache/flink/pull/19774 and https://github.com/apache/flink/pull/19771 merged, I will continue this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org