Creating a FutureValue from an instance of MapJob [ futureCall(new MapJob<>(...)) ] produce the wrong return type (AxisTypesParameter)

19 views
Skip to first unread message

Jesús Valladares Solis

unread,
Jul 9, 2014, 9:41:00 PM7/9/14
to app-engine-...@googlegroups.com
just filed a bug:


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>
    }

}
GAE_MR_bug.png
Reply all
Reply to author
Forward
0 new messages