In E-MapReduce (EMR) V3.30.0 or later, JindoFS in block storage mode allows you to dump the metadata of an entire namespace to Object Storage Service (OSS) and use Jindo SQL to analyze the metadata.
Background information
In Hadoop Distributed File System (HDFS), the metadata is stored in a snapshot file named fsimage. The snapshot file contains the following information about metadata: namespace, file that stores the metadata, blocks, and file system quota. In HDFS, you can run a command to download the fsimage file in the XML format to your on-premises machine and view this file to analyze metadata offline. JindoFS does not require you to download metadata to your on-premises machine.
Upload HDFS metadata to OSS
jindo jfs -dumpMetadata <nsName>
<nsName>
indicates the name of the namespace in block storage mode.
jindo jfs -dumpMetadata test-block

Sucessfully upload namespace metadata to OSS.
Metadata upload path
The metadata upload path is the metadataDump sub-directory under sysinfo in JindoFS.
namespace.sysinfo.oss.uri
is set to oss://abc/
, metadata is uploaded to the oss://abc/metadataDump
directory.
Parameter | Description |
---|---|
namespace.sysinfo.oss.uri | The path of the OSS bucket. |
namespace.sysinfo.oss.endpoint | The endpoint. An endpoint specified in a different region can also be used. |
namespace.sysinfo.oss.access.key | The AccessKey ID of your Alibaba Cloud account. |
namespace.sysinfo.oss.access.secret | The AccessKey secret of your Alibaba Cloud account. |

- 1 indicates the configuration path of system information in OSS.
- 2 indicates a namespace.
- 3 indicates a batch number.
Metadata schema
{
"type":"string", /*Inode type, FILE DIRECTORY*/
"id": "string", /*INode id*/
"parentId" :"string", /*Parent node ID*/
"name":"string", /*Inode name*/
"size": "int", /*Inode size, BIGINT*/
"permission":"int", /*Permission, INT*/
"owner":"string", /*Owner name*/
"ownerGroup":"string", /*Owner group name*/
"mtime":"int", /*Inode modification time, BIGINT*/
"atime":"int", /*The time when the inode was last accessed, BIGINT*/
"attributes":"string", /*File-related attributes*/
"state":"string", /*Inode status*/
"storagePolicy":"string", /*Storage policy*/
"etag":"string" /*etag*/
}