2019-11-06 09:21:15 UTC - jia zhai: @tuteng would you please help verify if we 
need this converter?
----
2019-11-06 11:21:00 UTC - Dennis Yung: I have read through a lot of 
documentations but all shows how to construct an Avro schema with a pojo class.
How can I define an avro schema with a schema string, or an avro schema 
instance?
----
2019-11-06 11:33:15 UTC - Yuvaraj Loganathan: @Shivji Kumar Jha Can you share 
some of our examples :slightly_smiling_face:
----
2019-11-06 11:43:51 UTC - Dennis Yung: Using `Schema.AVRO`

```
public class User {
    String name;
    int age;
}

Producer producer = client.newProducer(Schema.AVRO(User.class)).create();
```

I can see that this pattern is more user friendly when developing directly with 
the Producer class. However, I am trying to write integrations with other 
frameworks, where the data schema is available in avro format.
----
2019-11-06 11:54:35 UTC - Sijie Guo: Use SchemaDefinition. You can pass in your 
avro schema def 
----
2019-11-06 14:38:24 UTC - jmogden: Awesome thanks. So I don't actually have to 
setup a separate thing to get the JVM metrics? That definitely makes it easier.
----
2019-11-06 14:46:10 UTC - Sonny: @Sonny has joined the channel
----
2019-11-06 15:29:34 UTC - Alexandre DUVAL: Hi, how to pass authentication 
string and plugin when using websockets? :slightly_smiling_face:
----
2019-11-06 16:06:15 UTC - Raman Gupta: Avro 1.9 uses java.time by default for 
the date/time logical types. Will Pulsar be compatible with that when using 
`SchemaDefinition`?
----
2019-11-06 16:10:55 UTC - Sijie Guo: I think so.
----
2019-11-06 16:19:33 UTC - Chris Bartholomew: This is what I use for token 
authentication: ```# Enable authentication
authenticationEnabled=true

# Autentication provider name list, which is comma separated list of class names
authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderToken
tokenPublicKey=file:///pulsar/token-public-key/my-public.key
``` In websocket.conf
----
2019-11-06 16:24:43 UTC - Alexandre DUVAL: Using the pulsar websocket client 
ok, but using classical ws client like the nodejs one? :slightly_smiling_face:
----
2019-11-06 16:55:48 UTC - Luke Lu: Just add the http header Authorization: 
Bearer <token> should work.
----
2019-11-06 17:12:11 UTC - Jared Mackey: When running pulsar stand-alone in 
docker, the topic look up command returns a docker hostname that isn’t 
resolvable outside of docker. Is there a way to override that with env vars to 
the docker container?
----
2019-11-06 17:14:00 UTC - Jared Mackey: I could hack it together by naming the 
container and then putting an entry in `/etc/hosts` to just point to localhost. 
But that feels wrong and won’t scale to an eng dept. 
----
2019-11-06 17:15:04 UTC - MarinaM: Storage is still not getting cleaned up and 
pulsar_storage_size is still not decreasing, was there anything in the topic 
stats uploaded that indicates an issue.
----
2019-11-06 17:23:54 UTC - Sijie Guo: you can use `-a` to specify the advertised 
address
----
2019-11-06 17:23:59 UTC - Alexandre DUVAL: So no need to speficy the 
authProvider? How it works if I have a custom one.
----
2019-11-06 17:34:32 UTC - Shivji Kumar Jha: Thanks @Yuvaraj Loganathan.
@Dennis Yung This is what we follow:
1. We mandate that avro schemas are designed, reviewed and published first in a 
repo. POJO to avro has a lot of surprises, we pretty much hate those :wink:
2. Then using the avro-maven-plugin, we generate the corresponding POJO.
3. This POJO contains a field called $SCHEMA that contains the exact schema 
from which this pojo was constructed.
4. We use the below code to get the AvroSchema instance of pulsar
```
    public static AvroSchema getAvroSchema(Class clz) throws 
BeamPulsarClientException {
        try {
            String schemaJsonString = 
clz.getField("SCHEMA$").get(null).toString();
            return 
AvroSchema.of(SchemaDefinition.builder().withJsonDef(schemaJsonString).build());
        } catch (NoSuchFieldException | IllegalAccessException e) {
           ........
        }
    }
```
----
2019-11-06 17:36:19 UTC - Jared Mackey: Thanks I’ll try that. 
----
2019-11-06 17:36:33 UTC - Luke Lu: auth provider config is only needed at the 
server side (broker conf (or websocket conf for running separate websocket 
proxy)), which the same for regular pulsar clients using token auth. The auth 
header is just a generic way to pass the token in http requests for any 
websocket clients.
----
2019-11-06 17:38:39 UTC - Jared Mackey: Worked like a charm
----
2019-11-06 18:07:43 UTC - Alexandre DUVAL: Ok, but if we have multiple 
authprovider on server side, how pulsar know the one to use?
----
2019-11-06 21:59:08 UTC - Peter Dimitrios: @Peter Dimitrios has joined the 
channel
----
2019-11-07 00:13:53 UTC - Britt Bolen: now I’m having trouble finding 
`com.yahoo.athenz.auth.ServiceIdentityProvider`
----
2019-11-07 00:14:28 UTC - Britt Bolen: 
----
2019-11-07 00:15:38 UTC - Britt Bolen: cool, i’ve got my producer happily 
talking to zts to get a token, now I just need to get my cluster talking to 
athenz
----
2019-11-07 00:17:06 UTC - Britt Bolen: I may need to make some changes on the 
`pulsar-client-auth-athenz` so that I can pass down a keystore or some other 
way to programmatically point the zts client at the TLS CA cert for my athenz 
setup… right now I’ve got it stashed inside my mac’s keychain and telling the 
jvm to look there…
----
2019-11-07 00:17:31 UTC - Britt Bolen: thanks for any pointers!
----
2019-11-07 01:44:28 UTC - Matteo Merli: Uhm, I guess it's not pulling in the 
Yahoo Athenz dependency itself
----
2019-11-07 03:16:54 UTC - Dennis Yung: Thanks @Shivji Kumar Jha!
----
2019-11-07 07:19:48 UTC - Ali Ahmed: pulsar python client for osx has been 
updated with fixes this should resolve issues on osx
<https://pypi.org/project/pulsar-client/2.4.1.post1/#files>
----

Reply via email to