mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 08:27:14 +02:00
Add scaffolding of deeplinking verification []
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123450717
This commit is contained in:
parent
6355ef5922
commit
4876d09d6c
2 changed files with 14 additions and 5 deletions
|
@ -71,7 +71,8 @@ public class MapreduceRunner {
|
||||||
private String jobName;
|
private String jobName;
|
||||||
private String moduleName;
|
private String moduleName;
|
||||||
|
|
||||||
// If no reduce shards are set via http params, use this many shards.
|
// Defaults for number of mappers/reducers if not specified in HTTP params.
|
||||||
|
private int defaultMapShards = Integer.MAX_VALUE;
|
||||||
private int defaultReduceShards = 1;
|
private int defaultReduceShards = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,9 +106,15 @@ public class MapreduceRunner {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set the default number of mappers, if not overriden by the http param. */
|
||||||
|
public MapreduceRunner setDefaultMapShards(int defaultMapShards) {
|
||||||
|
this.defaultMapShards = defaultMapShards;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/** Set the default number of reducers, if not overriden by the http param. */
|
/** Set the default number of reducers, if not overriden by the http param. */
|
||||||
public MapreduceRunner setDefaultReduceShards(int defaultReduceShards) {
|
public MapreduceRunner setDefaultReduceShards(int defaultReduceShards) {
|
||||||
this.defaultReduceShards = checkNotNull(defaultReduceShards, "defaultReduceShards");
|
this.defaultReduceShards = defaultReduceShards;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +137,7 @@ public class MapreduceRunner {
|
||||||
return new MapJob<>(
|
return new MapJob<>(
|
||||||
new MapSpecification.Builder<I, O, R>()
|
new MapSpecification.Builder<I, O, R>()
|
||||||
.setJobName(jobName)
|
.setJobName(jobName)
|
||||||
.setInput(new ConcatenatingInput<>(inputs, httpParamMapShards.or(Integer.MAX_VALUE)))
|
.setInput(new ConcatenatingInput<>(inputs, httpParamMapShards.or(defaultMapShards)))
|
||||||
.setMapper(mapper)
|
.setMapper(mapper)
|
||||||
.setOutput(output)
|
.setOutput(output)
|
||||||
.build(),
|
.build(),
|
||||||
|
@ -186,7 +193,7 @@ public class MapreduceRunner {
|
||||||
return new MapReduceJob<>(
|
return new MapReduceJob<>(
|
||||||
new MapReduceSpecification.Builder<I, K, V, O, R>()
|
new MapReduceSpecification.Builder<I, K, V, O, R>()
|
||||||
.setJobName(jobName)
|
.setJobName(jobName)
|
||||||
.setInput(new ConcatenatingInput<>(inputs, httpParamMapShards.or(Integer.MAX_VALUE)))
|
.setInput(new ConcatenatingInput<>(inputs, httpParamMapShards.or(defaultMapShards)))
|
||||||
.setMapper(mapper)
|
.setMapper(mapper)
|
||||||
.setReducer(reducer)
|
.setReducer(reducer)
|
||||||
.setOutput(output)
|
.setOutput(output)
|
||||||
|
|
|
@ -7,7 +7,9 @@ licenses(["notice"]) # Apache 2.0
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "server",
|
name = "server",
|
||||||
srcs = glob(["*.java"]),
|
srcs = glob([
|
||||||
|
"*.java",
|
||||||
|
]),
|
||||||
deps = [
|
deps = [
|
||||||
"//java/com/google/common/annotations",
|
"//java/com/google/common/annotations",
|
||||||
"//java/com/google/common/base",
|
"//java/com/google/common/base",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue