You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2024/04/23 19:52:21 UTC

(nifi-minifi-cpp) branch main updated (3d7262a88 -> cb944b192)

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

martinzink pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


    from 3d7262a88 MINIFICPP-2326 Link lua statically
     new df42dd374 MINIFICPP-2339 Fix sccache path in CI workflow
     new ce2163403 MINIFICPP-2333 Don't register example python processors
     new cd35edd01 MINIFICPP-2334 win: smb and loki extensions on by default
     new cb944b192 MINIFICPP-2332 Fix data size conversion in NiFi python processors

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/ci.yml                           |  2 +-
 CMakeLists.txt                                     |  6 ++
 docker/test/integration/cluster/ContainerStore.py  |  3 +
 .../test/integration/cluster/DockerTestCluster.py  |  3 +
 docker/test/integration/cluster/ImageStore.py      | 14 ++-
 .../cluster/containers/MinifiContainer.py          |  3 +
 .../features/MiNiFi_integration_test_driver.py     |  3 +
 docker/test/integration/features/python.feature    | 23 ++++-
 docker/test/integration/features/steps/steps.py    |  5 ++
 ...gForwarder.py => SpecialPropertyTypeChecker.py} |  7 +-
 .../resources/python/SpecialPropertyTypeChecker.py | 99 ++++++++++++++++++++++
 .../AddPythonAttribute.py                          |  0
 .../CountingProcessor.py                           |  0
 .../GaussianDistributionWithNumpy.py               |  0
 .../MoveContentToJson.py                           |  0
 .../RemoveFlowFile.py                              |  0
 .../SentimentAnalysis.py                           |  0
 .../python/pythonprocessors/nifiapi/properties.py  | 12 +--
 msi/WixWin.wsi.in                                  | 21 ++---
 19 files changed, 176 insertions(+), 25 deletions(-)
 copy docker/test/integration/minifi/processors/{RotatingForwarder.py => SpecialPropertyTypeChecker.py} (84%)
 create mode 100644 docker/test/integration/resources/python/SpecialPropertyTypeChecker.py
 rename extensions/python/{pythonprocessors/examples => pythonprocessor-examples}/AddPythonAttribute.py (100%)
 rename extensions/python/{pythonprocessors/examples => pythonprocessor-examples}/CountingProcessor.py (100%)
 rename extensions/python/{pythonprocessors/examples => pythonprocessor-examples}/GaussianDistributionWithNumpy.py (100%)
 rename extensions/python/{pythonprocessors/examples => pythonprocessor-examples}/MoveContentToJson.py (100%)
 rename extensions/python/{pythonprocessors/examples => pythonprocessor-examples}/RemoveFlowFile.py (100%)
 rename extensions/python/{pythonprocessors/examples => pythonprocessor-examples}/SentimentAnalysis.py (100%)


(nifi-minifi-cpp) 03/04: MINIFICPP-2334 win: smb and loki extensions on by default

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit cd35edd018c8a4041a5548a7a1deff6457a600c3
Author: Marton Szasz <sz...@apache.org>
AuthorDate: Tue Apr 23 13:09:42 2024 +0200

    MINIFICPP-2334 win: smb and loki extensions on by default
    
    Closes #1764
    Signed-off-by: Martin Zink <ma...@apache.org>
