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 2022/07/04 16:21:05 UTC

[GitHub] [pulsar] coderzc opened a new issue, #16379: [bug][broker] Timestamp value 0 gets the scheme

coderzc opened a new issue, #16379:
URL: https://github.com/apache/pulsar/issues/16379

   **Describe the bug**
   
   Timestamp value 0 gets the scheme when using admin API.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Start a pulsar version
   2. Create a schema.
   ```
   curl -X POST http://127.0.0.1:8080/admin/v2/schemas/public/default/test/schema -H "content-type:application/json" -d '{
       "type" : "KEY_VALUE",
       "schema" : "{\"key\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]},\"value\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]}}",
       "properties" : {
         "key.schema.properties" : "{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}",
         "value.schema.properties" : "{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}",
         "value.schema.type" : "AVRO",
         "key.schema.name" : "",
         "value.schema.name" : "",
         "kv.encoding.type" : "INLINE",
         "key.schema.type" : "AVRO"
       }
     }'
   ```
   Response:
   ```
   {"version":{"version":0}}
   ```
   3. Get the schema.
   ```
   curl -X GET http://127.0.0.1:8080/admin/v2/schemas/public/default/test/schema
   ```
   Response:
   {"version":0,"type":"KEY_VALUE",***"timestamp":0,***"data":"{\"key\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]},\"value\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]}}","properties":{"key.schema.properties":"{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}","value.schema.properties":"{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}","value.schema.type":"AVRO","key.schema.name":"","value.schema.name":"","kv.encoding.type":"INLINE","key.schema.type":"AVRO"}}
   
   
   **Expected behavior**
   Get a correct timestamp value.
   
   
   **Desktop (please complete the following information):**
    - OS: macOS
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] codelipenghui closed issue #16379: [bug][broker] Timestamp value 0 gets the scheme

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #16379: [bug][broker] Timestamp value 0 gets the scheme
URL: https://github.com/apache/pulsar/issues/16379


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org