Refer to Datastore everywhere correctly by its capitalized form

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147479683
This commit is contained in:
mcilwain 2017-02-14 09:11:30 -08:00 committed by Ben McIlwain
parent a8cf81bca2
commit cdadb54acd
123 changed files with 232 additions and 235 deletions

View file

@ -93,7 +93,7 @@ public class CheckSnapshotAction implements Runnable {
String message = String.format("Bad backup name %s: %s", snapshotName, e.getMessage());
// TODO(b/19081569): Ideally this would return a 2XX error so the task would not be
// retried but we might abandon backups that start late and haven't yet written to
// datastore. We could fix that by replacing this with a two-phase polling strategy.
// Datastore. We could fix that by replacing this with a two-phase polling strategy.
throw new BadRequestException(message, e);
}
}

View file

@ -33,25 +33,25 @@ import java.util.List;
import org.joda.time.DateTime;
import org.joda.time.Duration;
/** Container for information about a datastore backup. */
/** Container for information about a Datastore backup. */
public class DatastoreBackupInfo {
@NonFinalForTesting
private static Clock clock = new SystemClock();
/** The possible status values for a datastore backup. */
/** The possible status values for a Datastore backup. */
public enum BackupStatus { PENDING, COMPLETE }
/** The name of the datastore backup. */
/** The name of the Datastore backup. */
private final String backupName;
/** The entity kinds included in this datastore backup. */
/** The entity kinds included in this Datastore backup. */
private final ImmutableSet<String> kinds;
/** The start time of the datastore backup. */
/** The start time of the Datastore backup. */
private final DateTime startTime;
/** The completion time of the datastore backup, present if it has completed. */
/** The completion time of the Datastore backup, present if it has completed. */
private final Optional<DateTime> completeTime;
/**

View file

@ -33,10 +33,10 @@ import com.google.common.collect.Iterables;
import google.registry.util.NonFinalForTesting;
import java.util.NoSuchElementException;
/** An object providing methods for starting and querying datastore backups. */
/** An object providing methods for starting and querying Datastore backups. */
public class DatastoreBackupService {
/** The internal kind name used for entities storing information about datastore backups. */
/** The internal kind name used for entities storing information about Datastore backups. */
static final String BACKUP_INFO_KIND = "_AE_Backup_Information";
/** The name of the app version used for hosting the Datastore Admin functionality. */
@ -58,7 +58,7 @@ public class DatastoreBackupService {
}
/**
* Generates the TaskOptions needed to trigger an AppEngine datastore backup job.
* Generates the TaskOptions needed to trigger an AppEngine Datastore backup job.
*
* @see <a href="https://developers.google.com/appengine/articles/scheduled_backups">Scheduled Backups</a>
*/
@ -79,7 +79,7 @@ public class DatastoreBackupService {
}
/**
* Launches a new datastore backup with the given name, GCS bucket, and set of kinds by
* Launches a new Datastore backup with the given name, GCS bucket, and set of kinds by
* submitting a task to the given task queue, and returns a handle to that task.
*/
public TaskHandle launchNewBackup(
@ -87,10 +87,10 @@ public class DatastoreBackupService {
return getQueue(queue).add(makeTaskOptions(queue, name, gcsBucket, kinds));
}
/** Return an iterable of all datastore backups whose names have the given string prefix. */
/** Return an iterable of all Datastore backups whose names have the given string prefix. */
public Iterable<DatastoreBackupInfo> findAllByNamePrefix(final String namePrefix) {
// Need the raw DatastoreService to access the internal _AE_Backup_Information entities.
// TODO(b/19081037): make an Objectify entity class for these raw datastore entities instead.
// TODO(b/19081037): make an Objectify entity class for these raw Datastore entities instead.
return FluentIterable
.from(getDatastoreService().prepare(new Query(BACKUP_INFO_KIND)).asIterable())
.filter(new Predicate<Entity>() {

View file

@ -29,10 +29,10 @@ import google.registry.model.annotations.VirtualEntity;
/** Constants related to export code. */
public final class ExportConstants {
/** Returns the names of kinds to include in datastore backups. */
/** Returns the names of kinds to include in Datastore backups. */
public static ImmutableSet<String> getBackupKinds() {
// Back up all entity classes that aren't annotated with @VirtualEntity (never even persisted
// to datastore, so they can't be backed up) or @NotBackedUp (intentionally omitted).
// to Datastore, so they can't be backed up) or @NotBackedUp (intentionally omitted).
return FluentIterable.from(EntityClasses.ALL_CLASSES)
.filter(not(hasAnnotation(VirtualEntity.class)))
.filter(not(hasAnnotation(NotBackedUp.class)))

View file

@ -25,7 +25,7 @@ import google.registry.util.FormattingLogger;
import javax.inject.Inject;
/**
* Action to trigger a datastore backup job that writes a snapshot to Google Cloud Storage.
* Action to trigger a Datastore backup job that writes a snapshot to Google Cloud Storage.
*
* <p>This is the first step of a four step workflow for exporting snapshots, with each step calling
* the next upon successful completion:

View file

@ -108,7 +108,7 @@ public class LoadSnapshotAction implements Runnable {
Bigquery bigquery = bigqueryFactory.create(projectId, SNAPSHOTS_DATASET);
DateTime now = clock.nowUtc();
String loadMessage =
String.format("Loading datastore snapshot %s from %s...", snapshotId, gcsFilename);
String.format("Loading Datastore snapshot %s from %s...", snapshotId, gcsFilename);
logger.info(loadMessage);
StringBuilder builder = new StringBuilder(loadMessage + "\n");
builder.append("Load jobs:\n");

View file

@ -32,7 +32,7 @@ import google.registry.util.SqlTemplate;
import java.io.IOException;
import javax.inject.Inject;
/** Update a well-known view to point at a certain datastore snapshot table in BigQuery. */
/** Update a well-known view to point at a certain Datastore snapshot table in BigQuery. */
@Action(path = UpdateSnapshotViewAction.PATH, method = POST)
public class UpdateSnapshotViewAction implements Runnable {