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 -y install java | |
wget https://download.dremio.com/community-server/2.1.6-201809161906440178-edb5b4d/dremio-community-2.1.6-201809161906440178_edb5b4d_1.noarch.rpm | |
sudo yum -y install dremio-community-2.1.6-201809161906440178_edb5b4d_1.noarch.rpm |
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
# Create a GKE cluster. Replace the options as necessary. Use Google Cloud Shell for easy deployment. Preemtible instances lowers the cost by a lot and ideal for testing. | |
gcloud beta container --project "naren-dremio" clusters create "dremio" --zone "us-east1-b" --username "admin" --cluster-version "1.9.7-gke.6" --machine-type "n1-standard-4" --image-type "COS" --disk-type "pd-standard" --disk-size "100" --scopes "https://www.googleapis.com/auth/cloud-platform" --num-nodes "2" --enable-cloud-logging --enable-cloud-monitoring --network "projects/naren-dremio/global/networks/default" --subnetwork "projects/naren-dremio/regions/us-east1/subnetworks/default" --addons HorizontalPodAutoscaling,HttpLoadBalancing,KubernetesDashboard --no-enable-autoupgrade --enable-autorepair --preemptible | |
# Get credentials for the cluster | |
gcloud container clusters get-credentials dremio --zone=us-east1-b | |
# Install helm | |
wget https://storage.googleapis.com/kubernetes-helm/helm-v2.11.0-linux-amd64.tar.gz | |
tar xvf helm-v2.11.0-linux-am |
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 azure cli and login | |
brew update && brew install azure-cli | |
az login | |
# Create a k8 cluster and configure it in local kubectl | |
az aks get-credentials --resource-group cloud-shell-storage-eastus --name dremio | |
# Open up the k8 dashboard | |
az aks browse --resource-group cloud-shell-storage-eastus --name dremio |
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
/ Generate some random computer statistics (cpu usage only) | |
/ You can modify n (number of unique computers), timerange (how long the data is for) | |
/ freq (how often a computer publishes a statistic) and calls (the number of logged calls) | |
n:1000; timerange:5D; freq:0D00:01; calls:3000; | |
depts:`finance`packing`logistics`management`hoopjumping`trading`telesales; startcpu:(til n)!25+n?20; fcn:n*fc:`long$timerange%freq; | |
computer:([]time:(-0D00:00:10 + fcn?0D00:00:20)+fcn#(.z.p - timerange)+freq*til fc; id:raze fc#'key startcpu) | |
computer:update `g#id from `time xasc update cpu:{100&3|startcpu[first x]+sums(count x)?-2 -1 -1 0 0 1 1 2}[id] by id from computer | |
/ And generate some random logged calls |
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
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB/QAAAZ2CAYAAAC1vJ6UAAAMTGlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSSWiBCEgJvYlSBAJICaFFEJAq2AhJIKHEmBBE7MqyCq5dREBd0VURRdcCyFpR17oIdtfyUBaVlXWxYEPlTQqs637vve+d75t7/5w55z8lc++dAUCvhi+T5aH6AORLC+QJkaGsSWnpLFIXwAEdUAEb0PgChYwTHx8DoAzd/y5vbgJEdb/mpuL65/x/FQOhSCEAAImHOFOoEORDfAgAvEQgkxcAQGRDve2sApkKT4HYSA4ThFimwtkaXKLCmRpcqbZJSuBCvAcAMo3Pl2cDoNsM9axCQTbk0b0NsbtUKJECoEeGOEgg5gshjoJ4VH7+DBWGdsAp8wue7L9xZg5z8vnZw1hTi1rIYRKFLI8/+/9sx/+W/DzlUAwHOGhieVSCqmbYt9u5M6JVmAZxrzQzNg5iQ4jfSYRqe4hRqlgZlayxR80FCi7sGWBC7C7kh0VDbA5xhDQvNkarz8ySRPAghisELZIU8JK0vktFivBELWeNfEZC3BDOknM5Wt8GvlwdV2V/RpmbzNHy3xaLeEP8r4vFSamanDFqoSQlFmJdiJmK3MRojQ1mVyzmxg7ZyJUJqvztIPYXSSNDNfzYtCx5RILWXp6vGKoXWyqW8GK1uKpAnBSl5dkj4KvzN4G4WSTlJA/xiBSTYoZqEYrCwjW1Y+0iabK2XqxTVhCaoPV9KcuL19rjVFFepEpvA7G5ojBR64sHFcAFqeHHY2UF8UmaPPHMHP74eE0+eBGIAVwQBlhACUcmmAFygKStt6kX/tLMRAA+kINsIAJuWs2QR6p6RgqviaAY/AGRCCiG/ULVsyJQCPWfhrWaqxvIUs8Wqj1ywWOI80E0yIO/lWov6XC0FPAb1Ej+EV0Ac82DQzX3Tx0HamK0GuUQL0tvyJIYTgwjRhEjiM64GR6EB+Ax8BoChy |
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
FROM dremio/dremio-oss:4.1.8 | |
USER root | |
WORKDIR /opt/dremio/jars | |
# Add the plugin jar, you can also copy it from a local directory with COPY or ADD command | |
RUN wget https://<location of jar>.jar && \ | |
chown dremio <plugin>.jar |
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
// Requires JDK 1.8 | |
// Run it with: | |
// javac Main.java && java -cp .:dremio-jdbc-driver-4.2.1-202004111451200819-0c3ecaea.jar Main | |
import java.sql.*; | |
import java.util.Properties; | |
public class Main { | |
public static void main(String[] args) { | |
final String DB_URL = "jdbc:dremio:direct=localhost:31010;"; |
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
''' | |
The following script is intended to provide examples to use Dremio's REST API. | |
Please refer to the documentation for more information: https://docs.dremio.com/rest-api/ | |
Required library: requests | |
Python version: 3.7.2 | |
''' | |
import requests, time |
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
%scala | |
Class.forName("com.dremio.jdbc.Driver") | |
val jdbcPort = 31010 | |
val jdbcDatabase = "DREMIO" | |
val user = "" | |
val password = "" | |
val tbl = "postgres.public.actor" | |
// Create the JDBC URL without passing in the user and password parameters. |
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
jdbcPort = 31010 | |
jdbcDatabase = "DREMIO" | |
jdbcUsername = "" | |
jdbcPassword = "" | |
jdbcUrl = "jdbc:dremio:direct=<host>:31010" | |
connectionProperties = { | |
"user" : jdbcUsername, | |
"password" : jdbcPassword, | |
"driver" : "com.dremio.jdbc.Driver" |
OlderNewer