You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/09/01 20:09:23 UTC

[GitHub] [pulsar] pouledodue opened a new issue #5088: can't update JSON Schema to AVRO with pulsar-admin

pouledodue opened a new issue #5088: can't update JSON Schema to AVRO with pulsar-admin
URL: https://github.com/apache/pulsar/issues/5088
 
 
   **Describe the bug**
   Changing just the type of schema does not work
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. create a file `/tmp/yoshi` containing:
   ```
   {
       "type": "JSON",
       "schema": "{\"type\":\"record\",\"name\":\"User\",\"namespace\":\"com.foo\",\"fields\":[{\"name\":\"file1\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"file2\",\"type\":\"string\",\"default\":null},{\"name\":\"file3\",\"type\":[\"null\",\"string\"],\"default\":\"dfdf\"}]}",
       "properties": {}
   }
   ```
   2. now type `pulsar-admin schemas upload -f /tmp/yoshi persistent://public/default/yoshi` to upload the schema
   3. now type `pulsar-admin schemas get persistent://public/default/yoshi`
   the result will say:
   ```
   ...
    "type": "JSON",
   ...
   ``` 
   which is ok
   4. edit `/tmp/yoshi` and change
   ```
   ...
     "type": "AVRO",
   ...
   ```
   5. now type `pulsar-admin schemas upload -f /tmp/yoshi persistent://public/default/yoshi` to upload the schema
   6. now type `pulsar-admin schemas get persistent://public/default/yoshi`
   the result will say:
   ```
   ...
    "type": "JSON",
   ...
   ``` 
   it should say instead 'AVRO'
   
   
   **Desktop (please complete the following information):**
    - macos, pulsar-all docker image 2.4.0 standalone
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services