public class IPDBLoadJob extends Job0<java.lang.Void> {
private static final Logger log = Logger.getLogger(IPDBLoadJob.class.getName());
private final GcsFilename gcsFilename;
public IPDBLoadJob(GcsFilename gcsFilename) {
this.gcsFilename = gcsFilename;
}
@Override
public FutureValue<Void> run() throws Exception {
MapSpecification<byte[], Entity, java.lang.Void> mapSpec = new MapSpecification.Builder<>(
new GoogleCloudStorageLineInput(this.gcsFilename, (byte) '\n', 10),
new EntityCreator(),new DatastoreOutput()).setJobName("IP DB Loader Job").build();
MapSettings settings = new MapSettings.Builder()
.setWorkerQueueName("ipdb-map-workers")
.setMaxShardRetries(1)
.setMaxSliceRetries(1)
.build();
return futureCall(new MapJob<>(mapSpec,settings)); // <= returns FutureValue(AxisTypesParameter) instead of FutureValue<Void>
}
}