The 5 S3 related processor present in NiFi cannot create a Minio Bucket.
- ListS3
- PutS3Object
- DeleteS3Object
- FetchS3Object
- TagS3Object
So I tried to use the ExecuteScript processor and import the python minio module inside of it
In order to do that I install pip3 on my CentOS machine and did pip3 install minio
(it installed it in /usr/local/lib/python3.6/site-packages/
).
Then in my ExecuteProcessor I set the following configuration :
Script Engine : python
Script File : No value set
Script Body :
from minio import Minio
from minio.error import (ResponseError, BucketAlreadyOwnedByYou,
BucketAlreadyExists)
minioClient = Minio('minio',
access_key='XXXX',
secret_key='XXXX')
Module Directory: /usr/local/lib/python3.6/site-packages/
But I keep getting this error
No module named builtins in at line number 1
Full error :
ExecuteScript[id=3a3e689a-0170-1000-fa4d-b0874062b8cc] ExecuteScript[id=3a3e689a-0170-1000-fa4d-b0874062b8cc] failed to process due to javax.script.ScriptException: ImportError: No module named builtins in at line number 1; rolling back session: org.apache.nifi.processor.exception.ProcessException: javax.script.ScriptException: ImportError: No module named builtins in at line number 1
Hypothesis 1 :
Of what I understand NiFi use Jython and then cannot use C-related Python module, I couldn't find the confirmation that minio-py was one of them but it seems to be the most relevant reason.
is there something I'm missing ?