mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-13 16:37:00 +00:00
gcloud: Wed Sep 28 10:27:48 UTC 2022
This commit is contained in:
parent
29683b8af4
commit
ffb9e43995
198 changed files with 4783 additions and 367 deletions
|
|
@ -65,7 +65,7 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To create a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters create my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters create my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to create. The arguments in
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To delete a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters delete my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters delete my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to delete. The arguments in
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To view the details of a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters describe my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters describe my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to describe. The arguments in
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To diagnose a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters diagnose my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters diagnose my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to diagnose. The arguments in
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To export a cluster to a YAML file, run:
|
||||
|
||||
$ gcloud dataproc clusters export my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters export my-cluster --region=us-central1 \
|
||||
--destination=cluster.yaml
|
||||
|
||||
To export a cluster to standard output, run:
|
||||
|
||||
$ gcloud dataproc clusters export my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters export my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to export. The arguments in
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To create a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters create my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters create my-cluster --region=us-central1
|
||||
|
||||
To resize a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters update my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters update my-cluster --region=us-central1 \
|
||||
--num_workers 5
|
||||
|
||||
To delete a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters delete my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters delete my-cluster --region=us-central1
|
||||
|
||||
To view the details of a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters describe my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters describe my-cluster --region=us-central1
|
||||
|
||||
To see the list of all clusters, run:
|
||||
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To import a cluster from a YAML file, run:
|
||||
|
||||
$ gcloud dataproc clusters import my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters import my-cluster --region=us-central1 \
|
||||
--source=cluster.yaml
|
||||
|
||||
To import a cluster from standard output, run:
|
||||
|
||||
$ gcloud dataproc clusters import my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters import my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to import. The arguments in
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To start a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters start my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters start my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to start. The arguments in this
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To stop a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters stop my_cluster --region=us-central1
|
||||
$ gcloud dataproc clusters stop my-cluster --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Cluster resource - The name of the cluster to stop. The arguments in this
|
||||
|
|
|
|||
|
|
@ -18,27 +18,27 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To resize a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters update my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters update my-cluster --region=us-central1 \
|
||||
--num-workers=5
|
||||
|
||||
To change the number preemptible workers in a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters update my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters update my-cluster --region=us-central1 \
|
||||
--num-preemptible-workers=5
|
||||
|
||||
To add the label 'customer=acme' to a cluster, run:
|
||||
|
||||
$ gcloud dataproc clusters update my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters update my-cluster --region=us-central1 \
|
||||
--update-labels=customer=acme
|
||||
|
||||
To update the label 'customer=ackme' to 'customer=acme', run:
|
||||
|
||||
$ gcloud dataproc clusters update my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters update my-cluster --region=us-central1 \
|
||||
--update-labels=customer=acme
|
||||
|
||||
To remove the label whose key is 'customer', run:
|
||||
|
||||
$ gcloud dataproc clusters update my_cluster --region=us-central1 \
|
||||
$ gcloud dataproc clusters update my-cluster --region=us-central1 \
|
||||
--remove-labels=customer
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
|
|
|
|||
|
|
@ -18,18 +18,18 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a Hadoop job that runs the main class of a jar, run:
|
||||
|
||||
$ gcloud dataproc jobs submit hadoop --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit hadoop --cluster=my-cluster \
|
||||
--jar=my_jar.jar -- arg1 arg2
|
||||
|
||||
To submit a Hadoop job that runs a specific class of a jar, run:
|
||||
|
||||
$ gcloud dataproc jobs submit hadoop --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit hadoop --cluster=my-cluster \
|
||||
--class=org.my.main.Class --jars=my_jar1.jar,my_jar2.jar \
|
||||
-- arg1 arg2
|
||||
|
||||
To submit a Hadoop job that runs a jar that is already on the cluster, run:
|
||||
|
||||
$ gcloud dataproc jobs submit hadoop --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit hadoop --cluster=my-cluster \
|
||||
--jar=file:///usr/lib/hadoop-op/hadoop-op-examples.jar \
|
||||
-- wordcount gs://my_bucket/my_file.txt gs://my_bucket/output
|
||||
|
||||
|
|
|
|||
|
|
@ -11,32 +11,32 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a Hadoop MapReduce job, run:
|
||||
|
||||
$ gcloud dataproc jobs submit hadoop --cluster my_cluster \
|
||||
$ gcloud dataproc jobs submit hadoop --cluster my-cluster \
|
||||
--jar my_jar.jar -- arg1 arg2
|
||||
|
||||
To submit a Spark Scala or Java job, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark --cluster my_cluster \
|
||||
$ gcloud dataproc jobs submit spark --cluster my-cluster \
|
||||
--jar my_jar.jar -- arg1 arg2
|
||||
|
||||
To submit a PySpark job, run:
|
||||
|
||||
$ gcloud dataproc jobs submit pyspark --cluster my_cluster \
|
||||
$ gcloud dataproc jobs submit pyspark --cluster my-cluster \
|
||||
my_script.py -- arg1 arg2
|
||||
|
||||
To submit a Spark SQL job, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark-sql --cluster my_cluster \
|
||||
$ gcloud dataproc jobs submit spark-sql --cluster my-cluster \
|
||||
--file my_queries.q
|
||||
|
||||
To submit a Pig job, run:
|
||||
|
||||
$ gcloud dataproc jobs submit pig --cluster my_cluster \
|
||||
$ gcloud dataproc jobs submit pig --cluster my-cluster \
|
||||
--file my_script.pig
|
||||
|
||||
To submit a Hive job, run:
|
||||
|
||||
$ gcloud dataproc jobs submit hive --cluster my_cluster \
|
||||
$ gcloud dataproc jobs submit hive --cluster my-cluster \
|
||||
--file my_queries.q
|
||||
|
||||
FLAGS
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a Hive job with a local script, run:
|
||||
|
||||
$ gcloud dataproc jobs submit hive --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit hive --cluster=my-cluster \
|
||||
--file=my_queries.q
|
||||
|
||||
To submit a Hive job with inline queries, run:
|
||||
|
||||
$ gcloud dataproc jobs submit hive --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit hive --cluster=my-cluster \
|
||||
-e="CREATE EXTERNAL TABLE foo(bar int) LOCATION \
|
||||
'gs://my_bucket/'" -e="SELECT * FROM foo WHERE bar > 2"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a Pig job with a local script, run:
|
||||
|
||||
$ gcloud dataproc jobs submit pig --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit pig --cluster=my-cluster \
|
||||
--file=my_queries.pig
|
||||
|
||||
To submit a Pig job with inline queries, run:
|
||||
|
||||
$ gcloud dataproc jobs submit pig --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit pig --cluster=my-cluster \
|
||||
-e="LNS = LOAD 'gs://my_bucket/my_file.txt' AS (line)" \
|
||||
-e="WORDS = FOREACH LNS GENERATE FLATTEN(TOKENIZE(line)) AS \
|
||||
word" -e="GROUPS = GROUP WORDS BY word" \
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a Presto job with a local script, run:
|
||||
|
||||
$ gcloud dataproc jobs submit presto --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit presto --cluster=my-cluster \
|
||||
--file=my_script.R
|
||||
|
||||
To submit a Presto job with inline queries, run:
|
||||
|
||||
$ gcloud dataproc jobs submit presto --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit presto --cluster=my-cluster \
|
||||
-e="SELECT * FROM foo WHERE bar > 2"
|
||||
|
||||
REQUIRED FLAGS
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a PySpark job with a local script and custom flags, run:
|
||||
|
||||
$ gcloud dataproc jobs submit pyspark --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit pyspark --cluster=my-cluster \
|
||||
my_script.py -- --custom-flag
|
||||
|
||||
To submit a Spark job that runs a script that is already on the cluster,
|
||||
run:
|
||||
|
||||
$ gcloud dataproc jobs submit pyspark --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit pyspark --cluster=my-cluster \
|
||||
file:///usr/lib/spark/examples/src/main/python/pi.py -- 100
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
|
|
|
|||
|
|
@ -18,18 +18,18 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a Spark job that runs the main class of a jar, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit spark --cluster=my-cluster \
|
||||
--region=us-central1 --jar=my_jar.jar -- arg1 arg2
|
||||
|
||||
To submit a Spark job that runs a specific class of a jar, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit spark --cluster=my-cluster \
|
||||
--region=us-central1 --class=org.my.main.Class \
|
||||
--jars=my_jar1.jar,my_jar2.jar -- arg1 arg2
|
||||
|
||||
To submit a Spark job that runs a jar that is already on the cluster, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit spark --cluster=my-cluster \
|
||||
--region=us-central1 --class=org.apache.spark.examples.SparkPi \
|
||||
--jars=file:///usr/lib/spark/examples/jars/spark-examples.jar \
|
||||
-- 1000
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a SparkR job with a local script, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark-r --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit spark-r --cluster=my-cluster \
|
||||
my_script.R
|
||||
|
||||
To submit a Spark job that runs a script already on the cluster, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark-r --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit spark-r --cluster=my-cluster \
|
||||
file:///.../my_script.R -- gs://my_bucket/data.csv
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ DESCRIPTION
|
|||
EXAMPLES
|
||||
To submit a Spark SQL job with a local script, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark-sql --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit spark-sql --cluster=my-cluster \
|
||||
--file=my_queries.ql
|
||||
|
||||
To submit a Spark SQL job with inline queries, run:
|
||||
|
||||
$ gcloud dataproc jobs submit spark-sql --cluster=my_cluster \
|
||||
$ gcloud dataproc jobs submit spark-sql --cluster=my-cluster \
|
||||
-e="CREATE EXTERNAL TABLE foo(bar int) LOCATION \
|
||||
'gs://my_bucket/'" -e="SELECT * FROM foo WHERE bar > 2"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue