Skip to content

Instantly share code, notes, and snippets.

@hochun836
Last active July 27, 2021 07:24
Show Gist options
  • Save hochun836/8d2d461498f29a6c594453148dcd2c69 to your computer and use it in GitHub Desktop.
Save hochun836/8d2d461498f29a6c594453148dcd2c69 to your computer and use it in GitHub Desktop.
# hdfs
hdfs version
hdfs namenode -format // IMPORTANT: format the DFS filesystem
# hadoop
hadoop fs -ls <dfs-path>
hadoop fs -cat <dfs-path>
hadoop fs -get <dfs-path>
hadoop fs -put <local-path> <dfs-path>
hadoop fs -mkdir <dfs-path>
hadoop fs -rm -r <dfs-path>
hadoop dfsadmin -report
hadoop fsck <dfs-path> -files -blocks // 'fsck' is a hdfs filesystem checking utility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment