Multiples Hadoop FileSystem instances

后端 未结 2 1679
长情又很酷
长情又很酷 2021-02-06 13:12

I have a class (I removes try/catch for readability):

public class HadoopFileSystem {

    private FileSystem m_fileSystem = null;

    public HadoopFileSystem()         


        
2条回答
  •  Happy的楠姐
    2021-02-06 13:40

    m_fileSystem = FileSystem.get(l_configuration ); is a static call even if you have two different objects created. You need to find a way to not make this call static for two different objects.

    Try this out to do away with the problem,

    conf.setBoolean("fs.hdfs.impl.disable.cache", true);
    

提交回复
热议问题