pinpoint-apm / pinpoint-docker

Official Dockerized components of the Pinpoint
http://pinpoint-apm.github.io/pinpoint/
Apache License 2.0
451 stars 227 forks source link

pinot init fail. #176

Open HeeJoon-Kim opened 1 year ago

HeeJoon-Kim commented 1 year ago

A service pinot-init At docker-compose-metric.yml has fault.

https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v2.5.1/uristat/uristat-common/src/main/pinot/pinot-uriStat-realtime-table.json

{
  "tableName": "uriStat",
  "tableType": "REALTIME",
  "segmentsConfig": {
    "timeColumnName": "timestamp",
    "timeType": "MILLISECONDS",
    "schemaName": "uriStat",
    "replicasPerPartition": "3",
    "retentionTimeUnit": "DAYS",
    "retentionTimeValue": "7"
  },
}

There is no "replication" key and value, here is docker logs.

2023/05/31 01:14:49.688 INFO [AddTableCommand] [main] {"code":500,"error":"There are less instances: 1 in instance partitions: systemMetricDataType_CONSUMING than the table replication: 3"}

So, if want to use URL Statistic, Infrastructure metric, manually create a scheme and tables.

OR add a line to 'docker-compose-metric.yaml'... every real time tables..

      sed '5 i "replication": "1",' uriStatTable.json > tmp.json && mv tmp.json uriStatTable.json &&
ga-ram commented 1 year ago

Hmm that's why I added this sed line to replace replicasPerPartition: 3 to 1. https://github.com/pinpoint-apm/pinpoint-docker/blob/8ca496cd663750e71e6c4d3feebac81e8cebb488/docker-compose-metric.yml#LL175C1-L176C1

I'm not so sure about the differences between replicasPerPartition and replication configs for pinot tables. It seems like replicasPerPartition is for realtime tables and replication is for offline table? In sample configurations offline table has replication and realtime table has replicasPerPartition.

I'll test out more to see if mentioned error still exists with scripts in master.

ga-ram commented 1 year ago

Current pinot-init doesn't have any errors when adding pinot tables. If abovementioned error still exists with the latest script, please feel free to send PRs.

HeeJoon-Kim commented 1 year ago

When I manually create a realtime table in pinot management web(http://pinot-server:9000), received "replication" not exist error..

I did copy & past with https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v2.5.1/metric-module/metric/src/main/pinot/pinot-tag-realtime-table.json

ga-ram commented 1 year ago

@HeeJoon-Kim Did the same error occur when you changed all replicasPerpartition option to 1? "replicasPerPartition": "3", --> "replicasPerPartition": "1",