Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Fix get schemaName by partitioned topic name #7708

Merged
merged 2 commits into from
Aug 5, 2020

Conversation

gaoran10
Copy link
Contributor

@gaoran10 gaoran10 commented Jul 31, 2020

Fixes #7676

Motivation

Currently, there is an error that gets schemaName by partitioned topic name.

Modifications

Add partitioned check in method topicName. getSchemaName().

Verifying this change

Add a new unit test.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (yes)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

@@ -342,7 +342,9 @@ public boolean isGlobal() {
public String getSchemaName() {
return getTenant()
+ "/" + getNamespacePortion()
+ "/" + getEncodedLocalName();
+ "/" + (isPartitioned() ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getPartitionedTopicName already implemented the functionality

Copy link
Contributor Author

@gaoran10 gaoran10 Jul 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I could reuse it, but the method getPartitionedTopicName will return a complete topic name with the domain. Maybe I could get the encodedLocalName in this way.

TopicName.get(getPartitionedTopicName()).getEncodedLocalName()

@gaoran10
Copy link
Contributor Author

gaoran10 commented Aug 1, 2020

/pulsarbot run-failure-checks

5 similar comments
@gaoran10
Copy link
Contributor Author

gaoran10 commented Aug 2, 2020

/pulsarbot run-failure-checks

@gaoran10
Copy link
Contributor Author

gaoran10 commented Aug 2, 2020

/pulsarbot run-failure-checks

@gaoran10
Copy link
Contributor Author

gaoran10 commented Aug 2, 2020

/pulsarbot run-failure-checks

@gaoran10
Copy link
Contributor Author

gaoran10 commented Aug 2, 2020

/pulsarbot run-failure-checks

@gaoran10
Copy link
Contributor Author

gaoran10 commented Aug 3, 2020

/pulsarbot run-failure-checks

@codelipenghui codelipenghui added this to the 2.7.0 milestone Aug 3, 2020
@codelipenghui codelipenghui added release/2.6.1 component/schemaregistry type/bug The PR fixed a bug or issue reported a bug labels Aug 3, 2020
@codelipenghui codelipenghui merged commit 7525ab9 into apache:master Aug 5, 2020
wolfstudy pushed a commit that referenced this pull request Aug 5, 2020
Fixes #7676 

### Motivation

Currently, there is an error that gets schemaName by partitioned topic name.

### Modifications

Add partitioned check in method `topicName. getSchemaName()`.

(cherry picked from commit 7525ab9)
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
Fixes apache#7676 

### Motivation

Currently, there is an error that gets schemaName by partitioned topic name.

### Modifications

Add partitioned check in method `topicName. getSchemaName()`.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Sep 5, 2020
Fixes apache#7676 

### Motivation

Currently, there is an error that gets schemaName by partitioned topic name.

### Modifications

Add partitioned check in method `topicName. getSchemaName()`.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Sep 5, 2020
Fixes apache#7676 

### Motivation

Currently, there is an error that gets schemaName by partitioned topic name.

### Modifications

Add partitioned check in method `topicName. getSchemaName()`.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Sep 5, 2020
Fixes apache#7676 

### Motivation

Currently, there is an error that gets schemaName by partitioned topic name.

### Modifications

Add partitioned check in method `topicName. getSchemaName()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/2.6.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subscribing to individual partition with AUTO_CONSUME schema results in null pointer exception
3 participants