Uploading Files to Cloud Storage for Dataproc

PCD By islever Editorial Last updated

Storing and accessing data.

Short answer

A Use the gsutil cp command to upload local files to a Google Cloud Storage bucket for consumption by Dataproc.

Question

You want to upload files from an on-premises virtual machine to Google Cloud Storage as part of a data migration. These files will be consumed by Cloud
DataProc Hadoop cluster in a GCP environment.
Which command should you use?
  1. gsutil cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/ Correct Answer
  2. gcloud cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/
  3. hadoop fs cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/
  4. gcloud dataproc cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/

Key Takeaways

Tests the distinction between Cloud Storage CLI tools (gsutil/gcloud storage) and invalid or cluster-specific commands (hadoop fs, gcloud dataproc).

Identifies the correct command to upload local files to Google Cloud Storage for a Dataproc migration. The gsutil cp command is the standard tool for local-to-GCS file transfers.

Common mistake: Choosing B because of familiarity with gcloud, but gcloud cp is invalid; the newer equivalent is gcloud storage cp, not gcloud cp.

Expert Analysis

Cloud Storage vs. Hadoop CLI Boundary The core of this question tests the boundary between general-purpose Cloud Storage transfer tools and Hadoop/Dataproc-specific commands. The task is explicitly to upload files from an on-premises VM to Cloud Storage, not to move data within a Hadoop cluster. Therefore, the command must be a Cloud Storage CLI tool, not a Hadoop command.

Evaluating the Options Option A uses gsutil cp, which is the established command-line tool for interacting with Google Cloud Storage. It handles local-to-cloud uploads efficiently. Option C uses hadoop fs cp, which is meant for HDFS operations within a Hadoop cluster, not direct local-to-cloud uploads from a standard VM. Option D uses gcloud dataproc cp, which is a non-existent command. Option B uses gcloud cp, which is also invalid. As noted in community feedback, Google has introduced gcloud storage cp as a modern alternative to gsutil, but gcloud cp by itself does not exist. Thus, Option A is the only syntactically and functionally correct choice.

The Dataproc Distraction The mention of Dataproc is a distractor designed to lure candidates toward Hadoop-specific commands (Option C) or Dataproc-specific commands (Option D). Dataproc natively uses Cloud Storage (via the GCS connector) instead of HDFS, meaning data must land in Cloud Storage first before the cluster can consume it. The upload step from on-premises relies entirely on Cloud Storage tooling.

Official Reference

Exam Strategy

When asked to transfer files to or from Google Cloud Storage, immediately look for gsutil or gcloud storage commands. Be wary of gcloud cp as it is an invalid command. If the destination prefix is gs://, it is a Cloud Storage operation, ruling out hadoop fs commands which require a Hadoop environment.

Community Votes

A
90%
B
10%

90% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 31 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 30 of 31

  1. i896ii 👍 5
    Took the exam 2 weeks and got pass, however, NOT A SINGLE question is from here! Although it is still good for practice purpose, DO NOT just remember these questions to take the exam. -- My comment above is still waiting approval after two weeks, it seems someone doesn't want it to be published.
  2. Jigglypuff09 👍 3 Answered B
    Anyone took exam recently, what percent of questions came from a public community thread?
  3. syu31svc 👍 3
    Cloud Storage is the key here so answer is A
  4. mobius_z 👍 2
    Took the exam two days ago, only 4 of the questions from this set appeared in the actual exam, remaining 56 were new questions. Even after the June 2nd update, I don't see any of the new questions here.
  5. SuperDevops 👍 2
    The exam is totally different from the one presented in the dump, it proves TOTALLY DIFFERENT. Please update the questions with the original exam!!
