public class NamedCluster extends Object implements Cloneable, VariableSpace
| Modifier and Type | Field and Description |
|---|---|
static Comparator<NamedCluster> |
comparator |
| Constructor and Description |
|---|
NamedCluster() |
| Modifier and Type | Method and Description |
|---|---|
NamedCluster |
clone() |
void |
copyVariablesFrom(VariableSpace space)
Copy the variables from another space, without initializing with the defaults.
|
String |
environmentSubstitute(String aString)
Substitute the string using the current variable space.
|
String[] |
environmentSubstitute(String[] aString)
Replaces environment variables in an array of strings.
|
boolean |
equals(Object obj) |
String |
fieldSubstitute(String aString,
RowMetaInterface rowMeta,
Object[] rowData)
Substitutes field values in
aString. |
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue)
This method returns a boolean for the new variable check boxes.
|
String |
getHdfsHost() |
String |
getHdfsPassword() |
String |
getHdfsPort() |
String |
getHdfsUsername() |
String |
getJobTrackerHost() |
String |
getJobTrackerPort() |
long |
getLastModifiedDate() |
String |
getName() |
String |
getOozieUrl() |
VariableSpace |
getParentVariableSpace()
Get the parent of the variable space.
|
String |
getVariable(String variableName)
Get the value of a variable.
|
String |
getVariable(String variableName,
String defaultValue)
Get the value of a variable with a default in case the variable is not found.
|
String |
getZooKeeperHost() |
String |
getZooKeeperPort() |
void |
initializeVariablesFrom(VariableSpace parent)
Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()),
after this the "injected" variables should be inserted (injectVariables()).
|
void |
injectVariables(Map<String,String> prop)
Inject variables.
|
String[] |
listVariables()
List the variables (not the values) that are currently in the variable space.
|
void |
replaceMeta(NamedCluster nc) |
void |
setHdfsHost(String hdfsHost) |
void |
setHdfsPassword(String hdfsPassword) |
void |
setHdfsPort(String hdfsPort) |
void |
setHdfsUsername(String hdfsUsername) |
void |
setJobTrackerHost(String jobTrackerHost) |
void |
setJobTrackerPort(String jobTrackerPort) |
void |
setLastModifiedDate(long lastModifiedDate) |
void |
setName(String name) |
void |
setOozieUrl(String oozieUrl) |
void |
setParentVariableSpace(VariableSpace parent)
Set the parent variable space
|
void |
setVariable(String variableName,
String variableValue)
Sets a variable in the Kettle Variables list.
|
void |
setZooKeeperHost(String zooKeeperHost) |
void |
setZooKeeperPort(String zooKeeperPort) |
void |
shareVariablesWith(VariableSpace space)
Share a variable space from another variable space.
|
public static final Comparator<NamedCluster> comparator
public void setName(String name)
public String getName()
public void copyVariablesFrom(VariableSpace space)
VariableSpacecopyVariablesFrom in interface VariableSpacespace - the space to copy the variables from.public String environmentSubstitute(String aString)
VariableSpaceenvironmentSubstitute in interface VariableSpaceaString - The string to substitute.public String[] environmentSubstitute(String[] aString)
VariableSpaceenvironmentSubstitute in interface VariableSpaceaString - The array of strings that wants its variables to be replaced.public String fieldSubstitute(String aString, RowMetaInterface rowMeta, Object[] rowData) throws KettleValueException
VariableSpaceaString. Field values are of the form "?{fieldSubstitute in interface VariableSpaceaString - the string on which to apply the substitution.rowMeta - The row metadata to use.rowData - The row data to useKettleValueException - In case there is a String conversion errorpublic VariableSpace getParentVariableSpace()
VariableSpacegetParentVariableSpace in interface VariableSpacepublic void setParentVariableSpace(VariableSpace parent)
VariableSpacesetParentVariableSpace in interface VariableSpaceparent - The parent variable space to setpublic String getVariable(String variableName, String defaultValue)
VariableSpacegetVariable in interface VariableSpacevariableName - The name of the variabledefaultValue - The default value in case the variable could not be foundpublic String getVariable(String variableName)
VariableSpacegetVariable in interface VariableSpacevariableName - The name of the variablepublic boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
VariableSpacegetBooleanValueOfVariable in interface VariableSpacevariableName - The variable to look up.defaultValue - The default value to return.static method ValueMeta.convertStringToBoolean()public void initializeVariablesFrom(VariableSpace parent)
VariableSpaceinitializeVariablesFrom in interface VariableSpaceparent - the parent to start from, or null if root.public String[] listVariables()
VariableSpacelistVariables in interface VariableSpacepublic void setVariable(String variableName, String variableValue)
VariableSpacesetVariable in interface VariableSpacevariableName - The name of the variable to setvariableValue - The value of the variable to set. If the variableValue is null, the variable is cleared from the list.public void shareVariablesWith(VariableSpace space)
VariableSpaceshareVariablesWith in interface VariableSpacespace - Variable space to be shared.public void injectVariables(Map<String,String> prop)
VariableSpaceinjectVariables in interface VariableSpaceprop - Properties object containing key-value pairs.public void replaceMeta(NamedCluster nc)
public NamedCluster clone()
public String getHdfsHost()
public void setHdfsHost(String hdfsHost)
public String getHdfsPort()
public void setHdfsPort(String hdfsPort)
public String getHdfsUsername()
public void setHdfsUsername(String hdfsUsername)
public String getHdfsPassword()
public void setHdfsPassword(String hdfsPassword)
public String getJobTrackerHost()
public void setJobTrackerHost(String jobTrackerHost)
public String getJobTrackerPort()
public void setJobTrackerPort(String jobTrackerPort)
public String getZooKeeperHost()
public void setZooKeeperHost(String zooKeeperHost)
public String getZooKeeperPort()
public void setZooKeeperPort(String zooKeeperPort)
public String getOozieUrl()
public void setOozieUrl(String oozieUrl)
public long getLastModifiedDate()
public void setLastModifiedDate(long lastModifiedDate)