Skip to content

Commit a3d8e0a

Browse files
author
Shun Fan
committed
Update README.md and comments
1 parent c4542a5 commit a3d8e0a

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

cloud-storage/storage-transfer/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ This app creates two types of transfers using the Transfer Service tool.
77
1. Set up a project on Google Developers Console.
88
1. Go to the [Developers Console](https://cloud.google.com/console) and create or select your project.
99
You will need the project ID later.
10-
1. Add the Storage Transfer service account, cloud-mobility@system.gserviceaccount.com as an
10+
1. Within Developers Console, select APIs & auth > Credentials.
11+
1. Add a new JSON key credential for a service account.
12+
1. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to your JSON key.
13+
1. Add the Storage Transfer service account, cloud-mobility@system.gserviceaccount.com as an
1114
editor of your project.
1215
1. Set up gcloud for application default credentials.
1316
1. `gcloud components update`
1417
1. `gcloud auth login`
1518
1. `gcloud config set project PROJECT_ID`
16-
1. `export GOOGLE_APPLICATION_CREDENTIALS=PATH/TO/CREDENTIALS.json`
17-
1. Install jar
18-
`mvn install:install-file -Dfile=libstoragetransfer-v1-java-public.jar \`
19-
`-DgroupId=com.google.storagetransfer.samples -DartifactId=libstoragetransfer -Dversion=1 -Dpackaging=jar`
2019

2120
## Transfer from Amazon S3 to Google Cloud Storage
2221

cloud-storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/AwsRequester.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
/**
3333
* Creates a one-off transfer job from Amazon S3 to Google Cloud Storage.
34-
*
3534
*/
3635
public final class AwsRequester {
3736

@@ -41,6 +40,10 @@ public final class AwsRequester {
4140
private static final String AWS_ACCESS_KEY_ID = "YOUR_ACCESS_KEY_ID";
4241
private static final String AWS_SECRET_ACCESS_KEY = "YOUR_SECRET_ACCESS_KEY";
4342
private static final String GCS_SINK_NAME = "YOUR_SINK_BUCKET";
43+
44+
/**
45+
* Specify times below using US Pacific Time Zone.
46+
*/
4447
private static final String START_DATE = "YYYY-MM-DD";
4548
private static final String START_TIME = "HH:MM:SS";
4649

cloud-storage/storage-transfer/src/main/java/com/google/cloud/storage/storagetransfer/samples/NearlineRequester.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@
3131

3232
/**
3333
* Creates a daily transfer from a standard Cloud Storage bucket to a Cloud Storage Nearline
34-
* bucket for files untouched for 30 days.
35-
*
34+
* bucket for files untouched for 30 days.
3635
*/
3736
public final class NearlineRequester {
3837

3938
private static final String JOB_DESC = "YOUR DESCRIPTION";
4039
private static final String PROJECT_ID = "YOUR_PROJECT_ID";
4140
private static final String GCS_SOURCE_NAME = "YOUR_SOURCE_BUCKET";
4241
private static final String NEARLINE_SINK_NAME = "YOUR_SINK_BUCKET";
42+
43+
/**
44+
* Specify times below using US Pacific Time Zone.
45+
*/
4346
private static final String START_DATE = "YYYY-MM-DD";
4447
private static final String START_TIME = "HH:MM:SS";
4548

0 commit comments

Comments
 (0)