@vkotsas
First, you need to establish communication between the 2 [server01 and server02] to ensure the DNS can resolve, ssh is okay and Kerberos cross-realm is working if the clusters are kerberized.
Next copy hdfs-site.xml and core-site.xml from Hadoop server01 to Nifi server02 note the paths as you will need that information during the setup, in the Nifi perspective, the core-site.xml and hdfs-site.xml has all the necessary Hadoop connection information needed.
Use the FetchHDFS and not GetHDFS as the latter deletes the source, this skeleton procedure should help you fine-tune your HDFS copy from server01 to Server02 please let me know if you need more help?
Geoffrey