fix jobgen
diff --git a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGen.java b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGen.java
index b9f2d70..c1f6aae 100644
--- a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGen.java
+++ b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGen.java
@@ -137,7 +137,7 @@
protected PregelixJob pregelixJob;
protected IIndexLifecycleManagerProvider lcManagerProvider = IndexLifeCycleManagerProvider.INSTANCE;
protected IStorageManagerInterface storageManagerInterface = StorageManagerInterface.INSTANCE;
- protected String jobId;
+ protected String jobId = UUID.randomUUID().toString();;
protected int frameSize = ClusterConfig.getFrameSize();
protected int maxFrameNumber = (int) (((long) 32 * MB) / frameSize);
@@ -153,12 +153,15 @@
public JobGen(PregelixJob job) {
init(job);
}
+
+ public JobGen(PregelixJob job, String jobId) {
+ if(jobId!=null){
+ this.jobId = jobId;
+ }
+ init(job);
+ }
private void init(PregelixJob job) {
- jobId = BspUtils.getJobId(job.getConfiguration());
- if (jobId == null) {
- jobId = UUID.randomUUID().toString();
- }
conf = job.getConfiguration();
pregelixJob = job;
initJobConfiguration();
@@ -804,7 +807,7 @@
*/
List<JobSpecification> list = new ArrayList<JobSpecification>();
list.add(bulkLoadLiveVertexBTree(iteration));
- JobGen jobGen = new JobGenInnerJoin(pregelixJob);
+ JobGen jobGen = new JobGenInnerJoin(pregelixJob, jobId);
return Pair.of(list, jobGen);
}
diff --git a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenInnerJoin.java b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenInnerJoin.java
index 1bad401..7bdb069 100644
--- a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenInnerJoin.java
+++ b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenInnerJoin.java
@@ -96,6 +96,10 @@
public JobGenInnerJoin(PregelixJob job) {
super(job);
}
+
+ public JobGenInnerJoin(PregelixJob job, String jobId) {
+ super(job, jobId);
+ }
protected JobSpecification generateFirstIteration(int iteration) throws HyracksException {
Class<? extends WritableComparable<?>> vertexIdClass = BspUtils.getVertexIndexClass(conf);
diff --git a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoin.java b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoin.java
index d01c069..68e6706 100644
--- a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoin.java
+++ b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoin.java
@@ -72,6 +72,10 @@
public JobGenOuterJoin(PregelixJob job) {
super(job);
}
+
+ public JobGenOuterJoin(PregelixJob job, String jobId) {
+ super(job, jobId);
+ }
@Override
protected JobSpecification generateFirstIteration(int iteration) throws HyracksException {
diff --git a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoinSingleSort.java b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoinSingleSort.java
index 4480b97..3e4b213 100644
--- a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoinSingleSort.java
+++ b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/jobgen/JobGenOuterJoinSingleSort.java
@@ -72,6 +72,10 @@
public JobGenOuterJoinSingleSort(PregelixJob job) {
super(job);
}
+
+ public JobGenOuterJoinSingleSort(PregelixJob job, String jobId) {
+ super(job, jobId);
+ }
@Override
protected JobSpecification generateFirstIteration(int iteration) throws HyracksException {