This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
     new d3ea429d25 NIFI-12996 Moved zstd-jni to standard-shared-nar
d3ea429d25 is described below

commit d3ea429d25db6f339ddd0701d2bb2616f054eed6
Author: Joseph Witt <joew...@apache.org>
AuthorDate: Wed Apr 3 18:32:40 2024 -0500

    NIFI-12996 Moved zstd-jni to standard-shared-nar
    
    - zstd-jni must be present in the same NAR as commons-compress
    
    This closes #8598
    
    Signed-off-by: David Handermann <exceptionfact...@apache.org>
    
    (cherry picked from commit 98c4061cfee78590a7d391e53a835c5b87ca4bed)
---
 .../nifi-standard-bundle/nifi-standard-processors/pom.xml         | 8 ++++----
 .../java/org/apache/nifi/processors/standard/CompressContent.java | 3 +--
 nifi-nar-bundles/nifi-standard-bundle/pom.xml                     | 5 -----
 .../nifi-standard-shared-bundle/nifi-standard-shared-bom/pom.xml  | 8 ++++++++
 .../nifi-standard-shared-bundle/nifi-standard-shared-nar/pom.xml  | 4 ++++
 pom.xml                                                           | 6 ++++++
 6 files changed, 23 insertions(+), 11 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
index 9e3be54474..85256174a7 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
@@ -141,6 +141,10 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-compress</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.github.luben</groupId>
+            <artifactId>zstd-jni</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
@@ -234,10 +238,6 @@
             <groupId>com.github.jponge</groupId>
             <artifactId>lzma-java</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.github.luben</groupId>
-            <artifactId>zstd-jni</artifactId>
-        </dependency>
         <dependency>
             <groupId>com.aayushatharva.brotli4j</groupId>
             <artifactId>brotli4j</artifactId>
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
index dc83ca6686..90e190e8cb 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
@@ -348,8 +348,7 @@ public class CompressContent extends AbstractProcessor {
                                     compressionOut = new 
CompressorStreamFactory().createCompressorOutputStream(compressionFormat.toLowerCase(),
 bufferedOut);
                                     break;
                                 case COMPRESSION_FORMAT_ZSTD:
-                                    final int zstdcompressionLevel = 
context.getProperty(COMPRESSION_LEVEL).asInteger() * 2;
-                                    compressionOut = new 
ZstdCompressorOutputStream(bufferedOut, zstdcompressionLevel);
+                                    compressionOut = new 
ZstdCompressorOutputStream(bufferedOut);
                                     mimeTypeRef.set("application/zstd");
                                     break;
                                 case COMPRESSION_FORMAT_BROTLI:
diff --git a/nifi-nar-bundles/nifi-standard-bundle/pom.xml 
b/nifi-nar-bundles/nifi-standard-bundle/pom.xml
index 6831c02407..e2cf9dbce5 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/pom.xml
@@ -133,11 +133,6 @@
                 <artifactId>lzma-java</artifactId>
                 <version>1.3</version>
             </dependency>
-            <dependency>
-                <groupId>com.github.luben</groupId>
-                <artifactId>zstd-jni</artifactId>
-                <version>1.5.5-6</version>
-            </dependency>
             <dependency>
                 <groupId>com.aayushatharva.brotli4j</groupId>
                 <artifactId>brotli4j</artifactId>
diff --git 
a/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-bom/pom.xml 
b/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-bom/pom.xml
index 0081a6299c..3fab747209 100644
--- 
a/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-bom/pom.xml
+++ 
b/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-bom/pom.xml
@@ -31,12 +31,20 @@
                 <version>${org.apache.commons.codec.version}</version>
                 <scope>provided</scope>
             </dependency>
+            <!-- Commons compress and associated 'optional' dependencies we 
require -->
             <dependency>
                 <groupId>org.apache.commons</groupId>
                 <artifactId>commons-compress</artifactId>
                 <version>${org.apache.commons.compress.version}</version>
                 <scope>provided</scope>
             </dependency>
+            <dependency>
+                <groupId>com.github.luben</groupId>
+                <artifactId>zstd-jni</artifactId>
+                <version>${com.github.luben.zstd-jni.version}</version>
+                <scope>provided</scope>
+            </dependency>
+            <!-- end commons compress dependencies -->
             <dependency>
                 <groupId>commons-io</groupId>
                 <artifactId>commons-io</artifactId>
diff --git 
a/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-nar/pom.xml 
b/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-nar/pom.xml
index 3753d0c19e..21e4e4a2f0 100644
--- 
a/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-nar/pom.xml
+++ 
b/nifi-nar-bundles/nifi-standard-shared-bundle/nifi-standard-shared-nar/pom.xml
@@ -39,6 +39,10 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-compress</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.github.luben</groupId>
+            <artifactId>zstd-jni</artifactId>
+        </dependency>
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
diff --git a/pom.xml b/pom.xml
index a06bd53d6b..dbb3dcdda2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -113,6 +113,7 @@
         <org.apache.commons.cli.version>1.6.0</org.apache.commons.cli.version>
         
<org.apache.commons.codec.version>1.16.1</org.apache.commons.codec.version>
         
<org.apache.commons.compress.version>1.26.1</org.apache.commons.compress.version>
+        
<com.github.luben.zstd-jni.version>1.5.6-1</com.github.luben.zstd-jni.version>
         
<org.apache.commons.lang3.version>3.14.0</org.apache.commons.lang3.version>
         <org.apache.commons.net.version>3.10.0</org.apache.commons.net.version>
         <org.apache.commons.io.version>2.15.1</org.apache.commons.io.version>
@@ -266,6 +267,11 @@
                 <artifactId>commons-compress</artifactId>
                 <version>${org.apache.commons.compress.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.github.luben</groupId>
+                <artifactId>zstd-jni</artifactId>
+                <version>${com.github.luben.zstd-jni.version}</version>
+            </dependency>
             <dependency>
                 <groupId>commons-io</groupId>
                 <artifactId>commons-io</artifactId>

Reply via email to