Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Convert ASCII file to fsimage

Highlighted

Convert ASCII file to fsimage

Rising Star

Hi dear community!

 

could anybody tell it there any way to contert modified ASCII file, that was created through "hdfs oiv" command, to binary fsimage format?

in other words is there comand reverse to "hdfs oiv"?

 

thank you in advance!

6 REPLIES 6
Highlighted

Re: Convert ASCII file to fsimage

Master Guru
The current OIV tool does not do this. In past, I've relied on making
use of a simple Hex Editor to perform simple changes to the image (of
late, with the recovery tool now introduced, that has not come useful
again).

Highlighted

Re: Convert ASCII file to fsimage

Rising Star

Thanks for quick reply!

so, could you advise any tool for make some changes in binary fsimage?

 

cheers!

Highlighted

Re: Convert ASCII file to fsimage

Master Guru
I'm not aware of one such specific tool. What issue with the fsimage
are you trying to resolve with such a tool, that the 'hdfs namenode
-recover' command cannot help with instead?

Highlighted

Re: Convert ASCII file to fsimage

Rising Star

Seems that i met bug:

https://issues.apache.org/jira/browse/HDFS-5982

i want to delete corupted entity in ASCII file and build binaty fsimage.

After that use "hdfs namenode -recover"

 

thanks!

Re: Convert ASCII file to fsimage

New Contributor

This is a very interesting question.

 

I was wondering myself, if one could create an fsimage file from even a simple csv/json/xml file, providing that it contains the right columns.

 

I think a use case (more of an edge case) could be trying to restore a corrupt backup file after a namenode failure?

 

It'd be an interesting exercise to have extra redundancy by exporting the contents of the fsimage file to a conventional database (where one could query them a liittle easier too) - maybe that could even go into the CM mysql database at a later version?

Highlighted

Re: Convert ASCII file to fsimage

Master Guru
CM already reads/indexes the fsimages for its Reports feature:
http://www.cloudera.com/content/cloudera-content/cloudera-docs/xyzd4pacceptance/topics/cm_dg_reports...

It would indeed be helpful to be able to convert back from a CSV/etc.
file. Currently, for any rare fsimage damages, its been far easier to
change the reader code to skip appropriately.

Don't have an account?
Coming from Hortonworks? Activate your account here