mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Run automatic Java 8 conversion over codebase
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171174380
This commit is contained in:
parent
44df5da771
commit
5edb7935ed
190 changed files with 2312 additions and 3096 deletions
|
@ -15,6 +15,7 @@
|
|||
package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.request.Action.Method.POST;
|
||||
import static google.registry.util.PipelineUtils.createJobPath;
|
||||
|
@ -22,7 +23,6 @@ import static google.registry.util.PipelineUtils.createJobPath;
|
|||
import com.google.appengine.tools.mapreduce.Input;
|
||||
import com.google.appengine.tools.mapreduce.Mapper;
|
||||
import com.google.appengine.tools.mapreduce.inputs.InMemoryInput;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.googlecode.objectify.Key;
|
||||
|
@ -33,7 +33,7 @@ import google.registry.model.ofy.CommitLogCheckpointRoot;
|
|||
import google.registry.request.Action;
|
||||
import google.registry.request.Response;
|
||||
import google.registry.request.auth.Auth;
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Stream;
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
|
@ -63,13 +63,14 @@ public class KillAllCommitLogsAction implements Runnable {
|
|||
"DO NOT RUN ANYWHERE ELSE EXCEPT CRASH OR TESTS.");
|
||||
// Create a in-memory input, assigning each bucket to its own shard for maximum parallelization,
|
||||
// with one extra shard for the CommitLogCheckpointRoot.
|
||||
Input<Key<?>> input = new InMemoryInput<>(
|
||||
Lists.partition(
|
||||
FluentIterable
|
||||
.from(Arrays.<Key<?>>asList(CommitLogCheckpointRoot.getKey()))
|
||||
.append(CommitLogBucket.getAllBucketKeys())
|
||||
.toList(),
|
||||
1));
|
||||
Input<Key<?>> input =
|
||||
new InMemoryInput<>(
|
||||
Lists.partition(
|
||||
Stream.concat(
|
||||
Stream.of(CommitLogCheckpointRoot.getKey()),
|
||||
CommitLogBucket.getAllBucketKeys().stream())
|
||||
.collect(toImmutableList()),
|
||||
1));
|
||||
response.sendJavaScriptRedirect(createJobPath(mrRunner
|
||||
.setJobName("Delete all commit logs")
|
||||
.setModuleName("tools")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue