This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install presto-cli | |
cd /usr/lib/ | |
sudo wget https://repo1.maven.org/maven2/io/prestosql/presto-cli/325/presto-cli-325-executable.jar | |
sudo mv presto-cli-325-executable.jar /usr/bin/presto | |
sudo chmod 0755 /usr/bin/presto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@presto-coordinator ~]$ presto | |
presto> create schema hive.test_db; | |
presto> CREATE TABLE hive.test_db.lineitem ( | |
orderkey bigint NOT NULL, | |
partkey bigint NOT NULL, | |
suppkey bigint NOT NULL, | |
linenumber integer NOT NULL, | |
quantity double NOT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum makecache fast | |
sudo yum install -y gdisk cloud-utils-growpart | |
sudo yum install -y cloud-init | |
sudo sed -i 's/Provisioning.Enabled=y/Provisioning.Enabled=n/g' /etc/waagent.conf | |
sudo sed -i 's/Provisioning.UseCloudInit=n/Provisioning.UseCloudInit=y/g' /etc/waagent.conf | |
sudo sed -i 's/ResourceDisk.Format=y/ResourceDisk.Format=n/g' /etc/waagent.conf | |
sudo sed -i 's/ResourceDisk.EnableSwap=y/ResourceDisk.EnableSwap=n/g' /etc/waagent.conf | |
sudo cloud-init clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
runcmd: | |
- sudo UUID=`uuidgen` | |
- sudo nodeId=`grep node.id= /usr/lib/presto/etc/node.properties` | |
- sudo sed -i "s|$nodeId|node.id=$UUID|" /usr/lib/presto/etc/node.properties | |
- /usr/lib/presto/bin/launcher start | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connector.name=hive-hadoop2 | |
hive.metastore.uri=thrift://<metastore-vm>:9083 | |
hive.config.resources=<location for azure-site.xml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<property> | |
<name>dfs.adls.oauth2.access.token.provider.type</name> | |
<value>ClientCredential</value> | |
</property> | |
<property> | |
<name>dfs.adls.oauth2.refresh.url</name> | |
<value>{Oauth2.0-endpoint}</value> | |
</property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ImageName="presto-worker-image" | |
ScalesetName="presto-worker-scaleset" | |
ScalesetProfileName="presto-worker-scaleset-autoscale-profile" | |
AdminPassword="PasswordOfYourChoice" | |
ResourceGroupName="PrestoResourceGroup" | |
Subscription="Azure-Subscription-Name" | |
Location="eastus" | |
MIN_COUNT=2 | |
MAX_COUNT=10 | |
NsgName="presto-nsg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# De-allocate and generalize the VMs in order to create an image. | |
# A VM that has been generalized can no longer be restarted. | |
ResourceGroupName="PrestoResourceGroup" | |
WorkerName="presto-worker-vm" | |
ImageName="presto-worker-image" | |
Subscription="Azure-Subscription-Name" | |
az vm deallocate \ | |
--subscription $Subscription \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install wget | |
sudo yum install -y wget | |
# Setup Presto | |
sudo mkdir -m757 -p /var/presto/data | |
cd /usr/lib/ | |
sudo wget https://repo1.maven.org/maven2/io/prestosql/presto-server/325/presto-server-325.tar.gz | |
sudo tar xvzf presto-server-325.tar.gz | |
sudo mv presto-server-325 presto | |
sudo rm presto-server-325.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install wget | |
sudo yum install -y wget | |
# Setup Presto | |
sudo mkdir -m757 -p /var/presto/data | |
cd /usr/lib/ | |
sudo wget https://repo1.maven.org/maven2/io/prestosql/presto-server/325/presto-server-325.tar.gz | |
sudo tar xvzf presto-server-325.tar.gz | |
sudo mv presto-server-325 presto | |
sudo rm presto-server-325.tar.gz |
NewerOlder