public class LocallyCachedTopologyBlob extends LocallyCachedBlob
Modifier and Type | Class and Description |
---|---|
static class |
LocallyCachedTopologyBlob.TopologyBlobType |
Modifier and Type | Field and Description |
---|---|
static long |
LOCAL_MODE_JAR_VERSION |
localUpdateTime, NOT_DOWNLOADED_VERSION
Modifier | Constructor and Description |
---|---|
protected |
LocallyCachedTopologyBlob(String topologyId,
boolean isLocalMode,
Map<String,Object> conf,
AdvancedFSOps fsOps,
LocallyCachedTopologyBlob.TopologyBlobType type,
String owner,
StormMetricsRegistry metricsRegistry)
Create a new LocallyCachedBlob.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanupOrphanedData()
Clean up any temporary files.
|
protected void |
commitNewVersion(long newVersion)
Commit the new version and make it available for the end user.
|
void |
completelyRemove()
Completely remove anything that is cached locally for this blob and all tracking files also stored for it.
|
boolean |
equals(Object other) |
protected void |
extractDirFromJar(String jarpath,
String dir,
Path dest) |
long |
fetchUnzipToTemp(ClientBlobStore store)
Download the latest version to a temp location.
|
long |
getLocalVersion()
Get the version of the blob cached locally.
|
long |
getRemoteVersion(ClientBlobStore store)
Get the version of the blob in the blob store.
|
long |
getSizeOnDisk()
Get the amount of disk space that is used by this blob.
|
int |
hashCode() |
boolean |
isFullyDownloaded() |
String |
toString() |
addReference, fetch, getDependencies, getKey, getLastUsed, getSizeOnDisk, informReferencesAndCommitNewVersion, isUsed, removeReference, touch, update
public static final long LOCAL_MODE_JAR_VERSION
protected LocallyCachedTopologyBlob(String topologyId, boolean isLocalMode, Map<String,Object> conf, AdvancedFSOps fsOps, LocallyCachedTopologyBlob.TopologyBlobType type, String owner, StormMetricsRegistry metricsRegistry) throws IOException
topologyId
- the ID of the topology.type
- the type of the blob.owner
- the name of the user that owns this blob.IOException
public long getLocalVersion()
LocallyCachedBlob
getLocalVersion
in class LocallyCachedBlob
public long getRemoteVersion(ClientBlobStore store) throws KeyNotFoundException, AuthorizationException
LocallyCachedBlob
getRemoteVersion
in class LocallyCachedBlob
KeyNotFoundException
AuthorizationException
public long fetchUnzipToTemp(ClientBlobStore store) throws IOException, KeyNotFoundException, AuthorizationException
LocallyCachedBlob
fetchUnzipToTemp
in class LocallyCachedBlob
store
- the store to us to download the data.IOException
KeyNotFoundException
AuthorizationException
protected void extractDirFromJar(String jarpath, String dir, Path dest) throws IOException
IOException
public boolean isFullyDownloaded()
isFullyDownloaded
in class LocallyCachedBlob
protected void commitNewVersion(long newVersion) throws IOException
LocallyCachedBlob
commitNewVersion
in class LocallyCachedBlob
newVersion
- the version of the blob to commit.IOException
public void cleanupOrphanedData() throws IOException
LocallyCachedBlob
cleanupOrphanedData
in class LocallyCachedBlob
IOException
public void completelyRemove() throws IOException
LocallyCachedBlob
completelyRemove
in class LocallyCachedBlob
IOException
public long getSizeOnDisk()
LocallyCachedBlob
getSizeOnDisk
in class LocallyCachedBlob
Copyright © 2023 The Apache Software Foundation. All rights reserved.