-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force serialized class reloading #81
Comments
Can you provide a sample code to reproduce? |
Initial code: public class CalculateStatisticsTask extends GridComputeTaskSplitAdapter<List<Map<String, String>>, List<Statistics>> {
private static final long serialVersionUID = 1L;
@Override
protected Collection<? extends GridComputeJob> split(int gridSize, List<Map<String, String>> axeses) {
Collection<GridComputeJob> jobs = new LinkedList<>();
for (final Map<String, String> axes : axeses) {
jobs.add(new GridComputeJobAdapter() {
private static final long serialVersionUID = 1L;
@Nullable
@Override
public Object execute() {
System.out.println("Axes: xyz");
}
});
}
return jobs;
}
// ...
} I run this task from a client node and have an remote node running in a terminal window. It prints out the "Axes: xyz" which is fine. However, if I change the code to print out something else ("Axes: abc"), the remote node still prints out the old String. If i change the serialVersionUID to a new value, I get the following exception:
From reading the documentation on "Zero Deployment," it says:
However, it doesn't seem to pickup the new code at all. I was testing if changing the serialVersionUID would do that. Is there a way to pickup the new code without restarting the remote node? |
Is there a way force reloading of serialized classes that are associated with GridClosures? I have an example program that has a closure which makes use of inner classes but when those inner classes are changed, I get an exception. When I change the serialVersionUID of the serialized classes, I get a different exception saying that I need to make sure the class is loaded on all nodes. Is there a way to force a reload if the serialized version changes?
The text was updated successfully, but these errors were encountered: