Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
JkSelf committed Jul 9, 2024
1 parent 0b14b8f commit 733e388
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions scripts/setup-adapters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ function install_hdfs_deps {
# Dependencies for Hadoop testing
wget_and_untar https://archive.apache.org/dist/hadoop/common/hadoop-2.10.1/hadoop-2.10.1.tar.gz hadoop
cp -a hadoop /usr/local/

yum install -y java-1.8.0-openjdk-devel
fi
cmake_install
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "HdfsMiniCluster.h"
#include <iostream>

namespace facebook::velox::filesystems::test {
void HdfsMiniCluster::start() {
Expand Down Expand Up @@ -63,7 +64,6 @@ bool HdfsMiniCluster::isRunning() {
HdfsMiniCluster::HdfsMiniCluster() {
env_ = (boost::process::environment)boost::this_process::environment();
env_["PATH"] = env_["PATH"].to_string() + hadoopSearchPath;
env_["PATH"] = env_["PATH"].to_string() + jvmSearchPath;
auto path = env_["PATH"].to_vector();
exePath_ = boost::process::search_path(
miniClusterExecutableName,
Expand All @@ -72,7 +72,14 @@ HdfsMiniCluster::HdfsMiniCluster() {
VELOX_FAIL(
"Failed to find minicluster executable {}'", miniClusterExecutableName);
}
env_["JAVA_HOME"] = jvmSearchPath;

auto result = system("sudo yum install java-1.8.0-openjdk -y");
if (result != 0) {
std::cout << "Failed to install JVM." << std::endl;
return; // Exit if installation fails
}

env_["JAVA_HOME"] = "/usr/lib/jvm/java-1.8.0-openjdk/";
boost::filesystem::path hadoopHomeDirectory = exePath_;
hadoopHomeDirectory.remove_leaf().remove_leaf();
setupEnvironment(hadoopHomeDirectory.string());
Expand Down

0 comments on commit 733e388

Please sign in to comment.