Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitpatil1993
Contributor II
Contributor II

List File names that are NOT present in HDFS Directory

Hello

I am trying to get the names of Files that are NOT present in the specified HDFS directory.

(Note: I have multiple files using date mask for this check)

Here is what I thought will work but It's not

0695b00000G5UuXAAV.png

If condition --> !((Boolean)globalMap.get("tHDFSExist_1_EXISTS"))

tJava --> System.out.println(((String)globalMap.get("tHDFSExist_1_FILENAME")));

Can anyone help with the solution ?

Labels (3)
16 Replies
Anonymous
Not applicable

How do you set the file name parameter of tHDFSExist? use the global variable of tHDFSList? If so, all files do exist in the specified HDFS directory, and the condition you set is always false.

 

rohitpatil1993
Contributor II
Contributor II
Author

I think the condition is right since I want the names of Files that are not present.

Here is what you asked for.0695b00000G5VONAA3.jpg

Anonymous
Not applicable

You are iterating all files in the same directory as tHDFSList did, I don't understand why there will exist files are not present.

 

 

rohitpatil1993
Contributor II
Contributor II
Author

Maybe I set the wrong logic...

What is the way to list the files not present in the specified directory?

rohitpatil1993
Contributor II
Contributor II
Author

@Xiaodi Shi​  @Manohar B​  @Fred Trebuchet​ 

Do you guys have any idea on how to achieve the desired result?

manodwhb
Creator III
Creator III

@Rohit Patil​ ,what the location of the folder to check the List and exist components?

 

Thanks,

Manohar

rohitpatil1993
Contributor II
Contributor II
Author

The location is set in tHDFSList.

Anonymous
Not applicable

tHDFSList is used to iterate all files in the specified folder, the files must exist if you use tHDFSExist to check it. It's a logical error.

 

rohitpatil1993
Contributor II
Contributor II
Author

Yes. I understood that it was a logical error but what's the way out?

@Shicong Hong​