Skip to content

Commit

Permalink
bug fix: core-site.xml config ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
Denisas committed Feb 3, 2022
1 parent 3cfa925 commit a12c7b1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import io.micronaut.context.annotation.Property;
import io.micronaut.context.annotation.Requires;
import jakarta.inject.Singleton;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.client.api.YarnClient;
import org.apache.hadoop.yarn.conf.YarnConfiguration;

@Factory
@Requires(beans = YarnProperties.class)
Expand All @@ -19,7 +19,7 @@ public class YarnConfigurationFactory {
@Singleton
public YarnBackend backend(YarnProperties yarnProperties, AppConfiguration conf,
@Property(name = "hadoop.conf.dir") String hadoopConfDir) {
YarnConfiguration yarnConfiguration = new YarnConfiguration();
var yarnConfiguration = new Configuration(false);
yarnConfiguration.addResource(new Path(hadoopConfDir, "core-site.xml"));
yarnConfiguration.addResource(new Path(hadoopConfDir, "yarn-site.xml"));
if (yarnProperties.getKerberosKeytab() != null && yarnProperties.getKerberosPrincipal() != null) {
Expand Down

0 comments on commit a12c7b1

Please sign in to comment.