I am setting up realtime time table that will read...
# troubleshooting
j
I am setting up realtime time table that will read kafka avro messages in which key is string and value is in avro, is this use case not supported? both key and value has to be in avro? Here is the logs on server and its stuck, no exception in server or controller
Copy code
2025/03/06 07:46:03.118 INFO [HelixInstanceDataManager] [HelixTaskExecutor-message_handle_thread_20] Creating table data manager for table: captain_availability_time_REALTIME
2025/03/06 07:46:03.120 INFO [BaseTableDataManager] [HelixTaskExecutor-message_handle_thread_20] Initializing table data manager for table: captain_availability_time_REALTIME
2025/03/06 07:46:03.120 INFO [SegmentBuildTimeLeaseExtender] [HelixTaskExecutor-message_handle_thread_20] Created lease extender for table: captain_availability_time_REALTIME
2025/03/06 07:46:03.121 INFO [captain_availability_time_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_20] Initialized table data manager with data directory: /var/pinot/server/data/index/captain_availability_time_REALTIME
2025/03/06 07:46:03.121 INFO [captain_availability_time_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_20] Starting table data manager
2025/03/06 07:46:03.121 INFO [captain_availability_time_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_20] Started table data manager
2025/03/06 07:46:03.121 INFO [HelixInstanceDataManager] [HelixTaskExecutor-message_handle_thread_20] Created table data manager for table: captain_availability_time_REALTIME
2025/03/06 07:46:03.121 INFO [captain_availability_time_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_20] Adding CONSUMING segment: captain_availability_time__2__0__20250306T0746Z
2025/03/06 07:46:03.125 INFO [captain_availability_time_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_20] Adding new CONSUMING segment: captain_availability_time__2__0__20250306T0746Z
Can you please suggest? i have gone through all documents but didn’t find anything here is my streaming config
Copy code
"streamIngestionConfig": {
        "streamConfigMaps": [
          {
            "streamType": "kafka",
            "stream.kafka.consumer.type": "lowlevel",
            "stream.kafka.consumer.prop.auto.offset.reset": "smallest",
            "stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",
            "stream.kafka.topic.name": "bdp__prod_nrt_captain_availability_time",
            "stream.kafka.decoder.class.name": "org.apache.pinot.plugin.inputformat.avro.confluent.KafkaConfluentSchemaRegistryAvroMessageDecoder",
            "stream.kafka.schema.registry.url": "http://<>:8081",
            "stream.kafka.decoder.prop.schema.registry.rest.url": "http://<>:8081",
            "stream.kafka.broker.list": "<>:9094",
            "realtime.segment.flush.threshold.rows": "0",
            "realtime.segment.flush.threshold.time": "1h",
            "realtime.segment.flush.threshold.segment.size": "1G",
            "realtime.segment.serverUploadToDeepStore": true,
            "bootstrap.servers": "<>:9094",
            "group.id": "bdp__captain_availability_time__pinot_0",
            "sasl.jaas.config": "org.apache.pinot.shaded.org.apache.kafka.common.security.scram.ScramLoginModule required username=\"<>\" password=\"<>\";",
            "sasl.mechanism": "SCRAM-SHA-512",
            "security.protocol": "SASL_PLAINTEXT"
          }
        ],
        "columnMajorSegmentBuilderEnabled": true,
        "trackFilteredMessageOffsets": false
      }
@Kartik Khare / @Manish can you please suggest?
@Kartik Khare any pointers, need to deploy in production, seems like issue with decoder as segment is getting added means able to connect with kafka Key: String Value: Avro Sad part is there is no exception/error in logs of server and controller. This is first time i am onboarding avro, json decoder is working fine
m
Do you see anything more in the logs for the new consuming segment
captain_availability_time__2__0__20250306T0746Z
? Does this show up in the table
j
it says
Copy code
null:
3 segments unavailable: [captain_availability_time__2__0__20250306T0854Z, captain_availability_time__1__0__20250306T0854Z, captain_availability_time__0__0__20250306T0854Z]
when i query the table @Manish
can you check if i am missing any config in streaming?
m
If there's an issue you would see an error either in pinotServer.log or pinotServerHelix.log .
Do you see the segment in ideal state & external view. You can view it from Zookeeper section in Pinot UI
j
let me check
external view
Copy code
"mapFields": {
    "captain_availability_time__0__0__20250306T1432Z": {
      "Server_pinot-prod-server-4.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "ERROR",
      "Server_pinot-prod-server-5.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "ERROR"
    },
    "captain_availability_time__1__0__20250306T1432Z": {
      "Server_pinot-prod-server-0.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "ERROR",
      "Server_pinot-prod-server-1.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "ERROR"
    },
    "captain_availability_time__2__0__20250306T1432Z": {
      "Server_pinot-prod-server-2.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "ERROR",
      "Server_pinot-prod-server-3.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "ERROR"
    }
ideal state
Copy code
"mapFields": {
    "captain_availability_time__0__0__20250306T1432Z": {
      "Server_pinot-prod-server-4.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "CONSUMING",
      "Server_pinot-prod-server-5.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "CONSUMING"
    },
    "captain_availability_time__1__0__20250306T1432Z": {
      "Server_pinot-prod-server-0.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "CONSUMING",
      "Server_pinot-prod-server-1.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "CONSUMING"
    },
    "captain_availability_time__2__0__20250306T1432Z": {
      "Server_pinot-prod-server-2.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "CONSUMING",
      "Server_pinot-prod-server-3.pinot-prod-server-headless.pinot.svc.cluster.local_8098": "CONSUMING"
    }
  },
yes i can see @Manish but in error state
is it due to schema may be?
so i defined some columns like that Value is like
"2025-03-06 14:00:00"
Copy code
{
      "name": "time_window_start",
      "dataType": "TIMESTAMP",
      "notNull": false,
      "format": "TIMESTAMP",
      "granularity": "1:MILLISECONDS"
    },
    {
      "name": "time_window_end",
      "dataType": "TIMESTAMP",
      "notNull": false,
      "format": "TIMESTAMP",
      "granularity": "1:MILLISECONDS"
    },
    {
      "name": "last_ping_time",
      "dataType": "LONG",
      "notNull": false,
      "format": "1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd HH:mm:ss",
      "granularity": "1:MILLISECONDS"
    }
@Manish managed to get some logs when i change the schema for datetime columns. still i am getting error but seems like i am not defining correctly date time columns
m
The server log will have exception stack to tell whats wrong?
j
@Manish can you suggest, is it due to that primary key cannot be timestamp? when i am adding upsert config into the realtime pipeline, segment started failing Primary key: [INT, TIMESTAMP, TIMESTAMP], defined in schema
Copy code
"upsertConfig": {
    "mode": "FULL",
    "enableSnapshot": true,
    "enablePreload": true,
    "metadataTTL": 86400,
    "consistencyMode": "SNAPSHOT"
    },
    "task": {
    "taskTypeConfigsMap": {
    "UpsertCompactionTask": {
      "schedule": "0 0 * * * ?",
      "bufferTimePeriod": "0d",
      "invalidRecordsThresholdPercent": "30",
      "invalidRecordsThresholdCount": "10000",
      "tableMaxNumTasks": "40",
      "validDocIdsType": "SNAPSHOT"
         }
       }
    },
     "routing": {
    "instanceSelectorType": "strictReplicaGroup"
     },
@Mayank @Manish can anyone suggest please?
removing this config worked
Copy code
"enablePreload": true,
to enable it i need to enable this property at server
Copy code
pinot.server.instance.max.segment.preload.threads
m
Thanks for sharing.
m
Thanks Jatin !