karthik-kadajji commented on a change in pull request #4231:
URL: https://github.com/apache/nifi/pull/4231#discussion_r416551860
##########
File path:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
##########
@@ -253,7 +278,13 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
});
outgoingFlowFile =
session.putAllAttributes(outgoingFlowFile, attributes);
- session.getProvenanceReporter().receive(outgoingFlowFile,
getURI(context));
+ String uriPass = "";
+ if (context.getProperty(USER_NAME).getValue() != null) {
+ uriPass = "mongodb://" +
context.getProperty(USER_NAME).getValue() + ":" +
context.getProperty(PASSWORD).getValue() + "@" + getURI(context).substring(10);
Review comment:
I will add in the validation for the starting 10 characters for the URI.
I did see the MongoDB doc, for percent encoding which would be better:
a) forcing the user to handle the percent encoding and printing it in the
description as a note for user.
b) explicitly handling of it by the processor.
current implementation is goes the first way. But if you think It is better
for processor to handle, I will look into it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]