
Explanation:
The correct command to upload files from an on-premises VM to Google Cloud Storage (GCS) is gsutil cp, as gsutil is the dedicated CLI tool for interacting with GCS. Option A uses gsutil, which is designed for this purpose. Option B (gcloud cp) is invalid because gcloud does not handle GCS file operations. Option C (hadoop fs cp) would require Hadoop and GCS connectors configured on the on-prem VM, which is not standard for this scenario. Option D (gcloud dataproc cp) is incorrect as gcloud dataproc commands manage clusters, not file transfers. Thus, the correct answer is A.
You need to transfer files from an on-premises virtual machine to Google Cloud Storage for consumption by a Cloud Dataproc Hadoop cluster in GCP. What is the appropriate command to use for this upload?
A
gsutil cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/
B
gcloud cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/
C
hadoop fs cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/
D
gcloud dataproc cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/
No comments yet.