Skip to content

Commit a7930ac

Browse files
committed
pretty-print request body
1 parent f6bae85 commit a7930ac

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/main/java/tech/stackable/hadoop/StackableAccessControlEnforcer.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,14 @@ public void checkPermissionWithContext(INodeAttributeProvider.AuthorizationConte
117117
throw new OpaException.SerializeFailed(e);
118118
}
119119

120-
LOG.debug("Request body: {}", body);
120+
String prettyPrinted;
121+
try {
122+
prettyPrinted = json.writerWithDefaultPrettyPrinter().writeValueAsString(query);
123+
} catch (JsonProcessingException e) {
124+
throw new OpaException.SerializeFailed(e);
125+
}
126+
127+
LOG.debug("Request body:\n{}", prettyPrinted);
121128
HttpResponse<String> response = null;
122129
try {
123130
response =

test/stack/20-hdfs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ spec:
5050
# https://github.com/stackabletech/hdfs-operator/blob/main/rust/operator-binary/src/kerberos.rs#L97-L101
5151
# This should be removed so that the mapping implementation can provide this information instead:
5252
hadoop.user.group.static.mapping.overrides: ""
53+
config:
54+
logging:
55+
containers:
56+
hdfs:
57+
console:
58+
level: DEBUG
59+
loggers:
60+
ROOT:
61+
level: INFO
62+
tech.stackable.hadoop:
63+
level: DEBUG
5364
roleGroups:
5465
default:
5566
replicas: 2

0 commit comments

Comments
 (0)