markap14 commented on code in PR #10909:
URL: https://github.com/apache/nifi/pull/10909#discussion_r2822813994


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorRepository.java:
##########
@@ -367,17 +404,158 @@ public FrameworkConnectorInitializationContextBuilder 
createInitializationContex
         return new StandardConnectorInitializationContext.Builder();
     }
 
+    // ConnectorAssetRepository is an internal implementation detail;
+    // all external callers should use the asset methods on 
ConnectorRepository directly.
+
+    @Override
+    public Asset storeAsset(final String connectorId, final String assetId, 
final String assetName, final InputStream content) throws IOException {
+        if (configurationProvider == null) {
+            return assetRepository.storeAsset(connectorId, assetId, assetName, 
content);
+        }
+
+        // Buffer content so we can send it to both the local store and the 
provider
+        final byte[] contentBytes = content.readAllBytes();

Review Comment:
   +1. Most assets are likely small, a couple MB or less. But some JDBC drivers 
shade the world and could be hundreds of MB, or data sets could feasibly be 
multi-GB, etc.



-- 
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]

Reply via email to