コード例 #1
0
ファイル: test_conf.py プロジェクト: ykkwon/hdfs3
def test_with_hadoop_conf(simple_conf_file):
    dname = os.path.dirname(simple_conf_file)
    os.environ['HADOOP_CONF_DIR'] = dname
    guess_config()
    assert os.environ['LIBHDFS3_CONF'] == simple_conf_file
    assert conf['host'] == 'this.place'
    assert conf['port'] == 9999
    assert conf['dfs.replication'] == '1'
コード例 #2
0
ファイル: test_conf.py プロジェクト: ykkwon/hdfs3
def test_default_port_and_host(no_conf):
    guess_config()
    hdfs = HDFileSystem(connect=False)
    assert hdfs.host == conf_defaults['host']
    assert hdfs.port == conf_defaults['port']
コード例 #3
0
ファイル: test_conf.py プロジェクト: ykkwon/hdfs3
def test_with_libhdfs3_conf(simple_conf_file):
    os.environ['LIBHDFS3_CONF'] = simple_conf_file
    guess_config()
    assert conf['host'] == 'this.place'
    assert conf['port'] == 9999
    assert conf['dfs.replication'] == '1'