2018-04-05 17:44:31 UTC - Matteo Merli: <!here> Please take a look at Tiered 
storage proposal  
<https://github.com/apache/incubator-pulsar/wiki/PIP-17:-Tiered-storage-for-Pulsar-topics>
 and comment on the dev@ mailing list 
<https://lists.apache.org/thread.html/3f1c98658395c92e3c858ff966aa829dba0e165a28ef350e0ec3a33f@%3Cdev.pulsar.apache.org%3E>
----
2018-04-05 19:39:58 UTC - Dave Rusek: I'll leave comments this evening.
----
2018-04-05 20:54:11 UTC - Igor Zubchenok: Property name cannot contain 
underscore '_' ?
In debug I found that NamedEntity.checkURI method returns false
----
2018-04-05 20:55:30 UTC - Matteo Merli: that’s an artifact of the mapping with 
a URL.. that part would correspond to a hostname, which cannot contain `_`
----
2018-04-05 20:56:42 UTC - Igor Zubchenok: I see the reason of failure, but is 
it actually designed this way?
----
2018-04-05 20:57:16 UTC - Igor Zubchenok: I can create property with `_`, but 
cannot work it it later
----
2018-04-05 20:57:43 UTC - Matteo Merli: It probably could be relaxed. I think 
it was just due to parsing with Java URI class
----
2018-04-05 20:58:00 UTC - Matteo Merli: uhm, that shouldn’t have been allowed 
to be created then ..
----
2018-04-05 20:59:18 UTC - Igor Zubchenok: isn't it better don't associate 
hostname to property while checking for correctness? just use a some 
`localhost` as a host name?
----
2018-04-05 21:00:25 UTC - Igor Zubchenok: this check is performed on namespace 
name validation, but not on property creation.
----
2018-04-05 21:03:26 UTC - Matteo Merli: correct, and the thing is that the 
parsing is not using the URI anymore since a long while
----
2018-04-05 21:03:36 UTC - Matteo Merli: check out `TopicName` class
----
2018-04-05 21:04:35 UTC - Matteo Merli: so, the `_` should be now allowed, and 
in any case the property name should be validated with same method on creation
----
2018-04-05 21:10:58 UTC - Igor Zubchenok: Should I file it in github or it's 
already fixed in current source and will be released soon?
----
2018-04-05 21:11:46 UTC - Matteo Merli: Nope, not fixed yet. I was about to 
create the issue but please go ahead.
----
2018-04-05 21:12:04 UTC - Igor Zubchenok: :slightly_smiling_face: ok, will do
----
2018-04-05 21:12:13 UTC - Matteo Merli: I’ll try to fix this and the other 
issues soon
----
2018-04-05 21:15:41 UTC - Igor Zubchenok: 
<https://github.com/apache/incubator-pulsar/issues/1506>
----
2018-04-05 21:16:23 UTC - Matteo Merli: Thanks :+1:
----
2018-04-05 21:16:50 UTC - Igor Zubchenok: Did you consider implementing a 
namespace producer?
----
2018-04-05 21:34:36 UTC - Matteo Merli: for now we’re mostly busy in getting 
2.0 release out of the door
----
2018-04-05 21:34:55 UTC - Matteo Merli: lots of task to wrap up for that
----
2018-04-05 21:54:29 UTC - Matteo Merli: @Igor Zubchenok, actually the `_` 
should be already permitted, I just did a unit test and it was working: 

```
PropertyAdmin propertyAdmin = new PropertyAdmin(Sets.newHashSet("role1", 
"role2"), Sets.newHashSet("use"));
admin.properties().createProperty("prop_xyz", propertyAdmin);

admin.namespaces().createNamespace("prop_xyz/use/my-namespace");

String topic = "<persistent://prop_xyz/use/my-namespace/my-topic>";

Producer&lt;byte[]&gt; producer = pulsarClient.newProducer().topic(topic)
                .create();

PersistentTopicStats stats = admin.persistentTopics().getStats(topic);
assertEquals(stats.publishers.size(), 1);
producer.close();
```
----
2018-04-05 21:55:12 UTC - Matteo Merli: the reason the pattern works is that 
`\w` already includes `_` as a matching character
----
2018-04-05 21:55:47 UTC - Matteo Merli: and when creating a property, I’ve 
check that the same format is performed
----

Reply via email to