Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Binwei Yang committed Nov 14, 2023
1 parent 8535176 commit 43509b9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cpp/velox/compute/VeloxBackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ void VeloxBackend::printConf(const std::unordered_map<std::string, std::string>&

void VeloxBackend::init(const std::unordered_map<std::string, std::string>& conf) {
// Init glog and log level.
auto veloxmmecfg = std::make_shared<facebook::velox::core::MemConfigMutable>(conf);
const facebook::velox::Config* veloxcfg = veloxmmecfg.get();
auto veloxmemcfg = std::make_shared<facebook::velox::core::MemConfigMutable>(conf);
const facebook::velox::Config* veloxcfg = veloxmemcfg.get();

uint32_t vlogLevel = veloxcfg->get<uint32_t>(kGlogVerboseLevel, kGlogVerboseLevelDefault);
uint32_t severityLogLevel = veloxcfg->get<uint32_t>(kGlogSeverityLevel, kGlogSeverityLevelDefault);
Expand Down Expand Up @@ -179,22 +179,22 @@ void VeloxBackend::init(const std::unordered_map<std::string, std::string>& conf

std::unordered_map<std::string, std::string> s3Config({});
if (useInstanceCredentials) {
veloxmmecfg->setValue("hive.s3.use-instance-credentials", "true");
veloxmemcfg->setValue("hive.s3.use-instance-credentials", "true");
} else if (!iamRole.empty()) {
veloxmmecfg->setValue("hive.s3.iam-role", iamRole);
veloxmemcfg->setValue("hive.s3.iam-role", iamRole);
if (!iamRoleSessionName.empty()) {
veloxmmecfg->setValue("hive.s3.iam-role-session-name", iamRoleSessionName);
veloxmemcfg->setValue("hive.s3.iam-role-session-name", iamRoleSessionName);
}
} else {
veloxmmecfg->setValue("hive.s3.aws-access-key", awsAccessKey);
veloxmmecfg->setValue("hive.s3.aws-secret-key", awsSecretKey);
veloxmemcfg->setValue("hive.s3.aws-access-key", awsAccessKey);
veloxmemcfg->setValue("hive.s3.aws-secret-key", awsSecretKey);
}
// Only need to set s3 endpoint when not use instance credentials.
if (!useInstanceCredentials) {
veloxmmecfg->setValue("hive.s3.endpoint", awsEndpoint);
veloxmemcfg->setValue("hive.s3.endpoint", awsEndpoint);
}
veloxmmecfg->setValue("hive.s3.ssl.enabled", sslEnabled ? "true" : "false");
veloxmmecfg->setValue("hive.s3.path-style-access", pathStyleAccess ? "true" : "false");
veloxmemcfg->setValue("hive.s3.ssl.enabled", sslEnabled ? "true" : "false");
veloxmemcfg->setValue("hive.s3.path-style-access", pathStyleAccess ? "true" : "false");
#endif

initCache(veloxcfg);
Expand All @@ -206,7 +206,7 @@ void VeloxBackend::init(const std::unordered_map<std::string, std::string>& conf

auto hiveConnector =
velox::connector::getConnectorFactory(velox::connector::hive::HiveConnectorFactory::kHiveConnectorName)
->newConnector(kHiveConnectorId, veloxmmecfg, ioExecutor_.get());
->newConnector(kHiveConnectorId, veloxmemcfg, ioExecutor_.get());

registerConnector(hiveConnector);

Expand Down

0 comments on commit 43509b9

Please sign in to comment.