hongbo-miao/hongbomiao.com

View on GitHub
cloud-platform/aws/amazon-emr/hm-amazon-emr-cluster-trino/Makefile

Summary

Maintainability
Test Coverage
# Amazon EMR - Trino
trino-status:
    sudo systemctl status trino-server
trino-start:
    sudo systemctl start trino-server
trino-stop:
    sudo systemctl stop trino-server

trino-show-jvm-config:
    cat /etc/trino/conf/jvm.config
trino-show-trino-config:
    sudo cat /etc/trino/conf/config.properties
trino-show-trino-config-node:
    cat /etc/trino/conf/node.properties
trino-show-trino-config-catalog:
    cat /etc/trino/conf.dist/catalog/delta.properties
    cat /etc/trino/conf.dist/catalog/hive.properties
    cat /etc/trino/conf.dist/catalog/postgresql.properties

trino-web-ui:
    curl localhost:8889/ui/login.html
trino-check-health:
    curl localhost:8889/v1/status
trino-show-service-log:
    sudo journalctl --unit=trino-server.service --lines=60 --no-pager

trino-execute:
    trino-cli \
        --server=localhost:8889 \
        --execute='select * from delta.hm_iot_delta_db.motor;'
    trino-cli \
        --server=localhost:8889 \
        --execute='show catalogs;'
    trino-cli \
        --server=localhost:8889 \
        --catalog=delta \
        --execute='show schemas;'
    trino-cli \
        --server=localhost:8889 \
        --catalog=delta \
        --schema=hm_iot_delta_db \
        --execute='show tables;'

# Amazon EMR - Hive
hive:
    hive
hive-show-hive-site:
    cat /etc/hive/conf/hive-site.xml