Run a Local file system directory as input of a Mapper in cluster

后端 未结 7 994
刺人心
刺人心 2021-01-12 13:22

I gave an input to the mapper from a local filesystem.It is running successfully from eclipse,But not running from the cluster as it is unable to find the local input path s

7条回答
  •  失恋的感觉
    2021-01-12 14:03

    Try setting the input path like this

    FileInputFormat.addInputPath(conf, new Path(file:///the directory on your local filesystem));

    if you give the file extension, it can access files from the localsystem

提交回复
热议问题