From 6515c22cf51bbbbb128a3b0523a702dcedb0a3cc Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Tue, 3 Dec 2024 16:42:48 +0000 Subject: [PATCH 1/2] Split off 9.8.44 Signed-off-by: Jake Smith --- commons-hpcc/pom.xml | 2 +- dfsclient/pom.xml | 2 +- pom.xml | 2 +- wsclient/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commons-hpcc/pom.xml b/commons-hpcc/pom.xml index 3fde11c88..9bad0cc17 100644 --- a/commons-hpcc/pom.xml +++ b/commons-hpcc/pom.xml @@ -9,7 +9,7 @@ org.hpccsystems hpcc4j - 9.8.43-0-SNAPSHOT + 9.8.45-0-SNAPSHOT diff --git a/dfsclient/pom.xml b/dfsclient/pom.xml index 7316b66ed..3f358a836 100644 --- a/dfsclient/pom.xml +++ b/dfsclient/pom.xml @@ -9,7 +9,7 @@ org.hpccsystems hpcc4j - 9.8.43-0-SNAPSHOT + 9.8.45-0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 513516ed5..902f7dec1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.hpccsystems hpcc4j - 9.8.43-0-SNAPSHOT + 9.8.45-0-SNAPSHOT pom HPCC Systems Java Projects https://hpccsystems.com diff --git a/wsclient/pom.xml b/wsclient/pom.xml index 04c0b9635..6c867f9cb 100644 --- a/wsclient/pom.xml +++ b/wsclient/pom.xml @@ -9,7 +9,7 @@ org.hpccsystems hpcc4j - 9.8.43-0-SNAPSHOT + 9.8.45-0-SNAPSHOT From 0346c928b16424b89b07723f2e145ffc1a0508fc Mon Sep 17 00:00:00 2001 From: James McMullan Date: Tue, 10 Dec 2024 10:13:19 -0500 Subject: [PATCH 2/2] HPCC4J-667 DFSClient: Request traceparents should use active span (#777) Signed-off-by: James McMullan James.McMullan@lexisnexis.com --- .../dfs/client/RowServiceInputStream.java | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java index 3226701d8..8d9bf23b6 100644 --- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java +++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java @@ -165,7 +165,6 @@ private static StreamContext constructStreamContext(FieldDef rd, FieldDef pRd, i private String rowServiceVersion = ""; private Span fileReadSpan = null; - private String traceContextHeader = null; private Span readRequestSpan = null; private int readRequestCount = 0; @@ -472,7 +471,6 @@ public RowServiceInputStream(StreamContext context, DataPartition dp, RestartInf if (context.fileReadSpan != null && context.fileReadSpan.getSpanContext().isValid()) { this.fileReadSpan = context.fileReadSpan; - this.traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(fileReadSpan); } int copycount = dataPart.getCopyCount(); @@ -1038,7 +1036,7 @@ private int startFetch() if (inFetchingMode) { if (this.simulateFail) this.handle = -1; - readAheadRequest = (this.forceTokenUse) ? this.makeTokenRequest() : this.makeHandleRequest(); + readAheadRequest = (this.forceTokenUse) ? this.makeTokenRequest(readRequestSpan) : this.makeHandleRequest(readRequestSpan); try { @@ -1118,7 +1116,7 @@ private int startFetch() { inTokenRetry = true; - String retryTrans = this.makeTokenRequest(); + String retryTrans = this.makeTokenRequest(readRequestSpan); int len = retryTrans.length(); try { @@ -1345,7 +1343,7 @@ private void finishFetch() // Create the read ahead request if (this.simulateFail) this.handle = -1; - String readAheadRequest = (this.forceTokenUse) ? this.makeTokenRequest() : this.makeHandleRequest(); + String readAheadRequest = (this.forceTokenUse) ? this.makeTokenRequest(readRequestSpan) : this.makeHandleRequest(readRequestSpan); try { @@ -2002,7 +2000,7 @@ private void makeActive() throws HpccFileException try { - String msg = makeGetVersionRequest(); + String msg = makeGetVersionRequest(versionSpan); int msgLen = msg.length(); this.dos.writeInt(msgLen); @@ -2069,11 +2067,11 @@ private void makeActive() throws HpccFileException if (this.tokenBin == null) { this.tokenBin = new byte[0]; - readTrans = makeInitialRequest(); + readTrans = makeInitialRequest(readRequestSpan); } else { - readTrans = makeTokenRequest(); + readTrans = makeTokenRequest(readRequestSpan); } int transLen = readTrans.length(); @@ -2395,14 +2393,15 @@ private void makeFetchObject(StringBuilder sb) } } - private String makeGetVersionRequest() + private String makeGetVersionRequest(Span versionSpan) { + String traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(versionSpan); final String trace = traceContextHeader != null ? "\"_trace\": { \"traceparent\" : \"" + traceContextHeader + "\" },\n" : ""; final String versionMsg = RFCCodes.RFCStreamReadCmd + "{ \"command\" : \"version\", \"handle\": \"-1\", " + trace + " \"format\": \"binary\" }"; return versionMsg; } - private String makeInitialRequest() + private String makeInitialRequest(Span span) { StringBuilder sb = new StringBuilder(256); @@ -2410,6 +2409,7 @@ private String makeInitialRequest() sb.append("{ \"format\" : \"binary\", \n"); sb.append("\"replyLimit\" : " + this.initialReadSizeKB + ",\n"); + String traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(span); final String trace = traceContextHeader != null ? "\"_trace\": { \"traceparent\" : \"" + traceContextHeader + "\" },\n" : ""; sb.append(trace); @@ -2478,7 +2478,7 @@ private String makeNodeObject() return sb.toString(); } - private String makeHandleRequest() + private String makeHandleRequest(Span span) { StringBuilder sb = new StringBuilder(256); @@ -2487,6 +2487,7 @@ private String makeHandleRequest() sb.append(" \"handle\" : \"" + Integer.toString(this.handle) + "\","); sb.append("\"replyLimit\" : " + this.maxReadSizeKB + ",\n"); + String traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(span); final String trace = traceContextHeader != null ? "\"_trace\": { \"traceparent\" : \"" + traceContextHeader + "\" },\n" : ""; sb.append(trace); @@ -2505,7 +2506,7 @@ private String makeHandleRequest() return sb.toString(); } - private String makeTokenRequest() + private String makeTokenRequest(Span span) { StringBuilder sb = new StringBuilder(256); @@ -2513,6 +2514,7 @@ private String makeTokenRequest() sb.append("{ \"format\" : \"binary\",\n"); sb.append("\"replyLimit\" : " + this.maxReadSizeKB + ",\n"); + String traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(span); final String trace = traceContextHeader != null ? "\"_trace\": { \"traceparent\" : \"" + traceContextHeader + "\" },\n" : ""; sb.append(trace); @@ -2529,13 +2531,14 @@ private String makeTokenRequest() return sb.toString(); } - private String makeCloseHandleRequest() + private String makeCloseHandleRequest(Span span) { StringBuilder sb = new StringBuilder(256); sb.append("{ \"format\" : \"binary\",\n"); sb.append(" \"handle\" : \"" + Integer.toString(this.handle) + "\","); + String traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(span); final String trace = traceContextHeader != null ? "\"_trace\": { \"traceparent\" : \"" + traceContextHeader + "\" },\n" : ""; sb.append(trace); @@ -2562,7 +2565,7 @@ private void sendCloseFileRequest() throws IOException closeSpan.setStatus(StatusCode.OK); } - String closeFileRequest = makeCloseHandleRequest(); + String closeFileRequest = makeCloseHandleRequest(closeSpan); int jsonRequestLen = closeFileRequest.length(); try