Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presto BA can't process --binary option since presto-cli binary is also needed in the support.elasticmapreduce bucket #90

Closed
achiku opened this issue Apr 26, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@achiku
Copy link

commented Apr 26, 2015

Summary

Presto BA can't properly process --binary option to install user compiled Presto binary since the script tries to download presto-cli-executable.jar in s3://support.elasticmapreduce/bootstrap-actions/presto/user-compiled/ if --binary option is specified.

Environment

  • AMI 3.5.0
  • Hive latest
  • EMR cluster is in public subnet
  • EMR cluster has default EMR_DefaultRole
  • EC2 instances have default EMR_EC2_DefaultRole

Command

aws emr create-cluster --ami-version 3.5.0 \
    --name "(AMI 3.5.0 Hive + Presto)" \
    --service-role EMR_DefaultRole \
    --tags Name=production-emr environment=production \
    --ec2-attributes KeyName=[key-name],InstanceProfile=EMR_EC2_DefaultRole,SubnetId=[public-subnet] \
    --applications Name=hive \
    --instance-groups \
        InstanceGroupType=MASTER,InstanceCount=1,InstanceType=r3.xlarge\
        InstanceGroupType=CORE,InstanceCount=2,InstanceType=r3.xlarge\
    --bootstrap-action \
        Name="install Presto",Path="s3://mybucket/libs/install-presto.rb",Args="[-p,8989,-m,10240,-n,10240,-b,s3://mybucket/libs/presto-server-0.100.tar.gz]",\
        Name="Install Hive Site Configuration",Path="s3://elasticmapreduce/libs/hive/hive-script",Args=["--base-path","s3://elasticmapreduce/libs/hive","--install-hive-site","--hive-site=s3://mybucket/libs/hive-site.xml"] \
    --log-uri "s3://mybucket/logs/" \
    --no-auto-terminate \
    --visible-to-all-users

Fix?

I think previous version of BA has an option to specify CLI binary path, and if you are ok with adding that option, I will send p-r for this. Any idea?

https://github.com/awslabs/emr-bootstrap-actions/blob/master/presto/latest/install-presto#L349-L360

Execution Log

