forked from iterative/dvc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remote: hdfs: use pyarrow and connection pool
Related to iterative#1629 Speeds up HDFS tests significantly. E.g. ExternalHDFS test goes from 600 sec to 190sec. test_open_external[HDFS] from 160sec to 3sec. Signed-off-by: Ruslan Kuprieiev <[email protected]>
- Loading branch information
Showing
10 changed files
with
130 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
import os | ||
import sys | ||
import pytest | ||
|
||
from dvc.dependency.hdfs import DependencyHDFS | ||
|
||
from tests.unit.dependency.test_local import TestDependencyLOCAL | ||
|
||
|
||
@pytest.mark.skipif( | ||
sys.version_info[0] == 2 and os.name == "nt", | ||
reason="Not supported for python 2 on Windows.", | ||
) | ||
class TestDependencyHDFS(TestDependencyLOCAL): | ||
def _get_cls(self): | ||
return DependencyHDFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
import os | ||
import sys | ||
import pytest | ||
|
||
from dvc.output.hdfs import OutputHDFS | ||
|
||
from tests.unit.output.test_local import TestOutputLOCAL | ||
|
||
|
||
@pytest.mark.skipif( | ||
sys.version_info[0] == 2 and os.name == "nt", | ||
reason="Not supported for python 2 on Windows.", | ||
) | ||
class TestOutputHDFS(TestOutputLOCAL): | ||
def _get_cls(self): | ||
return OutputHDFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import pytest | ||
|
||
from dvc.remote.ssh.pool import ssh_connection | ||
from dvc.remote.pool import get_connection | ||
from dvc.remote.ssh.connection import SSHConnection | ||
|
||
|
||
def test_doesnt_swallow_errors(ssh_server): | ||
class MyError(Exception): | ||
pass | ||
|
||
with pytest.raises(MyError), ssh_connection(**ssh_server.test_creds): | ||
with pytest.raises(MyError), get_connection( | ||
SSHConnection, **ssh_server.test_creds | ||
): | ||
raise MyError |