gaoran10 opened a new issue #7888:
URL: https://github.com/apache/pulsar/issues/7888


   **Describe the bug**
   
   Currently, the Pulsar SQL 2.6.1 couldn't work well, the error logs will be 
seen when executing the SQL statement `show schemas in pulsar;` in pulsar sql.
   
   Error Log
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Download Pulsar 2.6.1
   2. Start Pulsar in standalone mode. `$PULSAR_HOME/bin/pulsar-daemon start 
standalone`
   3. Start the sql-worker. `$PULSAR_HOME/bin/pulsar sql-worker run`
   4. Start pulsar sql. `$PULSAR_HOME/bin/pulsar sql`
   5. Query schemas. `presto> show schemas in pulsar;`
   6. See error.
   
   **pulsar sql cli**
   ```
   presto> show schemas in system;
   
   Query 20200824_172546_00003_hchne, FAILED, 1 node
   Splits: 18 total, 0 done (0.00%)
   0:00 [0 rows, 0B] [0 rows/s, 0B/s]
   
   Query 20200824_172546_00003_hchne failed: Unexpected response from 
http://172.17.0.2:8081/v1/task/20200824_172546_00003_hchne.2.0?summarize
   ```
   
   **sql-worker log**
   ```
        ... 1 more
   Caused by: java.lang.IllegalArgumentException: Invalid JSON bytes for 
[simple type, class com.facebook.presto.execution.TaskInfo]
        at io.airlift.json.JsonCodec.fromJson(JsonCodec.java:196)
        at 
io.airlift.http.client.FullJsonResponseHandler$JsonResponse.<init>(FullJsonResponseHandler.java:119)
        ... 28 more
   Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 
'io': was expecting (JSON String, Number, Array, Object or token 'null', 'true' 
or 'false')
    at [Source: (byte[])"io.airlift.jaxrs.JsonMapperParsingException: Invalid 
json for Java type com.facebook.presto.server.TaskUpdateRequest
        at io.airlift.jaxrs.JsonMapper.readFrom(JsonMapper.java:156)
        at 
org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:257)
        at 
org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:236)
   #
        at org.glassfish.jersey.messag"[truncated 12937 bytes]; line: 1, 
column: 4]
        at 
com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1851)
        at 
com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:717)
        at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3588)
        at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2683)
        at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:865)
        at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:757)
        at 
com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4620)
        at 
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4469)
        at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3529)
        at io.airlift.json.JsonCodec.fromJson(JsonCodec.java:193)
        ... 29 more
   ```
   
   **Expected behavior**
   The correct results like this.
   ```
   presto> show schemas in pulsar;
           Schema
   -----------------------
    information_schema
    public/default
    public/functions
    sample/standalone/ns1
   (4 rows)
   ```
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - OS: [macOS version 10.15.6 (19G2021)]
   
   **Additional context**
   This problem may concern this PR #7519 , I revert this commit and the Pulsar 
SQL could work normally.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to