summaryrefslogtreecommitdiffstats
path: root/src/arrow/ci/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arrow/ci/etc')
-rw-r--r--src/arrow/ci/etc/hdfs-site.xml52
-rw-r--r--src/arrow/ci/etc/rprofile62
-rw-r--r--src/arrow/ci/etc/valgrind-cran.supp34
3 files changed, 148 insertions, 0 deletions
diff --git a/src/arrow/ci/etc/hdfs-site.xml b/src/arrow/ci/etc/hdfs-site.xml
new file mode 100644
index 000000000..97214337f
--- /dev/null
+++ b/src/arrow/ci/etc/hdfs-site.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. See accompanying LICENSE file.
+-->
+
+<!-- This is the client configuration for the HDFS integration tests. -->
+
+<configuration>
+ <property>
+ <name>dfs.replication</name>
+ <value>2</value>
+ </property>
+ <property>
+ <name>dfs.datanode.data.dir</name>
+ <value>file:///data/dfs/data</value>
+ </property>
+ <property>
+ <name>dfs.namenode.name.dir</name>
+ <value>file:///data/dfs/name</value>
+ </property>
+ <property>
+ <name>dfs.namenode.checkpoint.dir</name>
+ <value>file:///data/dfs/namesecondary </value>
+ </property>
+ <property>
+ <name>dfs.namenode.datanode.registration.ip-hostname-check</name>
+ <value>false</value>
+ </property>
+ <property>
+ <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/src/arrow/ci/etc/rprofile b/src/arrow/ci/etc/rprofile
new file mode 100644
index 000000000..5ef1dca8f
--- /dev/null
+++ b/src/arrow/ci/etc/rprofile
@@ -0,0 +1,62 @@
+ local({
+ .pick_cran <- function() {
+ # Return a CRAN repo URL, preferring RSPM binaries if available for this OS
+ rspm_template <- "https://packagemanager.rstudio.com/cran/__linux__/%s/latest"
+ supported_os <- c("focal", "xenial", "bionic", "centos7", "centos8", "opensuse42", "opensuse15", "opensuse152")
+
+ if (nzchar(Sys.which("lsb_release"))) {
+ os <- tolower(system("lsb_release -cs", intern = TRUE))
+ if (os %in% supported_os) {
+ return(sprintf(rspm_template, os))
+ }
+ }
+ if (file.exists("/etc/os-release")) {
+ os_release <- readLines("/etc/os-release")
+ vals <- sub("^.*=(.*)$", "\\1", os_release)
+ os <- intersect(vals, supported_os)
+ if (length(os)) {
+ # e.g. "bionic"
+ return(sprintf(rspm_template, os))
+ } else {
+ names(vals) <- sub("^(.*)=.*$", "\\1", os_release)
+ if (vals["ID"] == "opensuse") {
+ version <- sub('^"?([0-9]+).*"?.*$', "\\1", vals["VERSION_ID"])
+ os <- paste0("opensuse", version)
+ if (os %in% supported_os) {
+ return(sprintf(rspm_template, os))
+ }
+ }
+ }
+ }
+ if (file.exists("/etc/system-release")) {
+ # Something like "CentOS Linux release 7.7.1908 (Core)"
+ system_release <- tolower(utils::head(readLines("/etc/system-release"), 1))
+ # Extract from that the distro and the major version number
+ os <- sub("^([a-z]+) .* ([0-9]+).*$", "\\1\\2", system_release)
+ if (os %in% supported_os) {
+ return(sprintf(rspm_template, os))
+ }
+ }
+
+ return("https://cloud.r-project.org")
+ }
+
+ options(
+ Ncpus = parallel::detectCores(),
+ repos = tryCatch(.pick_cran(), error = function(e) "https://cloud.r-project.org"),
+ HTTPUserAgent = sprintf(
+ 'R/%s R (%s)',
+ getRversion(),
+ paste(getRversion(), R.version$platform, R.version$arch, R.version$os)
+ )
+ )
+
+ # there's a bug in 3.5 that will warn/error on these, so only set it around that
+ if (getRversion() >= "3.6.0" || getRversion() < "3.5.0") {
+ options(
+ warnPartialMatchAttr = TRUE,
+ warnPartialMatchDollar = TRUE,
+ warnPartialMatchArgs = TRUE
+ )
+ }
+})
diff --git a/src/arrow/ci/etc/valgrind-cran.supp b/src/arrow/ci/etc/valgrind-cran.supp
new file mode 100644
index 000000000..4d2922026
--- /dev/null
+++ b/src/arrow/ci/etc/valgrind-cran.supp
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+{
+ # `testthat::skip()`s cause a valgrind error that does not show up on CRAN.
+ <testthat_skip_error>
+ Memcheck:Cond
+ fun:gregexpr_Regexc
+ fun:do_regexpr
+ fun:bcEval
+ fun:Rf_eval
+ fun:R_execClosure
+ fun:Rf_applyClosure
+ fun:bcEval
+ fun:Rf_eval
+ fun:forcePromise
+ fun:FORCE_PROMISE
+ fun:getvar
+ fun:bcEval
+}