Class NamedClusterEmbedManager
- java.lang.Object
-
- org.pentaho.di.trans.steps.named.cluster.NamedClusterEmbedManager
-
public class NamedClusterEmbedManager extends Object
This class provides centralized logic to embed NamedClusters used by transformations/jobs in the embeddedMetaStore. There are two or three steps in implementing embeddedNamedClusters in support of a step/entry. 1) Make the getXml() method of the step call the the registerUrl method here with any url used by step/entry which may contain a reference to a named cluster. This class will parse the url and determine if a named cluster is present. If a named cluster is found it will be added to embeddedMetastore which will ultimately be written to the ktr file. 2) All accesses to KettleVFS.getFileObject should use a signature that provides a VariableSpace. This is because VFS will be passed a key to the embeddedMetastore through this nameSpace. Some steps already do this and some don't. 3) At run time call the passEmbeddedMetastoreKey method to set variable in the namespace used in step 2. Created by tkafalas on 7/14/2017.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAMESPACE
protected static org.pentaho.metastore.persist.MetaStoreFactory
testMetaStoreFactory
-
Constructor Summary
Constructors Constructor Description NamedClusterEmbedManager(AbstractMeta meta, org.pentaho.di.core.logging.LogChannelInterface log)
Class creates an embedded metastores for NamedClusters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClusterToMeta(String clusterName)
void
clear()
Clear the embedded metastore of any named clustersboolean
isAddedAnyClusters()
void
passEmbeddedMetastoreKey(org.pentaho.di.core.variables.VariableSpace nameSpace, String embeddedMetastoreProviderKey)
Set the variable that will be used by Vfs to set the FileSystemOptions for the file system.void
registerUrl(String urlString)
If hc:// protocol is explicitly defined, check for a literal named Cluster.
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
testMetaStoreFactory
protected static org.pentaho.metastore.persist.MetaStoreFactory testMetaStoreFactory
-
-
Constructor Detail
-
NamedClusterEmbedManager
public NamedClusterEmbedManager(AbstractMeta meta, org.pentaho.di.core.logging.LogChannelInterface log)
Class creates an embedded metastores for NamedClusters- Parameters:
meta
- The TransMeta or JobMeta
-
-
Method Detail
-
registerUrl
public void registerUrl(String urlString)
If hc:// protocol is explicitly defined, check for a literal named Cluster. If present, add that cluster to the embedded meta. If the cluster name starts with a variable, add all named clusters. if the url starts with a variable, embed all named clusters.- Parameters:
urlString
- The Url of the file being accessed as stored by the transformation/job
-
clear
public void clear()
Clear the embedded metastore of any named clusters
-
isAddedAnyClusters
public boolean isAddedAnyClusters()
-
addClusterToMeta
public void addClusterToMeta(String clusterName)
-
passEmbeddedMetastoreKey
public void passEmbeddedMetastoreKey(org.pentaho.di.core.variables.VariableSpace nameSpace, String embeddedMetastoreProviderKey)
Set the variable that will be used by Vfs to set the FileSystemOptions for the file system.- Parameters:
nameSpace
- The namespace used by the getFileObject method to access VFS.embeddedMetastoreProviderKey
- The key to the embeddedMetastore from the AbstraceMeta
-
-