Skip to content

Commit

Permalink
[vpj][common][dvc] Minor logging change (#1193)
Browse files Browse the repository at this point in the history
Co-authored-by: Sourav Maji <[email protected]>
  • Loading branch information
majisourav99 and Sourav Maji authored Oct 8, 2024
1 parent 47d987e commit d65cb71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,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);
}
Expand All @@ -1017,7 +1018,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);
}
Expand Down Expand Up @@ -2008,7 +2010,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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit d65cb71

Please sign in to comment.