タグ

HDFSに関するjupitrisonlabsのブックマーク (2)

  • Hadoop HDFSコマンド実行メモ(0.20.1)

    # 全体のhelpを見る $ bin/hadoop dfs -help # コマンド単体のヘルプを見る $ bin/hadoop dfs -help ls -ls <path>: List the contents that match the specified file pattern. If path is not specified, the contents of /user/<currentUser> will be listed. Directory entries are of the form dirName (full path) <dir> and file entries are of the form fileName(full path) <r n> size where n is the number of replicas specified for the

  • HDFSの読み書き - kikumotoのメモ帳

    Hadoop を設定できたので、Java からHDFSにファイルを置いたり、HDFSからファイルを読み出したりする方法をメモっておく。 以下で、大きく分けて2種類の方法を書いているけれど、共通な点としてまず、Configuration クラスのインスタンスを用意しておくというのがある。これはクラスパス上から core-site.xml を読む込むようになっている。 これも含めて、クラスパスには core-site.xml を含むディレクトリへのパス hadoop-0.20.0-core.jar commons-logging-1.0.4.jar を指定することがが最低限必要なもののようである。 ローカルファイル名を指定した読み書き HDFSへの書き込み ローカルファイル名とHDFS上のファイル名を指定して、HDFSに書き込む場合は FileSystem.copyFromLocalFile

    HDFSの読み書き - kikumotoのメモ帳
  • 1