Package org.apache.hadoop.fs.store.audit
Class HttpReferrerAuditHeader.Builder
java.lang.Object
org.apache.hadoop.fs.store.audit.HttpReferrerAuditHeader.Builder
- Enclosing class:
- HttpReferrerAuditHeader
Builder.
Context and operationId are expected to be well formed
numeric/hex strings, at least adequate to be
used as individual path elements in a URL.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build.withAttribute(String key, String value) Add an attribute to the current map.withAttributes(Map<String, String> value) Add all attributes to the current map.withContextId(String value) Set context ID.withEvaluated(String key, Supplier<String> value) Add an evaluated attribute to the current map.withEvaluated(Map<String, Supplier<String>> value) Add all evaluated attributes to the current map.withFilter(Collection<String> fields) Declare the fields to filter.withGlobalContextValues(Iterable<Map.Entry<String, String>> value) Set the global context values (replaces the default binding toCommonAuditContext.getGlobalContextEntries()).withOperationName(String value) Set Operation name.Set Path1 of operation.Set Path2 of operation.withSpanId(String value) Set ID.
-
Method Details
-
build
Build.- Returns:
- an HttpReferrerAuditHeader
-
withContextId
Set context ID.- Parameters:
value- context- Returns:
- the builder
-
withOperationName
Set Operation name.- Parameters:
value- new value- Returns:
- the builder
-
withSpanId
Set ID.- Parameters:
value- new value- Returns:
- the builder
-
withPath1
Set Path1 of operation.- Parameters:
value- new value- Returns:
- the builder
-
withPath2
Set Path2 of operation.- Parameters:
value- new value- Returns:
- the builder
-
withAttributes
Add all attributes to the current map.- Parameters:
value- new value- Returns:
- the builder
-
withAttribute
Add an attribute to the current map. Replaces any with the existing key.- Parameters:
key- key to set/updatevalue- new value- Returns:
- the builder
-
withEvaluated
Add all evaluated attributes to the current map.- Parameters:
value- new value- Returns:
- the builder
-
withEvaluated
Add an evaluated attribute to the current map. Replaces any with the existing key. Set evaluated methods.- Parameters:
key- keyvalue- new value- Returns:
- the builder
-
withGlobalContextValues
public HttpReferrerAuditHeader.Builder withGlobalContextValues(Iterable<Map.Entry<String, String>> value) Set the global context values (replaces the default binding toCommonAuditContext.getGlobalContextEntries()).- Parameters:
value- new value- Returns:
- the builder
-
withFilter
Declare the fields to filter.- Parameters:
fields- iterable of field names.- Returns:
- the builder
-