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

How can I get fsimage with curl command?

How can I get fsimage with curl command?

Explorer

I can get fsimage with 

 

hdfs dfsadmin -fetchImage ./fetched_image

 

This command seems to get fsimage from the below url.

 

https://{namenode-1}:9470/imagetransfer?getimage=1&txid=latest

 

I have multiple namenodes, but dfsadmin fetches only from the first namenode.

 

So, I want to fetch with curl command, inserting a certain namenode address into {namenode}.

 

How can I achieve this?

 

Just running 

 

curl https://{namenode-1}:9470/imagetransfer?getimage=1&txid=latest

 

prints error even though kerberos ticket is the same as dfsadmin:

 

<p>Problem accessing /imagetransfer. Reason:
<pre> Authentication required</pre></p>

1 REPLY 1

Re: How can I get fsimage with curl command?

Contributor