reizist
reizist

Reputation: 126

How to fix not running presto plugin in AWS EMR

About

I'm trying to use presto plugin like wyukawa/presto-fluentd, it works on localhost(mac os x), but does not work on Amazon EMR.

Detail

on localhost

At first, I tried to work on localhost(mac os x) and just it works.

left: presto log, center: fluentd log, right: presto-cli

on EMR

Also I tried same on EC2 on EMR, but it did not work. That plugin is correctly loaded, event listener registered, so I feel strange.

I also tested by inserting print debugging code, but it looks like not loaded. How I should to work this plugin on EMR?

Thanks.

supplement

here is the fluentd configuration.

<source>
  @type forward
</source>

<match *.**>
  @type stdout
</match>

Upvotes: 1

Views: 975

Answers (1)

reizist
reizist

Reputation: 126

I resolved by my own.

Actually I have to locate event-listener.properties on /mnt/var/lib/presto/data/etc , so I did this:

$s3uri="s3://my-s3-bucket"

# make symbolic link
sudo mkdir /usr/lib/presto/etc
sudo ln -s /usr/lib/presto/etc /mnt/var/lib/presto/data

# download presto plugins
aws s3 sync $s3uri/jar/ /usr/lib/presto/plugin/
aws s3 sync $s3uri/properties/ /usr/lib/presto/etc/

# make sure all plugins are owned by presto user
chown -R presto:presto /usr/lib/presto/plugin
chown -R presto:presto /usr/lib/presto/etc


# restart presto
stop  presto-server
start presto-server

finally my dir is like below:

[hadoop@ip-172-31-21-25 presto]$ pwd
/usr/lib/presto
[hadoop@ip-172-31-21-25 presto]$ ls -alh
total 228K
drwxr-xr-x  7 root   root   4.0K Oct 19 06:52 .
dr-xr-xr-x 47 root   root   4.0K Oct 19 06:30 ..
drwxr-xr-x  3 presto presto 4.0K Oct 19 06:30 bin
drwxr-xr-x  3 presto presto 4.0K Oct 19 06:52 etc
drwxr-xr-x  2 presto presto  12K Oct 19 06:30 lib
-rw-r--r--  1 presto presto 188K Sep 22 22:54 NOTICE
drwxr-xr-x 24 presto presto 4.0K Oct 19 06:45 plugin
drwxr-xr-x  2 presto presto 4.0K Oct 19 06:30 presto-jdbc
-rw-r--r--  1 presto presto  119 Sep 22 22:54 README.txt

[hadoop@ip-172-31-21-25 etc]$ pwd
/usr/lib/presto/etc
[hadoop@ip-172-31-21-25 etc]$ ls
event-listener.properties

[hadoop@ip-172-31-21-25 plugin]$ pwd
/usr/lib/presto/plugin
[hadoop@ip-172-31-21-25 plugin]$ ls
accumulo   example-http  localfile  mysql           redis                    tpcds
atop       hive-hadoop2  memory     postgresql      resource-group-managers  tpch
blackhole  jmx           ml         presto-fluentd  sqlserver
cassandra  kafka         mongodb    presto-thrift   teradata-functions

and it works correctly.

Upvotes: 0

Related Questions