Skip to content

Commit

Permalink
HADOOP-19299. HttpReferrerAuditHeader resilience
Browse files Browse the repository at this point in the history
style checks + extra javadocs

Change-Id: I1fbe381c49f51f9f4df62fd674a693c89ce9e9ed
  • Loading branch information
steveloughran committed Oct 3, 2024
1 parent 99cda77 commit 0be63c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
* This header may be shared across multiple threads at the same time.
* so some methods are marked as synchronized, specifically those reading
* or writing the attribute map.
* <p>
* For the same reason, maps and lists passed down during construction are
* copied into thread safe structures.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
Expand Down Expand Up @@ -203,7 +206,7 @@ public synchronized String buildHttpReferrer() {
} catch (RuntimeException e) {
// do not let failure to build the header stop the request being
// issued.
LOG.warn("Failed to construct referred header " + e , e);
LOG.warn("Failed to construct referred header {}", e.toString(), e);
LOG.debug("Full stack", e);
header = "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,4 +439,4 @@ public void testSpanResilience() throws Throwable {
auditContext.remove(failing);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
*/
public final class ReferrerExtractor {

private ReferrerExtractor() {
}

/**
* Get the referrer provided the span is an instance or
* subclass of LoggingAuditSpan.
Expand Down

0 comments on commit 0be63c1

Please # to comment.