public class AsyncLocalizer extends Object implements ILocalizer, Shutdownable
This is a wrapper around the Localizer class that provides the desired async interface to Slot.
Constructor and Description |
---|
AsyncLocalizer(Map<String,Object> conf,
Localizer localizer) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupUnusedTopologies()
Clean up any topologies that are not in use right now.
|
void |
recoverRunningTopology(LocalAssignment assignment,
int port)
Recover a running topology by incrementing references for what it has already downloaded.
|
void |
releaseSlotFor(LocalAssignment assignment,
int port)
dec reference count on all blobs associated with this topology.
|
Future<Void> |
requestDownloadBaseTopologyBlobs(LocalAssignment assignment,
int port)
Download storm.jar, storm.conf, and storm.ser for this topology if not done so already, and inc a reference count on them.
|
Future<Void> |
requestDownloadTopologyBlobs(LocalAssignment assignment,
int port)
Download the blobs for this topology (reading in list in from the config) and inc reference count for these blobs.
|
void |
shutdown() |
public Future<Void> requestDownloadBaseTopologyBlobs(LocalAssignment assignment, int port) throws IOException
ILocalizer
Download storm.jar, storm.conf, and storm.ser for this topology if not done so already, and inc a reference count on them.
requestDownloadBaseTopologyBlobs
in interface ILocalizer
assignment
- the assignment the resources are forport
- the port the topology is running onIOException
- on errorpublic void recoverRunningTopology(LocalAssignment assignment, int port)
ILocalizer
Recover a running topology by incrementing references for what it has already downloaded.
recoverRunningTopology
in interface ILocalizer
port
- the port the topology is running in.public Future<Void> requestDownloadTopologyBlobs(LocalAssignment assignment, int port)
ILocalizer
Download the blobs for this topology (reading in list in from the config) and inc reference count for these blobs. PRECONDITION: requestDownloadBaseTopologyBlobs has completed downloading.
requestDownloadTopologyBlobs
in interface ILocalizer
assignment
- the assignment the resources are forport
- the port the topology is running onpublic void releaseSlotFor(LocalAssignment assignment, int port) throws IOException
ILocalizer
dec reference count on all blobs associated with this topology.
releaseSlotFor
in interface ILocalizer
assignment
- the assignment the resources are forport
- the port the topology is running onIOException
- on any errorpublic void cleanupUnusedTopologies() throws IOException
ILocalizer
Clean up any topologies that are not in use right now.
cleanupUnusedTopologies
in interface ILocalizer
IOException
- on any error.public void shutdown()
shutdown
in interface Shutdownable
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.