AnsweredAssumed Answered

REST API for "stream topic list" fails

Question asked by danrez on Aug 13, 2016
Latest reply on Aug 15, 2016 by danrez

The REST API for stream topic list seems broken.

This is a 1 node cluster installed with the 5.1 quick installer or whatever it's called.

 

maprcli works fine for stream topic list.  Other rest stream api's work fine too, but not the one I want to use.

 

Am I doing something wrong?

 

# curl -k -u 'user:password' 'https://172.16.0.2:8443/rest/stream/topic/list?path=/howbig'| jq

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100   186  100   186    0     0    696      0 --:--:-- --:--:-- --:--:--   696

{

  "timestamp": 1471139863826,

  "timeofday": "2016-08-13 09:57:43.826 GMT-0400",

  "status": "ERROR",

  "errors": [

    {

      "id": 22,

      "desc": "java.io.IOException: TopicFeedStat failed on one or more tablets"

    }

  ]

}

 

 

# maprcli stream topic list -path /howbig -json | jq

{

  "timestamp": 1471140175511,

  "timeofday": "2016-08-13 10:02:55.511 GMT-0400",

  "status": "OK",

  "total": 2,

  "data": [

    {

      "topic": "t1",

      "partitions": 1,

      "consumers": 0,

      "physicalsize": 22421504,

      "logicalsize": 50511872,

      "maxlag": 0

    },

    {

      "topic": "t2",

      "partitions": 1,

      "consumers": 0,

      "physicalsize": 13139968,

      "logicalsize": 44457984,

      "maxlag": 0

    }

  ]

}

 

# curl -k -u 'user:password' 'https://172.16.0.2:8443/rest/stream/info?path=/howbig'| jq

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100   393  100   393    0     0   1238      0 --:--:-- --:--:-- --:--:--  1239

{

  "timestamp": 1471139908131,

  "timeofday": "2016-08-13 09:58:28.131 GMT-0400",

  "status": "OK",

  "total": 1,

  "data": [

    {

      "path": "/howbig",

      "physicalsize": 35659776,

      "logicalsize": 95019008,

      "numtopics": 2,

      "defaultpartitions": 1,

      "ttl": 604800,

      "compression": "lz4",

      "clientcompression": true,

      "autocreate": true,

      "produceperm": "u:root",

      "consumeperm": "u:root",

      "topicperm": "u:root",

      "copyperm": "u:root",

      "adminperm": "u:root"

    }

  ]

}

Outcomes