AmazonS3ClientBuilder вызывает исключение из контейнера-запуска в qubole hadoop
Рассмотрим следующее
public class myMapper extends Mapper<Object, Text, Text, Text> {
static {
try {
AWSCredentials credentials = new BasicAWSCredentials(
"my_access_key",
"my_secret_key"
);
AmazonS3 s3client = AmazonS3ClientBuilder
.standard()
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.withRegion(Regions.US_EAST_1)
.build();
} catch(Exception e) {
System.out.println("catch" + e);
}
}
public void map(Object key, Text value, Context context
) throws IOException, InterruptedException {
}
}
По какой-то причине эта строка
AmazonS3 s3client = AmazonS3ClientBuilder
.standard()
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.withRegion(Regions.US_EAST_1)
.build();
заставляет hadoop выдавать ошибку и выводить
Container id: container_id
Exit code: 1
Stack trace: ExitCodeException exitCode=1:
at org.apache.hadoop.util.Shell.runCommand(Shell.java:554)
at org.apache.hadoop.util.Shell.run(Shell.java:469)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:741)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:310)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Container exited with a non-zero exit code 1
Failing this attempt. Failing the application.
Приведенный выше код отлично работает на местном. Не уверен, почему происходит ошибка, но я пытаюсь добиться того, чтобы мне нужно было извлекать статическую карту из s3 каждый раз, когда картографом является init.
Есть ли способ загрузить статическую карту из s3 в Hadoop Qubole для каждого картографа?