Skip to content

Job state stored in distributed cache in MR mode.#913

Merged
ibuenros merged 1 commit intoapache:masterfrom
ibuenros:serialize-state-replication
Apr 15, 2016
Merged

Job state stored in distributed cache in MR mode.#913
ibuenros merged 1 commit intoapache:masterfrom
ibuenros:serialize-state-replication

Conversation

@ibuenros
Copy link
Contributor

@ibuenros ibuenros commented Apr 5, 2016

No description provided.

@ibuenros
Copy link
Contributor Author

ibuenros commented Apr 5, 2016

@chavdar @sahilTakiar can you review? This addresses https://github.com/linkedin/gobblin/issues/911

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 42.648% when pulling 210c4e2 on ibuenros:serialize-state-replication into 6c53d51 on linkedin:master.

Path jobStateFilePath = new Path(this.mrJobDir, JOB_STATE_FILE_NAME);
SerializationUtils.serializeState(this.fs, jobStateFilePath, this.jobContext.getJobState(), 100);
SerializationUtils.serializeState(this.fs, jobStateFilePath, this.jobContext.getJobState());
DistributedCache.addCacheFile(jobStateFilePath.toUri(), this.job.getConfiguration());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use MRJobLauncher.addHDFSFiles which already does this, it also sets up a symlink to the file, this way the additional property JOB_STATE_DISTRIBUTED_CACHE_NAME should not longer be necessary.

Using the symlink should also simply the code added to the setup method.

@ibuenros ibuenros force-pushed the serialize-state-replication branch from 210c4e2 to ad6634b Compare April 11, 2016 20:36
@ibuenros
Copy link
Contributor Author

@sahilTakiar I tried using MRJobLauncher.addHDFSFiles but I couldn't get it working. DistributedCache.getLocalCacheFiles(context.getConfiguration()) throws an NPE, and trying to simply load new File(name) cannot find the file.
Any suggestions?

@ibuenros ibuenros force-pushed the serialize-state-replication branch from ad6634b to 3ea72ab Compare April 11, 2016 20:52
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 43.56% when pulling 3ea72ab on ibuenros:serialize-state-replication into 5344ec2 on linkedin:master.

@ibuenros
Copy link
Contributor Author

Talked with @sahilTakiar offline. Merging.

@ibuenros ibuenros merged commit 44566fa into apache:master Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants