| Currently, to launch a mass indexing job, we need to:
JobOperator jobOperator = BatchRuntime.getJobOperator();
Properties parameters = MassIndexingJob.parameters()
.forEntities( EntityA.class, EntityB.class )
.build();
long executionId = jobOperator.start( MassIndexingJob.NAME, parameters );
There's nothing wrong to do that, but it is semantically bad. I would prefer a more fluent expression, like:
long executionId = MassIndexingJob.forEntities( EntityA.class, EntityB.class ).start();
long executionId = MassIndexingJob
.forEntities( EntityA.class, EntityB.class )
.paramA( "foo" )
.paramB( "bar" )
.start();
Actually, the proposed expression was the initial version, we changed it at some point due to issues of retrieving JobOperator in JBeret SE environment
HSEARCH-2649 Resolved . Since we don't officially support JBeret SE yet, maybe it's better to turn back and use the proposed expression—it will be much easier to understand. And eventually investigate whether this is a bug in JBeret SE. Please notice that JBeret EE is not impacted, only JBeret SE seems to be impacted. This is an important change. If we want to do it before the final release, we still have time. Otherwise, it will be too late. |