briansolo1985 commented on code in PR #6434:
URL: https://github.com/apache/nifi/pull/6434#discussion_r979236259
##########
c2/c2-client-bundle/c2-client-http/src/main/java/org/apache/nifi/c2/client/http/C2HttpClient.java:
##########
@@ -124,15 +130,38 @@ public Optional<byte[]> retrieveUpdateContent(String
flowUpdateUrl) {
public void acknowledgeOperation(C2OperationAck operationAck) {
logger.info("Acknowledging Operation [{}] C2 URL [{}]",
operationAck.getOperationId(), clientConfig.getC2AckUrl());
serializer.serialize(operationAck)
- .map(operationAckBody -> RequestBody.create(operationAckBody,
MEDIA_TYPE_APPLICATION_JSON))
+ .map(operationAckBody -> create(operationAckBody,
MEDIA_TYPE_APPLICATION_JSON))
.map(requestBody -> new
Request.Builder().post(requestBody).url(clientConfig.getC2AckUrl()).build())
.ifPresent(this::sendAck);
}
+ @Override
+ public Optional<String> uploadDebugBundle(String debugCallbackUrl, byte[]
debugBundle) {
+ Request request = new Request.Builder()
+ .url(debugCallbackUrl)
+ .post(new MultipartBody.Builder()
+ .setType(FORM)
+ .addFormDataPart(MULTIPART_FORM_FILE_FIELD_NAME,
DEBUG_BUNDLE_FILE_NAME, create(debugBundle, DEBUG_BUNDLE_MIME_TYPE))
+ .build())
+ .build();
+
+ logger.info("Uploading debug bundle to url={} size={}",
debugCallbackUrl, debugBundle.length);
Review Comment:
Standardized the log messages
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]