---
 CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb91f9821..62a3f2ffe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -623,6 +623,7 @@ set(EXTENSIONS_ENABLED_BY_DEFAULT (
     minifi-elasticsearch
     minifi-expression-language-extensions
     minifi-gcp
+    minifi-grafana-loki
     minifi-http-curl
     minifi-archive-extensions
     minifi-mqtt-extensions
@@ -630,6 +631,7 @@ set(EXTENSIONS_ENABLED_BY_DEFAULT (
     minifi-pdh
     minifi-prometheus
     minifi-rocksdb-repos
+    minifi-smb
     minifi-splunk
     minifi-sql
     minifi-standard-processors


(nifi-minifi-cpp) 01/04: MINIFICPP-2339 Fix sccache path in CI workflow

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit df42dd3744023461c1adb29b6f92ad79f3a12a0d
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Tue Apr 23 13:08:42 2024 +0200

    MINIFICPP-2339 Fix sccache path in CI workflow
    
    Closes #1767
    Signed-off-by: Martin Zink <ma...@apache.org>
---
 .github/workflows/ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ffde88297..7ca9c8bba 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -216,7 +216,7 @@ jobs:
           Start-Process -FilePath ".\sqliteodbc_w64.exe" -ArgumentList "/S" -Wait
         shell: powershell
       - name: Add sccache to path
-        run: '[Environment]::SetEnvironmentVariable("PATH", [Environment]::GetEnvironmentVariable("PATH", [EnvironmentVariableTarget]::Machine) + ";C:\hostedtoolcache\windows\sccache\0.7.7\x64\", [EnvironmentVariableTarget]::Machine);'
+        run: '[Environment]::SetEnvironmentVariable("PATH", [Environment]::GetEnvironmentVariable("PATH", [EnvironmentVariableTarget]::Machine) + ";" + (Split-Path -Path $env:SCCACHE_PATH -Parent), [EnvironmentVariableTarget]::Machine);'
         shell: powershell
       - name: build
         run: |


(nifi-minifi-cpp) 02/04: MINIFICPP-2333 Don't register example python processors

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit ce21634035a7fbe491d073426d966b18d1769dfd
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Tue Apr 23 13:09:13 2024 +0200

    MINIFICPP-2333 Don't register example python processors
    
    Closes #1765
    Signed-off-by: Martin Zink <ma...@apache.org>
---
 CMakeLists.txt                                      |  4 ++++
 docker/test/integration/cluster/ContainerStore.py   |  3 +++
 .../test/integration/cluster/DockerTestCluster.py   |  3 +++
 docker/test/integration/cluster/ImageStore.py       | 10 ++++++++++
 .../cluster/containers/MinifiContainer.py           |  3 +++
 .../features/MiNiFi_integration_test_driver.py      |  3 +++
 docker/test/integration/features/python.feature     |  9 ++++++---
 docker/test/integration/features/steps/steps.py     |  5 +++++
 .../AddPythonAttribute.py                           |  0
 .../CountingProcessor.py                            |  0
 .../GaussianDistributionWithNumpy.py                |  0
 .../MoveContentToJson.py                            |  0
 .../RemoveFlowFile.py                               |  0
 .../SentimentAnalysis.py                            |  0
 msi/WixWin.wsi.in                                   | 21 +++++++++++----------
 15 files changed, 48 insertions(+), 13 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42d47ba49..cb91f9821 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -556,6 +556,10 @@ if (NOT WIN32)
         DESTINATION minifi-python
         COMPONENT bin)
 
+    install(DIRECTORY extensions/python/pythonprocessor-examples/
+        DESTINATION minifi-python-examples
+        COMPONENT bin)
+
     install(PROGRAMS bin/minifi.sh bin/minifi.service
         DESTINATION bin
         COMPONENT bin)
diff --git a/docker/test/integration/cluster/ContainerStore.py b/docker/test/integration/cluster/ContainerStore.py
index 8b17ee6ba..bd775ecea 100644
--- a/docker/test/integration/cluster/ContainerStore.py
+++ b/docker/test/integration/cluster/ContainerStore.py
@@ -370,6 +370,9 @@ class ContainerStore:
     def enable_log_metrics_publisher_in_minifi(self):
         self.minifi_options.enable_log_metrics_publisher = True
 
+    def enable_example_minifi_python_processors(self):
+        self.minifi_options.enable_example_minifi_python_processors = True
+
     def get_startup_finished_log_entry(self, container_name):
         container_name = self.get_container_name_with_postfix(container_name)
         return self.containers[container_name].get_startup_finished_log_entry()
diff --git a/docker/test/integration/cluster/DockerTestCluster.py b/docker/test/integration/cluster/DockerTestCluster.py
index 5451f67b6..04205a64a 100644
--- a/docker/test/integration/cluster/DockerTestCluster.py
+++ b/docker/test/integration/cluster/DockerTestCluster.py
@@ -128,6 +128,9 @@ class DockerTestCluster:
     def enable_log_metrics_publisher_in_minifi(self):
         self.container_store.enable_log_metrics_publisher_in_minifi()
 
+    def enable_example_minifi_python_processors(self):
+        self.container_store.enable_example_minifi_python_processors()
+
     def get_app_log(self, container_name):
         container_name = self.container_store.get_container_name_with_postfix(container_name)
         log_source = self.container_store.log_source(container_name)
diff --git a/docker/test/integration/cluster/ImageStore.py b/docker/test/integration/cluster/ImageStore.py
index 7a6e6cad6..e728da9a5 100644
--- a/docker/test/integration/cluster/ImageStore.py
+++ b/docker/test/integration/cluster/ImageStore.py
@@ -48,6 +48,8 @@ class ImageStore:
 
         if container_engine == "minifi-cpp-sql":
             image = self.__build_minifi_cpp_sql_image()
+        elif container_engine == "minifi-cpp-with-example-python-processors":
+            image = self.__build_minifi_cpp_image_with_example_minifi_python_processors()
         elif container_engine == "minifi-cpp-nifi-python":
             image = self.__build_minifi_cpp_image_with_nifi_python_processors(PythonOptions.REQUIREMENTS_FILE)
         elif container_engine == "minifi-cpp-nifi-python-system-python-packages":
@@ -105,6 +107,14 @@ class ImageStore:
 
         return self.__build_image(dockerfile)
 
+    def __build_minifi_cpp_image_with_example_minifi_python_processors(self):
+        dockerfile = dedent("""\
+                FROM {base_image}
+                RUN cp -r /opt/minifi/minifi-current/minifi-python-examples /opt/minifi/minifi-current/minifi-python/examples
+                """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION))
+
+        return self.__build_image(dockerfile)
+
     def __build_minifi_cpp_image_with_nifi_python_processors(self, python_option):
         parse_document_url = "https://raw.githubusercontent.com/apache/nifi/rel/nifi-" + NifiContainer.NIFI_VERSION + "/nifi-python-extensions/nifi-text-embeddings-module/src/main/python/ParseDocument.py"
         chunk_document_url = "https://raw.githubusercontent.com/apache/nifi/rel/nifi-" + NifiContainer.NIFI_VERSION + "/nifi-python-extensions/nifi-text-embeddings-module/src/main/python/ChunkDocument.py"
diff --git a/docker/test/integration/cluster/containers/MinifiContainer.py b/docker/test/integration/cluster/containers/MinifiContainer.py
index 6d6e8a6f5..db1dbd191 100644
--- a/docker/test/integration/cluster/containers/MinifiContainer.py
+++ b/docker/test/integration/cluster/containers/MinifiContainer.py
@@ -42,6 +42,7 @@ class MinifiOptions:
         self.set_ssl_context_properties = False
         self.enable_controller_socket = False
         self.enable_log_metrics_publisher = False
+        self.enable_example_minifi_python_processors = False
 
 
 class MinifiContainer(FlowContainer):
@@ -177,6 +178,8 @@ class MinifiContainer(FlowContainer):
 
         if self.options.enable_sql:
             image = self.image_store.get_image('minifi-cpp-sql')
+        elif self.options.enable_example_minifi_python_processors:
+            image = self.image_store.get_image('minifi-cpp-with-example-python-processors')
         elif self.options.use_nifi_python_processors_with_system_python_packages_installed:
             image = self.image_store.get_image('minifi-cpp-nifi-python-system-python-packages')
         elif self.options.use_nifi_python_processors_with_virtualenv or self.options.use_nifi_python_processors_with_virtualenv_packages_installed:
diff --git a/docker/test/integration/features/MiNiFi_integration_test_driver.py b/docker/test/integration/features/MiNiFi_integration_test_driver.py
index 383d751a9..2dad89e20 100644
--- a/docker/test/integration/features/MiNiFi_integration_test_driver.py
+++ b/docker/test/integration/features/MiNiFi_integration_test_driver.py
@@ -474,6 +474,9 @@ class MiNiFi_integration_test:
     def enable_log_metrics_publisher_in_minifi(self):
         self.cluster.enable_log_metrics_publisher_in_minifi()
 
+    def enable_example_minifi_python_processors(self):
+        self.cluster.enable_example_minifi_python_processors()
+
     def debug_bundle_can_be_retrieved_through_minifi_controller(self, container_name: str):
         assert self.cluster.debug_bundle_can_be_retrieved_through_minifi_controller(container_name) or self.cluster.log_app_output()
 
diff --git a/docker/test/integration/features/python.feature b/docker/test/integration/features/python.feature
index 877e0d65a..e2ec03568 100644
--- a/docker/test/integration/features/python.feature
+++ b/docker/test/integration/features/python.feature
@@ -29,7 +29,8 @@ Feature: MiNiFi can use python processors in its flows
     Then the Minifi logs contain the following message: "key:Python attribute value:attributevalue" in less than 60 seconds
 
   Scenario: A MiNiFi instance can update attributes through native python processor
-    Given a GenerateFlowFile processor with the "File Size" property set to "0B"
+    Given the example MiNiFi python processors are present
+    And a GenerateFlowFile processor with the "File Size" property set to "0B"
     And a AddPythonAttribute processor
     And a LogAttribute processor
     And the "success" relationship of the GenerateFlowFile processor is connected to the AddPythonAttribute
@@ -39,7 +40,8 @@ Feature: MiNiFi can use python processors in its flows
     Then the Minifi logs contain the following message: "key:Python attribute value:attributevalue" in less than 60 seconds
 
   Scenario: Native python processor can read empty input stream
-    Given a GenerateFlowFile processor with the "File Size" property set to "0B"
+    Given the example MiNiFi python processors are present
+    And a GenerateFlowFile processor with the "File Size" property set to "0B"
     And a MoveContentToJson processor
     And a PutFile processor with the "Directory" property set to "/tmp/output"
     And the "success" relationship of the GenerateFlowFile processor is connected to the MoveContentToJson
@@ -56,7 +58,8 @@ Feature: MiNiFi can use python processors in its flows
     Then the Minifi logs contain the following message: "Removing flow file with UUID" in less than 30 seconds
 
   Scenario: Native python processors can be stateful
-    Given a CountingProcessor processor
+    Given the example MiNiFi python processors are present
+    And a CountingProcessor processor
     And the scheduling period of the CountingProcessor processor is set to "100 ms"
     And a PutFile processor with the "Directory" property set to "/tmp/output"
     And the "success" relationship of the CountingProcessor processor is connected to the PutFile
diff --git a/docker/test/integration/features/steps/steps.py b/docker/test/integration/features/steps/steps.py
index 578a7742e..e778c2c46 100644
--- a/docker/test/integration/features/steps/steps.py
+++ b/docker/test/integration/features/steps/steps.py
@@ -1288,3 +1288,8 @@ def step_impl(context, install_mode):
         context.test.remove_python_requirements_txt_in_minifi()
     else:
         raise Exception("Unknown python install mode.")
+
+
+@given("the example MiNiFi python processors are present")
+def step_impl(context):
+    context.test.enable_example_minifi_python_processors()
diff --git a/extensions/python/pythonprocessors/examples/AddPythonAttribute.py b/extensions/python/pythonprocessor-examples/AddPythonAttribute.py
similarity index 100%
rename from extensions/python/pythonprocessors/examples/AddPythonAttribute.py
rename to extensions/python/pythonprocessor-examples/AddPythonAttribute.py
diff --git a/extensions/python/pythonprocessors/examples/CountingProcessor.py b/extensions/python/pythonprocessor-examples/CountingProcessor.py
similarity index 100%
rename from extensions/python/pythonprocessors/examples/CountingProcessor.py
rename to extensions/python/pythonprocessor-examples/CountingProcessor.py
diff --git a/extensions/python/pythonprocessors/examples/GaussianDistributionWithNumpy.py b/extensions/python/pythonprocessor-examples/GaussianDistributionWithNumpy.py
similarity index 100%
rename from extensions/python/pythonprocessors/examples/GaussianDistributionWithNumpy.py
rename to extensions/python/pythonprocessor-examples/GaussianDistributionWithNumpy.py
diff --git a/extensions/python/pythonprocessors/examples/MoveContentToJson.py b/extensions/python/pythonprocessor-examples/MoveContentToJson.py
similarity index 100%
rename from extensions/python/pythonprocessors/examples/MoveContentToJson.py
rename to extensions/python/pythonprocessor-examples/MoveContentToJson.py
diff --git a/extensions/python/pythonprocessors/examples/RemoveFlowFile.py b/extensions/python/pythonprocessor-examples/RemoveFlowFile.py
similarity index 100%
rename from extensions/python/pythonprocessors/examples/RemoveFlowFile.py
rename to extensions/python/pythonprocessor-examples/RemoveFlowFile.py
diff --git a/extensions/python/pythonprocessors/examples/SentimentAnalysis.py b/extensions/python/pythonprocessor-examples/SentimentAnalysis.py
similarity index 100%
rename from extensions/python/pythonprocessors/examples/SentimentAnalysis.py
rename to extensions/python/pythonprocessor-examples/SentimentAnalysis.py
diff --git a/msi/WixWin.wsi.in b/msi/WixWin.wsi.in
index 717bcdea7..3d08c3865 100644
--- a/msi/WixWin.wsi.in
+++ b/msi/WixWin.wsi.in
@@ -405,16 +405,6 @@ ${WIX_EXTRA_COMPONENTS}
             </Directory>
 
             <Directory Id="INSTALLPYTHONDIR" Name="minifi-python">
-              <Directory Id="INSTALLEXAMPLESDIR" Name="examples">
-                <Component Id="PythonProcessorExampleFiles" Guid="2508ace9-6f5d-4cb1-af66-58d5f44ae2b1">
-                  <File Id="Examples_AddPythonAttribute" Name="AddPythonAttribute.py" KeyPath="no" Source="..\extensions\python\pythonprocessors\examples\AddPythonAttribute.py"/>
-                  <File Id="Examples_CountingProcessor" Name="CountingProcessor.py" KeyPath="no" Source="..\extensions\python\pythonprocessors\examples\CountingProcessor.py"/>
-                  <File Id="Examples_GaussianDistributionWithNumpy" Name="GaussianDistributionWithNumpy.py" KeyPath="no" Source="..\extensions\python\pythonprocessors\examples\GaussianDistributionWithNumpy.py"/>
-                  <File Id="Examples_MoveContentToJson" Name="MoveContentToJson.py" KeyPath="no" Source="..\extensions\python\pythonprocessors\examples\MoveContentToJson.py"/>
-                  <File Id="Examples_RemoveFlowFile" Name="RemoveFlowFile.py" KeyPath="no" Source="..\extensions\python\pythonprocessors\examples\RemoveFlowFile.py"/>
-                  <File Id="Examples_SentimentAnalysis" Name="SentimentAnalysis.py" KeyPath="no" Source="..\extensions\python\pythonprocessors\examples\SentimentAnalysis.py"/>
-                </Component>
-              </Directory>
               <Directory Id="INSTALLGOOGLEDIR" Name="google">
                 <Component Id="PythonProcessorGoogleFiles" Guid="90b898a9-76fb-4888-a4aa-adcd22097863">
                   <File Id="Google_SentimentAnalyzer" Name="SentimentAnalyzer.py" KeyPath="yes" Source="..\extensions\python\pythonprocessors\google\SentimentAnalyzer.py"/>
@@ -451,6 +441,17 @@ ${WIX_EXTRA_COMPONENTS}
                 </Directory>
               </Directory>
             </Directory>
+
+            <Directory Id="INSTALLPYTHONEXAMPLESDIR" Name="minifi-python-examples">
+              <Component Id="PythonProcessorExampleFiles" Guid="2508ace9-6f5d-4cb1-af66-58d5f44ae2b1">
+                <File Id="Examples_AddPythonAttribute" Name="AddPythonAttribute.py" KeyPath="no" Source="..\extensions\python\pythonprocessor-examples\AddPythonAttribute.py"/>
+                <File Id="Examples_CountingProcessor" Name="CountingProcessor.py" KeyPath="no" Source="..\extensions\python\pythonprocessor-examples\CountingProcessor.py"/>
+                <File Id="Examples_GaussianDistributionWithNumpy" Name="GaussianDistributionWithNumpy.py" KeyPath="no" Source="..\extensions\python\pythonprocessor-examples\GaussianDistributionWithNumpy.py"/>
+                <File Id="Examples_MoveContentToJson" Name="MoveContentToJson.py" KeyPath="no" Source="..\extensions\python\pythonprocessor-examples\MoveContentToJson.py"/>
+                <File Id="Examples_RemoveFlowFile" Name="RemoveFlowFile.py" KeyPath="no" Source="..\extensions\python\pythonprocessor-examples\RemoveFlowFile.py"/>
+                <File Id="Examples_SentimentAnalysis" Name="SentimentAnalysis.py" KeyPath="no" Source="..\extensions\python\pythonprocessor-examples\SentimentAnalysis.py"/>
+              </Component>
+            </Directory>
           </Directory>
     </DirectoryRef>
   </Fragment>


(nifi-minifi-cpp) 04/04: MINIFICPP-2332 Fix data size conversion in NiFi python processors

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit cb944b192053aefdfb9461b3508181ad07f35c3d
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Tue Apr 23 13:10:28 2024 +0200

    MINIFICPP-2332 Fix data size conversion in NiFi python processors
    
    Closes #1760
    Signed-off-by: Martin Zink <ma...@apache.org>
---
 docker/test/integration/cluster/ImageStore.py      |  4 +-
 docker/test/integration/features/python.feature    | 14 +++
 .../processors/SpecialPropertyTypeChecker.py       | 25 ++++++
 .../resources/python/SpecialPropertyTypeChecker.py | 99 ++++++++++++++++++++++
 .../python/pythonprocessors/nifiapi/properties.py  | 12 +--
 5 files changed, 147 insertions(+), 7 deletions(-)

diff --git a/docker/test/integration/cluster/ImageStore.py b/docker/test/integration/cluster/ImageStore.py
index e728da9a5..b18699103 100644
--- a/docker/test/integration/cluster/ImageStore.py
+++ b/docker/test/integration/cluster/ImageStore.py
@@ -143,6 +143,7 @@ class ImageStore:
                 {additional_cmd}
                 USER minificpp
                 COPY RotatingForwarder.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/RotatingForwarder.py
+                COPY SpecialPropertyTypeChecker.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/SpecialPropertyTypeChecker.py
                 RUN wget {parse_document_url} --directory-prefix=/opt/minifi/minifi-current/minifi-python/nifi_python_processors && \\
                     wget {chunk_document_url} --directory-prefix=/opt/minifi/minifi-current/minifi-python/nifi_python_processors && \\
                     echo 'langchain<=0.17.0' > /opt/minifi/minifi-current/minifi-python/nifi_python_processors/requirements.txt && \\
@@ -162,7 +163,8 @@ class ImageStore:
                            parse_document_sed_cmd=parse_document_sed_cmd,
                            chunk_document_sed_cmd=chunk_document_sed_cmd))
 
