diff --git a/src/main/java/org/broadinstitute/hellbender/utils/runtime/StreamingProcessController.java b/src/main/java/org/broadinstitute/hellbender/utils/runtime/StreamingProcessController.java index f7e167d6384..18b8c16c82b 100644 --- a/src/main/java/org/broadinstitute/hellbender/utils/runtime/StreamingProcessController.java +++ b/src/main/java/org/broadinstitute/hellbender/utils/runtime/StreamingProcessController.java @@ -260,6 +260,7 @@ private ProcessControllerAckResult getNckWithMessageResult() throws IOException throw new GATKException("Negative ack message length must be > 0"); } + // now get the corresponding message of that length messageLength final String nckMessage = getIncomingMessage(messageLength); return new ProcessControllerAckResult(nckMessage); } diff --git a/src/main/python/org/broadinstitute/hellbender/gatktool/tool.py b/src/main/python/org/broadinstitute/hellbender/gatktool/tool.py index d7762cdc4c9..6997781f399 100644 --- a/src/main/python/org/broadinstitute/hellbender/gatktool/tool.py +++ b/src/main/python/org/broadinstitute/hellbender/gatktool/tool.py @@ -200,13 +200,13 @@ def writeNackWithMessage(self, message: str) -> None: self.fileWriter.write(toolconstants._nkmString) actualMessageLength = len(message) """The message length must be exactly 4 bytes""" - if len(str(actualMessageLength)) <= toolconstants.nckMessageLengthSerializedSize: - self.fileWriter.write(str(actualMessageLength).zfill(toolconstants.nckMessageLengthSerializedSize)) + if len(str(actualMessageLength)) <= toolconstants._nckMessageLengthSerializedSize: + self.fileWriter.write(str(actualMessageLength).zfill(toolconstants._nckMessageLengthSerializedSize)) self.fileWriter.write(message) else: """Message is too long, trim to 9999 bytes""" - self.fileWriter.write(str(toolconstants.nckMaxMessageLength)) - self.fileWriter.write(message[:toolconstants.nckMaxMessageLength]) + self.fileWriter.write(str(toolconstants._nckMaxMessageLength)) + self.fileWriter.write(message[:toolconstants._nckMaxMessageLength]) self.fileWriter.flush()