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 #1536: Introduce Short Topic Name #1535

Merged
merged 6 commits into from
Apr 12, 2018
Merged

Conversation

sijie
Copy link
Member

@sijie sijie commented Apr 10, 2018

Short Topic Name can be 1) <tenant>/<namespace>/<topic> or 2) <topic>

Short Topic Name can be 1) "<tenant>/<namespace>/<topic>" or 2) "<topic>"
@sijie sijie self-assigned this Apr 10, 2018
@sijie sijie requested a review from merlimat April 10, 2018 09:17
@sijie
Copy link
Member Author

sijie commented Apr 10, 2018

@merlimat - here the WIP for PIP-11. Can you check if this is what you were thinking? If so, I can continue in this direction.

@sijie sijie changed the title (WIP) Introduce Short Topic Name (WIP) Issue #1536: Introduce Short Topic Name Apr 10, 2018
@sijie sijie changed the title (WIP) Issue #1536: Introduce Short Topic Name Issue #1536: Introduce Short Topic Name Apr 12, 2018
@sijie
Copy link
Member Author

sijie commented Apr 12, 2018

@merlimat this is ready for reviews

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

👍 The same change will also need to be done for C++

@@ -143,8 +149,54 @@ public static void main(String[] args) throws Exception {
// Ignore
}

// Create public tenant
PropertyAdmin publicProperty = new PropertyAdmin();
byte[] publicPropertyDataJson = ObjectMapperFactory.getThreadLocal().writeValueAsBytes(publicProperty);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we would still miss the public/default in standalone mode since it doesn't use this script.

Standalone is creating sample/standalone/ns1 by default when it starts up. We should just change that into public/default

Copy link
Member Author

Choose a reason for hiding this comment

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

created a public/default namespace at standalone

new PropertyAdmin(Sets.newHashSet(config.getSuperUserRoles()), Sets.newHashSet(cluster)));
}
if (!admin.namespaces().getNamespaces(publicTenant).contains(defaultNamespace)) {
admin.namespaces().createNamespace(defaultNamespace);
Copy link
Contributor

Choose a reason for hiding this comment

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

For v2, we need to specify the "replication" cluster. I added a convenience method in #1562, though you can just add :

admin.namespaces().setNamespaceReplicationClusters(defaultNamespace, Sets.newHashSet(config.getClusterName());

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@sijie sijie merged commit 61de30d into apache:master Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants