本文整理汇总了Java中org.pentaho.di.cluster.SlaveServer.getName方法的典型用法代码示例。如果您正苦于以下问题:Java SlaveServer.getName方法的具体用法?Java SlaveServer.getName怎么用?Java SlaveServer.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.cluster.SlaveServer
的用法示例。
在下文中一共展示了SlaveServer.getName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveSlaveServer
import org.pentaho.di.cluster.SlaveServer; //导入方法依赖的package包/类
public void saveSlaveServer(SlaveServer slaveServer, ObjectId id_transformation, boolean isUsedByTransformation,
boolean overwrite) throws KettleException {
if (slaveServer.getObjectId() == null) {
// See if the slave doesn't exist already (just for safety and PDI-5102
//
slaveServer.setObjectId(getSlaveID(slaveServer.getName()));
}
if (slaveServer.getObjectId() == null) {
// New Slave Server
slaveServer.setObjectId(insertSlave(slaveServer));
} else {
ObjectId existingSlaveId = slaveServer.getObjectId();
if (existingSlaveId != null && slaveServer.getObjectId() != null
&& !slaveServer.getObjectId().equals(existingSlaveId)) {
// A slave with this name already exists
if (overwrite) {
// Proceed with save, removing the original version from the repository first
repository.deleteSlave(existingSlaveId);
updateSlave(slaveServer);
} else {
throw new KettleObjectExistsException("Failed to save object to repository. Object [" + slaveServer.getName()
+ "] already exists.");
}
} else {
// There are no naming collisions (either it is the same object or the name is unique)
updateSlave(slaveServer);
}
}
// Save the trans-slave relationship too.
if (id_transformation != null && isUsedByTransformation) {
repository.insertTransformationSlave(id_transformation, slaveServer.getObjectId());
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:37,代码来源:KettleDatabaseRepositorySlaveServerDelegate.java
示例2: getSlaveTransName
import org.pentaho.di.cluster.SlaveServer; //导入方法依赖的package包/类
private String getSlaveTransName(String transName, ClusterSchema clusterSchema, SlaveServer slaveServer)
{
return transName + " ("+clusterSchema+":"+slaveServer.getName()+")";
}
示例3: createPortCacheKey
import org.pentaho.di.cluster.SlaveServer; //导入方法依赖的package包/类
public String createPortCacheKey(SlaveServer sourceSlave, String sourceStepName, int sourceStepCopy, SlaveServer targetSlave, String targetStepName, int targetStepCopy) {
return sourceSlave.getHostname()+sourceSlave.getName()+"/"+sourceStepName+"."+sourceStepCopy+" - "+targetSlave.getName()+"/"+targetStepName+"."+targetStepCopy;
}
示例4: makeSlaveTabName
import org.pentaho.di.cluster.SlaveServer; //导入方法依赖的package包/类
public String makeSlaveTabName(SlaveServer slaveServer)
{
return "Slave server: " + slaveServer.getName();
}
示例5: insertSlave
import org.pentaho.di.cluster.SlaveServer; //导入方法依赖的package包/类
public synchronized ObjectId insertSlave(SlaveServer slaveServer) throws KettleException {
if (getSlaveID(slaveServer.getName()) != null) {
// This slave server name is already in use. Throw an exception.
throw new KettleObjectExistsException("Failed to create object in repository. Object [" + slaveServer.getName()
+ "] already exists.");
}
ObjectId id = repository.connectionDelegate.getNextSlaveServerID();
RowMetaAndData table = new RowMetaAndData();
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_ID_SLAVE, ValueMetaInterface.TYPE_INTEGER), id);
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_NAME, ValueMetaInterface.TYPE_STRING),
slaveServer.getName());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_HOST_NAME, ValueMetaInterface.TYPE_STRING),
slaveServer.getHostname());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_PORT, ValueMetaInterface.TYPE_STRING),
slaveServer.getPort());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_WEB_APP_NAME, ValueMetaInterface.TYPE_STRING),
slaveServer.getWebAppName());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_USERNAME, ValueMetaInterface.TYPE_STRING),
slaveServer.getUsername());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_PASSWORD, ValueMetaInterface.TYPE_STRING), Encr
.encryptPasswordIfNotUsingVariables(slaveServer.getPassword()));
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_PROXY_HOST_NAME, ValueMetaInterface.TYPE_STRING),
slaveServer.getProxyHostname());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_PROXY_PORT, ValueMetaInterface.TYPE_STRING),
slaveServer.getProxyPort());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_NON_PROXY_HOSTS, ValueMetaInterface.TYPE_STRING),
slaveServer.getNonProxyHosts());
table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_SLAVE_MASTER, ValueMetaInterface.TYPE_BOOLEAN), Boolean
.valueOf(slaveServer.isMaster()));
repository.connectionDelegate.getDatabase().prepareInsert(table.getRowMeta(),
KettleDatabaseRepository.TABLE_R_SLAVE);
repository.connectionDelegate.getDatabase().setValuesInsert(table);
repository.connectionDelegate.getDatabase().insertRow();
repository.connectionDelegate.getDatabase().closeInsert();
return id;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:42,代码来源:KettleDatabaseRepositorySlaveServerDelegate.java
示例6: createPortCacheKey
import org.pentaho.di.cluster.SlaveServer; //导入方法依赖的package包/类
public String createPortCacheKey(SlaveServer sourceSlave, String sourceStepName, int sourceStepCopy, SlaveServer targetSlave, String targetStepName, int targetStepCopy) {
return clusteredRunId+"/"+sourceSlave.getHostname()+sourceSlave.getName()+"/"+sourceStepName+"."+sourceStepCopy+" - "+targetSlave.getName()+"/"+targetStepName+"."+targetStepCopy;
}