2015-04-26T05:13:05.102Z INFO Fetching file 's3://mybucket/libs/install-presto.rb'
2015-04-26T05:13:06.071Z INFO startExec '/mnt/var/lib/bootstrap-actions/1/install-presto.rb -p 8989 -m 10240 -n 10240 -b s3://mybucket/libs/presto-server-0.100.tar.gz '
2015-04-26T05:13:06.076Z INFO Environment:
  TERM=linux
  HADOOP_PREFIX=/home/hadoop
  CONSOLETYPE=serial
  JAVA_HOME=/usr/java/latest
  PIG_CONF_DIR=/home/hadoop/pig/conf
  HBASE_HOME=/home/hadoop/hbase
  HADOOP_YARN_HOME=/home/hadoop
  HIVE_HOME=/home/hadoop/hive
  YARN_HOME=/home/hadoop
  MAIL=/var/spool/mail/hadoop
  IMPALA_CONF_DIR=/home/hadoop/impala/conf
  PWD=/
  HOSTNAME=ip-10-0-0-236.ap-northeast-1.compute.internal
  LESS_TERMCAP_mb=[01;31m
  LESS_TERMCAP_me=[0m
  NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
  LESS_TERMCAP_md=[01;38;5;208m
  AWS_AUTO_SCALING_HOME=/opt/aws/apitools/as
  HISTSIZE=1000
  HADOOP_COMMON_HOME=/home/hadoop
  PATH=/home/hadoop/pig/bin:/usr/local/cuda/bin:/usr/java/latest/bin:/home/hadoop/bin:/home/hadoop/mahout/bin:/home/hadoop/hive/bin:/home/hadoop/hbase/bin:/home/hadoop/impala/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/opt/aws/bin:/home/hadoop/cascading/tools/multitool-20140224/bin:/home/hadoop/cascading/tools/load-20140223/bin:/home/hadoop/cascading/tools/lingual-client/bin:/home/hadoop/cascading/driven/bin
  HIVE_CONF_DIR=/home/hadoop/hive/conf
  AWS_DEFAULT_REGION=ap-northeast-1
  HADOOP_CONF_DIR=/home/hadoop/conf
  IMPALA_HOME=/home/hadoop/impala
  SHLVL=5
  LANGSH_SOURCED=1
  XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
  AWS_CLOUDWATCH_HOME=/opt/aws/apitools/mon
  UPSTART_JOB=rc
  HADOOP_HOME_WARN_SUPPRESS=true
  EC2_AMITOOL_HOME=/opt/aws/amitools/ec2
  AWS_RDS_HOME=/opt/aws/apitools/rds
  PIG_CLASSPATH=/home/hadoop/pig/lib
  LESS_TERMCAP_se=[0m
  MAHOUT_CONF_DIR=/home/hadoop/mahout/conf
  LOGNAME=hadoop
  UPSTART_INSTANCE=
  HBASE_CONF_DIR=/home/hadoop/hbase/conf
  YARN_CONF_DIR=/home/hadoop/conf
  AWS_PATH=/opt/aws
  _=/usr/java/latest/bin/java
  HADOOP_HOME=/home/hadoop
  runlevel=3
  LD_LIBRARY_PATH=/home/hadoop/lib/native:/usr/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib:
  UPSTART_EVENTS=runlevel
  MAHOUT_LOG_DIR=/mnt/var/log/apps
  previous=N
  EC2_HOME=/opt/aws/apitools/ec2
  PIG_HOME=/home/hadoop/pig
  LESS_TERMCAP_ue=[0m
  AWS_ELB_HOME=/opt/aws/apitools/elb
  RUNLEVEL=3
  USER=hadoop
  RUBYOPT=rubygems
  PREVLEVEL=N
  HADOOP_HDFS_HOME=/home/hadoop
  HOME=/home/hadoop
  HISTCONTROL=ignoredups
  LESSOPEN=||/usr/bin/lesspipe.sh %s
  MAHOUT_HOME=/home/hadoop/mahout
  LANG=en_US.UTF-8
  LESS_TERMCAP_us=[04;38;5;111m
  HADOOP_MAPRED_HOME=/home/hadoop
2015-04-26T05:13:06.076Z INFO redirectOutput to /mnt/var/log/bootstrap-actions/1/stdout
2015-04-26T05:13:06.077Z INFO redirectError to /mnt/var/log/bootstrap-actions/1/stderr
2015-04-26T05:13:06.077Z INFO Working dir /mnt/var/lib/bootstrap-actions/1
2015-04-26T05:13:06.078Z INFO ProcessRunner started child process : /mnt/var/lib/bootstrap-actions/1/install-presto...
2015-04-26T05:13:06.078Z INFO Synchronously wait child process to complete : /mnt/var/lib/bootstrap-actions/1/install-presto...
2015-04-26T05:14:08.084Z INFO Process still running
2015-04-26T05:14:39.230Z INFO waitProcessCompletion ended with exit code 1 : /mnt/var/lib/bootstrap-actions/1/install-presto...
2015-04-26T05:14:39.230Z ERROR Execution failed with code '1'

Error Log

Warning: RPMDB altered outside of yum.
15/04/26 05:13:27 INFO fs.HadoopConfigurationAWSCredentialsProvider: Couldn't extract aws credentials from either uri s3://mybucket/libs/presto-server-0.100.tar.gz or hadoop configuration.
15/04/26 05:13:27 INFO fs.EmrFileSystem: Consistency disabled, using com.amazon.ws.emr.hadoop.fs.s3n.S3NativeFileSystem as filesystem implementation
15/04/26 05:13:29 INFO s3n.S3NativeFileSystem: Opening 's3://mybucket/libs/presto-server-0.100.tar.gz' for reading
15/04/26 05:14:09 INFO fs.HadoopConfigurationAWSCredentialsProvider: Couldn't extract aws credentials from either uri s3://support.elasticmapreduce/bootstrap-actions/presto/hadoop-lzo-0.4.19.jar or hadoop configuration.
15/04/26 05:14:09 INFO fs.EmrFileSystem: Consistency disabled, using com.amazon.ws.emr.hadoop.fs.s3n.S3NativeFileSystem as filesystem implementation
15/04/26 05:14:11 INFO s3n.S3NativeFileSystem: Opening 's3://support.elasticmapreduce/bootstrap-actions/presto/hadoop-lzo-0.4.19.jar' for reading
15/04/26 05:14:26 INFO fs.HadoopConfigurationAWSCredentialsProvider: Couldn't extract aws credentials from either uri s3://support.elasticmapreduce/bootstrap-actions/presto/user-compiled/presto-cli-executable.jar or hadoop configuration.
15/04/26 05:14:26 INFO fs.EmrFileSystem: Consistency disabled, using com.amazon.ws.emr.hadoop.fs.s3n.S3NativeFileSystem as filesystem implementation
get: `s3://support.elasticmapreduce/bootstrap-actions/presto/user-compiled/presto-cli-executable.jar': No such file or directory
/mnt/var/lib/bootstrap-actions/1/install-presto.rb:88:in `run': Command failed: /home/hadoop/bin/hdfs dfs -get s3://support.elasticmapreduce/bootstrap-actions/presto/user-compiled/presto-cli-executable.jar /tmp/presto-cli-executable.jar (RuntimeError)
    from /mnt/var/lib/bootstrap-actions/1/install-presto.rb:350

@achiku achiku closed this May 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.