Show 25 more comments
  1. mlyu 👍 2
    Ans:A https://cloud.google.com/storage/docs/uploading-objects
  2. Daywa1k3r 👍 2
    There was a lot of GKE especially with istio.
  3. runrajarun 👍 2
    any possibility to have all DevOps questions?
  4. 1234567J 👍 2
    why do you lie
  5. JuanitoNN 👍 1
    You are running an application on Compute Engine and collecting logs through Stackdriver. You discover that some personally identifiable information (Pll) is leaking into certain log entry fields. All Pll entries begin with the text userinfo. You want to capture these log entries in a secure location for later review and prevent them from leaking to Stackdriver Logging. What should you do? "A. Create a basic log filter matching userinfo, and then configure a log export in the Stackdriver console with Cloud Storage as a sink. B. Use a Fluentd filter plugin with the Stackdriver Agent to remove log entries containing userinfo, and then copy the entries to a Cloud Storage bucket. C. Create an advanced log filter matching userinfo, configure a log export in the Stackdriver console with Cloud Storage as a sink, and then configure a tog exclusion with userinfo as a filter. D. Use a Fluentd filter plugin with the Stackdriver Agent to remove log entries containing userinfo, create an advanced log filter matching userinfo, and then configure a log export in the Stackdriver console with Cloud Storage as a sink."
  6. JuanitoNN 👍 1
    Your product is currently deployed in three Google Cloud Platform (GCP) zones with your users divided between the zones. You can fail over from one zone to another, but it causes a 10-minute service disruption for the affected users. You typically experience a database failure once per quarter and can detect it within five minutes. You are cataloging the reliability risks of a new real-time chat feature for your product. You catalog the following information for each risk. The chat feature requires a new database system that takes twice as long to successfully fail over between zones. You want to account for the risk of the new database failing in one zone. What would be the values for the risk of database failover with the new system? A. MTTD: 5 MTTR: 10 MTBF: 90 Impact: 33% B. MTTD:5 MTTR: 20 MTBF: 90 Impact: 33% C. MTTD:5 MTTR: 10 MTBF: 90 Impact 50% D. MTTD:5 MTTR: 20 MTBF: 90 Impact: 50%
  7. Hila_Sh 👍 1 Answered A
    A. gsutil cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/ gsutil is the correct tool because: It's the dedicated command-line tool for Google Cloud Storage operations Specifically designed for file and bucket management in GCS Supports efficient file transfer between local systems and Cloud Storage Provides reliable upload capabilities with automatic retry mechanisms The command structure: gsutil cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/ cp: Copy command [LOCAL_OBJECT]: Source file path gs://: Protocol identifier for Google Cloud Storage [DESTINATION_BUCKET_NAME]: Target bucket name
  8. runrajarun 👍 1
    Q. Devops You support the backend of a mobile phone game that runs on a Google Kubernetes Engine (GKE) cluster. The application is serving HTTP requests from users. You need to implement a solution that will reduce the network cost. What should you do? "A. Configure the VPC as a Shared VPC Host project. B. Configure your network services on the Standard Tier. C. Configure your Kubernetes cluster as a Private Cluster. D. Configure a Google Cloud HTTP Load Balancer as Ingress." ans : B
  9. JuanitoNN 👍 1
    Q. Devops You support the backend of a mobile phone game that runs on a Google Kubernetes Engine (GKE) cluster. The application is serving HTTP requests from users. You need to implement a solution that will reduce the network cost. What should you do? "A. Configure the VPC as a Shared VPC Host project. B. Configure your network services on the Standard Tier. C. Configure your Kubernetes cluster as a Private Cluster. D. Configure a Google Cloud HTTP Load Balancer as Ingress."
  10. www_certifiedumps_com_google 👍 1 Answered A
    A. gsutil cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/ This command is used to copy files from local storage to Google Cloud Storage. It’s the correct option for uploading data as part of a migration process that will be consumed by Cloud Dataproc.
  11. InsaneKelso 👍 1 Answered A
    A is the only valid option, however if B had contained the component storage (gcloud storage cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/) then it would have been the correct choice seeing how gsutil is considered legacy
  12. Edgar0123 👍 1
    As updates to the Google Cloud SDK, the gcloud tool now includes a storage command group that allows you to interact with Google Cloud Storage (GCS) similarly to how you would with gsutil command
  13. wanrltw 👍 1 Answered A
    Answer: A Cloud Storage => gsutil. Doesn't matter how the files are going to be consumed, the task is to upload them.
  14. runrajarun 👍 1
    Standard tier is less cost compared to http load balance ingress and kubernates cluster.
  15. atoledo 👍 1 Answered A
    gsutil cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/
  16. looseboy 👍 1
    My comment is still waiting approval too.
  17. chithra1990 👍 1
    is this question set updated ?
  18. yuchun 👍 1
    cloud storage command: gsutil
  19. JuanitoNN 👍 1
    Hello, why is b, any reason?
  20. blackshuai 👍 1
    A is correct answer
  21. __rajan__ 👍 1 Answered A
    I would go with A.
  22. ds0312 👍 1
    Correct answer - A
  23. TNT87 👍 1
    B is the answer
  24. Nandak217 👍 1
    A is correct
  25. sanjay8055 👍 1 Answered A
    Answer is A

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PCD Questions

Access 84 questions with complete answers and detailed explanations.

View Full PCD Practice Test →

← Back to PCD Study Guide