mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 17:15:39 +08:00
Add user to HDFS uri
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -245,8 +245,8 @@ def hdfs_server():
|
||||
host = os.environ.get('ARROW_HDFS_TEST_HOST', 'default')
|
||||
port = int(os.environ.get('ARROW_HDFS_TEST_PORT', 0))
|
||||
user = os.environ.get('ARROW_HDFS_TEST_USER', 'hdfs')
|
||||
uri = "hdfs://{}:{}".format(host, port)
|
||||
return uri, user
|
||||
uri = "hdfs://{}:{}/?user={}".format(host, port, user)
|
||||
return uri
|
||||
|
||||
|
||||
@pytest.mark.s3
|
||||
|
||||
@@ -108,7 +108,6 @@ def hdfs(request, hdfs_server):
|
||||
|
||||
uri, user = hdfs_server
|
||||
options = HdfsOptions.from_uri(uri)
|
||||
options.user = user
|
||||
|
||||
fs = HadoopFileSystem(options)
|
||||
|
||||
@@ -528,5 +527,6 @@ def test_hdfs_options(hdfs_server):
|
||||
options.buffer_size = 64*1024
|
||||
assert options.buffer_size == 64*1024
|
||||
|
||||
options = HdfsOptions.from_uri('hdfs://localhost:8080/')
|
||||
options = HdfsOptions.from_uri('hdfs://localhost:8080/?user=test')
|
||||
assert options.endpoint == ('localhost', 8080)
|
||||
assert options.user == 'test'
|
||||
Reference in new issue
Block a user