From e6a5705d67beddef7fc464fd0f0c2a32215af063 Mon Sep 17 00:00:00 2001 From: Sourav Maji Date: Mon, 23 Sep 2024 10:55:57 -0700 Subject: [PATCH] [vpj][common][dvc] Minor logging change --- .../kafka/consumer/KafkaStoreIngestionService.java | 3 ++- .../java/com/linkedin/venice/hadoop/VenicePushJob.java | 8 +++++--- .../java/com/linkedin/venice/writer/VeniceWriter.java | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/clients/da-vinci-client/src/main/java/com/linkedin/davinci/kafka/consumer/KafkaStoreIngestionService.java b/clients/da-vinci-client/src/main/java/com/linkedin/davinci/kafka/consumer/KafkaStoreIngestionService.java index e073b20b72..a788ee1798 100644 --- a/clients/da-vinci-client/src/main/java/com/linkedin/davinci/kafka/consumer/KafkaStoreIngestionService.java +++ b/clients/da-vinci-client/src/main/java/com/linkedin/davinci/kafka/consumer/KafkaStoreIngestionService.java @@ -1195,7 +1195,8 @@ public void updatePartitionOffsetRecords(String topicName, int partition, ByteBu LOGGER.error( "Caught exception when deserializing offset record byte array: {} for replica: {}", Arrays.toString(offsetRecordByteArray), - Utils.getReplicaId(topicName, partition)); + Utils.getReplicaId(topicName, partition), + e); throw e; } storageMetadataService.put(topicName, partition, offsetRecord); diff --git a/clients/venice-push-job/src/main/java/com/linkedin/venice/hadoop/VenicePushJob.java b/clients/venice-push-job/src/main/java/com/linkedin/venice/hadoop/VenicePushJob.java index 36eaae8def..532d62a5e3 100755 --- a/clients/venice-push-job/src/main/java/com/linkedin/venice/hadoop/VenicePushJob.java +++ b/clients/venice-push-job/src/main/java/com/linkedin/venice/hadoop/VenicePushJob.java @@ -1036,7 +1036,8 @@ private void validateInputDataSchema(String inputDataSchemaString) { } catch (Exception e) { if (pushJobSetting.extendedSchemaValidityCheckEnabled) { LOGGER.error( - "The schema of the input data failed strict Avro schema validation. Verify if the schema is a valid Avro schema."); + "The schema of the input data failed strict Avro schema validation. Verify if the schema is a valid Avro schema.", + e); updatePushJobDetailsWithCheckpoint(PushJobCheckpoints.EXTENDED_INPUT_DATA_SCHEMA_VALIDATION_FAILED); throw new VeniceException(e); } @@ -1046,7 +1047,8 @@ private void validateInputDataSchema(String inputDataSchemaString) { AvroSchemaParseUtils.parseSchemaFromJSONLooseValidation(inputDataSchemaString); } catch (Exception looseValidationException) { LOGGER.error( - "The schema of the input data failed loose Avro schema validation. Verify if the schema is a valid Avro schema."); + "The schema of the input data failed loose Avro schema validation. Verify if the schema is a valid Avro schema.", + looseValidationException); updatePushJobDetailsWithCheckpoint(PushJobCheckpoints.INPUT_DATA_SCHEMA_VALIDATION_FAILED); throw new VeniceException(looseValidationException); } @@ -2031,7 +2033,7 @@ void validateValueSchema( if (getValueSchemaIdResponse.isError() && !schemaAutoRegisterFromPushJobEnabled) { MultiSchemaResponse response = controllerClient.getAllValueSchema(setting.storeName); if (response.isError()) { - LOGGER.error("Failed to fetch all value schemas, so they will not be printed."); + LOGGER.error("Failed to fetch all value schemas, so they will not be printed. " + response.getError()); } else { LOGGER.info("All currently registered value schemas:"); for (MultiSchemaResponse.Schema schema: response.getSchemas()) { diff --git a/internal/venice-common/src/main/java/com/linkedin/venice/writer/VeniceWriter.java b/internal/venice-common/src/main/java/com/linkedin/venice/writer/VeniceWriter.java index b217cddd3f..28d28ffc4d 100644 --- a/internal/venice-common/src/main/java/com/linkedin/venice/writer/VeniceWriter.java +++ b/internal/venice-common/src/main/java/com/linkedin/venice/writer/VeniceWriter.java @@ -390,7 +390,7 @@ public VeniceWriter( OPEN_VENICE_WRITER_COUNT.incrementAndGet(); heartBeatMessage = generateHeartbeatMessage(checkSumType); } catch (Exception e) { - logger.error("VeniceWriter cannot be constructed with the props: {}", props); + logger.error("VeniceWriter cannot be constructed with the props: {}", props, e); throw new VeniceException("Error while constructing VeniceWriter for store name: " + topicName, e); } }