Support Questions
Find answers, ask questions, and share your expertise

Can anyone tell me webhdfs support search operation (rest api) in hadoop ?

Explorer

https://dzone.com/articles/hadoop-rest-api-webhdfs

this is the blog in which webhdfs supports insert, delete , rename, open and read file..

like wise i wanted to know wheather it support search file contents in webhdfs (rest api).?

search the keyword inside the filename is this operation supports ?

2 REPLIES 2

Super Mentor

@hema moger

No, the webhdfs API does not allow to search the keynames inside the filename.

But, you can get the file and then apply the filtering/search on it.

However if you have command line hadoop client then you can try this kind of command execution to find the desired String/Keywork:

# hdfs dfs -ls "/user/admin/*.*" | awk '{print $8}' | while read f; do hdfs dfs -cat "$f" | grep 'YOUR_KEYWORD' && echo $f ; done

.

Please change the path to search and the "YOUR_KEYWORD' with your string.

Explorer

@Jay Kumar SenSharma

It is giving the result. i want this to achieve in UI . Is there any way to do it ?

Kindly suggest.