-        return self.__build_image(dockerfile, [os.path.join(self.test_dir, "resources", "python", "RotatingForwarder.py")])
+        return self.__build_image(dockerfile, [os.path.join(self.test_dir, "resources", "python", "RotatingForwarder.py"),
+                                               os.path.join(self.test_dir, "resources", "python", "SpecialPropertyTypeChecker.py")])
 
     def __build_http_proxy_image(self):
         dockerfile = dedent("""\
diff --git a/docker/test/integration/features/python.feature b/docker/test/integration/features/python.feature
index e2ec03568..4f0110902 100644
--- a/docker/test/integration/features/python.feature
+++ b/docker/test/integration/features/python.feature
@@ -114,3 +114,17 @@ Feature: MiNiFi can use python processors in its flows
     When all instances start up
 
     Then flowfiles with these contents are placed in the monitored directory in less than 10 seconds: "test_data_one,test_data_two,test_data_three,test_data_four"
+
+  @USE_NIFI_PYTHON_PROCESSORS
+  Scenario: MiNiFi C++ can use special property types in NiFi native python processors
+    Given a GenerateFlowFile processor with the "File Size" property set to "0B"
+    And a SpecialPropertyTypeChecker processor
+    And a PutFile processor with the "Directory" property set to "/tmp/output"
+    And python is installed on the MiNiFi agent with a pre-created virtualenv
+
+    And the "success" relationship of the GenerateFlowFile processor is connected to the SpecialPropertyTypeChecker
+    And the "success" relationship of the SpecialPropertyTypeChecker processor is connected to the PutFile
+
+    When all instances start up
+
+    Then one flowfile with the contents "Check successful!" is placed in the monitored directory in less than 30 seconds
diff --git a/docker/test/integration/minifi/processors/SpecialPropertyTypeChecker.py b/docker/test/integration/minifi/processors/SpecialPropertyTypeChecker.py
new file mode 100644
index 000000000..58da4db54
--- /dev/null
+++ b/docker/test/integration/minifi/processors/SpecialPropertyTypeChecker.py
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from ..core.Processor import Processor
+
+
+class SpecialPropertyTypeChecker(Processor):
+    def __init__(self, context):
+        super(SpecialPropertyTypeChecker, self).__init__(
+            context=context,
+            clazz='SpecialPropertyTypeChecker',
+            class_prefix='org.apache.nifi.minifi.processors.nifi_python_processors.',
+            properties={},
+            auto_terminate=[])
diff --git a/docker/test/integration/resources/python/SpecialPropertyTypeChecker.py b/docker/test/integration/resources/python/SpecialPropertyTypeChecker.py
new file mode 100644
index 000000000..23354d594
--- /dev/null
+++ b/docker/test/integration/resources/python/SpecialPropertyTypeChecker.py
@@ -0,0 +1,99 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from nifiapi.flowfiletransform import FlowFileTransform, FlowFileTransformResult
+from nifiapi.properties import PropertyDescriptor, TimeUnit, DataUnit
+
+
+class SpecialPropertyTypeChecker(FlowFileTransform):
+    """
+    Checks if custom property types are working as expected
+    """
+    TIME_PERIOD_PROPERTY = PropertyDescriptor(
+        name="Time Period Property",
+        description="Dummy property that should be a time period",
+        default_value="2 hours",
+        required=True
+    )
+    DATA_SIZE_PROPERTY = PropertyDescriptor(
+        name="Data Size Property",
+        description="Dummy property that should be a data size",
+        default_value="100 MB",
+        required=True
+    )
+
+    property_descriptors = [
+        TIME_PERIOD_PROPERTY,
+        DATA_SIZE_PROPERTY
+    ]
+
+    def __init__(self, **kwargs):
+        pass
+
+    def getPropertyDescriptors(self):
+        return self.property_descriptors
+
+    def transform(self, context, flowFile):
+        time_in_microseconds = context.getProperty(self.TIME_PERIOD_PROPERTY).asTimePeriod(TimeUnit.MICROSECONDS)
+        if time_in_microseconds != 7200000000:
+            self.logger.error("Time period property conversion to microseconds is not working as expected")
+            return FlowFileTransformResult("failure", contents="Time period property conversion to microseconds is not working as expected")
+
+        time_in_milliseconds = context.getProperty(self.TIME_PERIOD_PROPERTY).asTimePeriod(TimeUnit.MILLISECONDS)
+        if time_in_milliseconds != 7200000:
+            self.logger.error("Time period property conversion to milliseconds is not working as expected")
+            return FlowFileTransformResult("failure", contents="Time period property conversion to milliseconds is not working as expected")
+
+        time_in_seconds = context.getProperty(self.TIME_PERIOD_PROPERTY).asTimePeriod(TimeUnit.SECONDS)
+        if time_in_seconds != 7200:
+            self.logger.error("Time period property conversion to seconds is not working as expected")
+            return FlowFileTransformResult("failure", contents="Time period property conversion to seconds is not working as expected")
+
+        time_in_minutes = context.getProperty(self.TIME_PERIOD_PROPERTY).asTimePeriod(TimeUnit.MINUTES)
+        if time_in_minutes != 120:
+            self.logger.error("Time period property conversion to minutes is not working as expected")
+            return FlowFileTransformResult("failure", contents="Time period property conversion to minutes is not working as expected")
+
+        time_in_hours = context.getProperty(self.TIME_PERIOD_PROPERTY).asTimePeriod(TimeUnit.HOURS)
+        if time_in_hours != 2:
+            self.logger.error("Time period property conversion to hours is not working as expected")
+            return FlowFileTransformResult("failure", contents="Time period property conversion to hours is not working as expected")
+
+        time_in_days = context.getProperty(self.TIME_PERIOD_PROPERTY).asTimePeriod(TimeUnit.DAYS)
+        if time_in_days != 0:
+            self.logger.error("Time period property conversion to days is not working as expected")
+            return FlowFileTransformResult("failure", contents="Time period property conversion to days is not working as expected")
+
+        data_size_in_bytes = context.getProperty(self.DATA_SIZE_PROPERTY).asDataSize(DataUnit.B)
+        if data_size_in_bytes != 104857600.0:
+            self.logger.error("Data size property conversion to bytes is not working as expected")
+            return FlowFileTransformResult("failure", contents="Data size property conversion to bytes is not working as expected")
+
+        data_size_in_kilobytes = context.getProperty(self.DATA_SIZE_PROPERTY).asDataSize(DataUnit.KB)
+        if data_size_in_kilobytes != 102400.0:
+            self.logger.error("Data size property conversion to kilobytes is not working as expected")
+            return FlowFileTransformResult("failure", contents="Data size property conversion to kilobytes is not working as expected")
+
+        data_size_in_megabytes = context.getProperty(self.DATA_SIZE_PROPERTY).asDataSize(DataUnit.MB)
+        if data_size_in_megabytes != 100.0:
+            self.logger.error("Data size property conversion to megabytes is not working as expected")
+            return FlowFileTransformResult("failure", contents="Data size property conversion to megabytes is not working as expected")
+
+        data_size_in_gigabytes = context.getProperty(self.DATA_SIZE_PROPERTY).asDataSize(DataUnit.GB)
+        if data_size_in_gigabytes != 0.09765625:
+            self.logger.error("Data size property conversion to gigabytes is not working as expected")
+            return FlowFileTransformResult("failure", contents="Data size property conversion to gigabytes is not working as expected")
+
+        return FlowFileTransformResult("success", contents="Check successful!")
diff --git a/extensions/python/pythonprocessors/nifiapi/properties.py b/extensions/python/pythonprocessors/nifiapi/properties.py
index a146539e5..4f98c48aa 100644
--- a/extensions/python/pythonprocessors/nifiapi/properties.py
+++ b/extensions/python/pythonprocessors/nifiapi/properties.py
@@ -241,20 +241,20 @@ class PythonPropertyValue:
             return int(round(milliseconds / 1000 / 60 / 60 / 24))
         return 0
 
-    def asDataSize(self, data_unit: DataUnit) -> int:
+    def asDataSize(self, data_unit: DataUnit) -> float:
         if not self.value:
             return None
         bytes = dataSizeStringToBytes(self.value)
         if data_unit == DataUnit.B:
-            return bytes
+            return float(bytes)
         if data_unit == DataUnit.KB:
-            return int(bytes / 1000)
+            return float(bytes / 1024)
         if data_unit == DataUnit.MB:
-            return int(bytes / 1000 / 1000)
+            return float(bytes / 1024 / 1024)
         if data_unit == DataUnit.GB:
-            return int(bytes / 1000 / 1000 / 1000)
+            return float(bytes / 1024 / 1024 / 1024)
         if data_unit == DataUnit.TB:
-            return int(bytes / 1000 / 1000 / 1000 / 1000)
+            return float(bytes / 1024 / 1024 / 1024 / 1024)
         return 0
 
     def evaluateAttributeExpressions(self, flow_file_proxy: FlowFileProxy = None):