Skip to content

Apache DataFusion SQL Query Engine

ARROW-7310: [Python] Expose HDFS implementation for pyarrow.fs

Krisztián Szűcscdece260544a
diff --git a/ci/etc/hdfs-site.xml b/ci/etc/hdfs-site.xml
index a80b945a66..97214337f5 100644
--- a/ci/etc/hdfs-site.xml
+++ b/ci/etc/hdfs-site.xml
@@ -14,7 +14,7 @@
limitations under the License. See accompanying LICENSE file.
-->
-<!-- Put site-specific property overrides in this file. -->
+<!-- This is the client configuration for the HDFS integration tests. -->
<configuration>
<property>
@@ -38,7 +38,15 @@
<value>false</value>
</property>
<property>
- <name>dfs.default.replica</name>
+ <name>dfs.default.replica</name>
<value>1</value>
+ </property>
+ <property>
+ <name>dfs.support.append</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>dfs.client.block.write.replace-datanode-on-failure.enable</name>
+ <value>false</value>
</property>
</configuration>
diff --git a/ci/scripts/integration_hdfs.sh b/ci/scripts/integration_hdfs.sh
index c4fa461a1f..9408425d0d 100755
--- a/ci/scripts/integration_hdfs.sh
+++ b/ci/scripts/integration_hdfs.sh
@@ -37,4 +37,5 @@ popd
# pytest ignores them, see https://github.com/pytest-dev/pytest/issues/3517
export PYARROW_TEST_HDFS=ON
+pytest -v --pyargs pyarrow.tests.test_fs
pytest -v --pyargs pyarrow.tests.test_hdfs
diff --git a/ci/scripts/python_build.sh b/ci/scripts/python_build.sh
index 6e9a308aba..22adf32704 100755
--- a/ci/scripts/python_build.sh
+++ b/ci/scripts/python_build.sh
@@ -27,6 +27,7 @@ export PYARROW_BUILD_TYPE=${CMAKE_BUILD_TYPE:-debug}
export PYARROW_WITH_S3=${ARROW_S3:-OFF}
export PYARROW_WITH_ORC=${ARROW_ORC:-OFF}
export PYARROW_WITH_CUDA=${ARROW_CUDA:-OFF}
+export PYARROW_WITH_HDFS=${ARROW_HDFS:-OFF}
export PYARROW_WITH_FLIGHT=${ARROW_FLIGHT:-OFF}
export PYARROW_WITH_PLASMA=${ARROW_PLASMA:-OFF}
export PYARROW_WITH_GANDIVA=${ARROW_GANDIVA:-OFF}
diff --git a/docker-compose.yml b/docker-compose.yml
index cebd6dea5e..14f224dfb8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1016,6 +1016,7 @@ services:
- impala:impala
environment:
<<: *ccache
+ ARROW_HDFS: "ON"
ARROW_HDFS_TEST_HOST: impala
ARROW_HDFS_TEST_PORT: 8020
ARROW_HDFS_TEST_USER: hdfs