org.pentaho.di.repository.Repository.getSlaveServers()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中org.pentaho.di.repository.Repository.getSlaveServers方法的一些代码示例,展示了Repository.getSlaveServers的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getSlaveServers方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:getSlaveServers

Repository.getSlaveServers介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public List<SlaveServer> getSlaveServers() throws KettleException {
 return getDelegate().getSlaveServers();
}

代码示例来源:origin: pentaho/pentaho-kettle

public void refreshSlaves() {
 if ( repository != null ) {
  final List<UISlave> tmpList = new ArrayList<UISlave>();
  Runnable r = () -> {
   try {
    List<SlaveServer> slaveServers;
    if ( repository instanceof RepositoryExtended ) {
     slaveServers = ((RepositoryExtended) repository).getSlaveServers( false );
    } else {
     slaveServers = repository.getSlaveServers();
    }
    if ( slaveServers != null ) {
     slaveServers.forEach( slaveServer -> tmpList.add( new UISlave( slaveServer ) ) );
    }
   } catch ( KettleException e ) {
    if ( mainController == null || !mainController.handleLostRepository( e ) ) {
     // convert to runtime exception so it bubbles up through the UI
     throw new RuntimeException( e );
    }
   }
  };
  doWithBusyIndicator( r );
  slaveList.setChildren( tmpList );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void refreshClusters() {
 if ( repository != null ) {
  final List<UICluster> tmpList = new ArrayList<UICluster>();
  Runnable r = () -> {
   try {
    if ( repository instanceof RepositoryExtended ) {
     List<ClusterSchema> clusterSchemas = ((RepositoryExtended) repository).getClusters( false );
     clusterSchemas.forEach( clusterSchema -> tmpList.add( new UICluster( clusterSchema ) ) );
    } else {
     ObjectId[] clusterIdList = repository.getClusterIDs( false );
     for ( ObjectId clusterId : clusterIdList ) {
      ClusterSchema cluster = repository.loadClusterSchema( clusterId, repository.getSlaveServers(), null );
      // Add the cluster schema to the list
      tmpList.add( new UICluster( cluster ) );
     }
    }
   } catch ( KettleException e ) {
    // convert to runtime exception so it bubbles up through the UI
    throw new RuntimeException( e );
   }
  };
  doWithBusyIndicator( r );
  clusterList.setChildren( tmpList );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void editCluster( String clusterName ) {
 try {
  ObjectId id = rep.getClusterID( clusterName );
  ClusterSchema cluster = rep.loadClusterSchema( id, rep.getSlaveServers(), null ); // Load the last version
  ClusterSchemaDialog dd = new ClusterSchemaDialog( shell, cluster, rep.getSlaveServers() );
  if ( dd.open() ) {
   rep.insertLogEntry( "Updating cluster '" + cluster.getName() + "'" );
   rep.save( cluster, Const.VERSION_COMMENT_EDIT_VERSION, null );
   if ( !clusterName.equalsIgnoreCase( cluster.getName() ) ) {
    refreshTree();
   }
  }
 } catch ( KettleException e ) {
  //CHECKSTYLE:LineLength:OFF
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Cluster.Edit.UnexpectedError.Title" ),
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Cluster.Edit.UnexpectedError.Message" ) + clusterName + "]", e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void newSlaveServer() {
 try {
  SlaveServer slaveServer = new SlaveServer();
  SlaveServerDialog dd = new SlaveServerDialog( shell, slaveServer, rep.getSlaveServers() );
  if ( dd.open() ) {
   // See if this slave server already exists...
   ObjectId idSlave = rep.getSlaveID( slaveServer.getName() );
   if ( idSlave == null ) {
    rep.insertLogEntry( "Creating new slave server '" + slaveServer.getName() + "'" );
    rep.save( slaveServer, Const.VERSION_COMMENT_INITIAL_VERSION, null );
   } else {
    MessageBox mb = new MessageBox( shell, SWT.ICON_ERROR | SWT.OK );
    mb.setMessage( BaseMessages.getString(
     PKG, "RepositoryExplorerDialog.Slave.Create.AlreadyExists.Message" ) );
    mb.setText( BaseMessages.getString( PKG, "RepositoryExplorerDialog.Slave.Create.AlreadyExists.Title" ) );
    mb.open();
   }
   // Refresh tree...
   refreshTree();
  }
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Connection.Create.UnexpectedError.Title" ),
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Connection.Create.UnexpectedError.Message" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void newCluster() {
 try {
  ClusterSchema cluster = new ClusterSchema();
  ClusterSchemaDialog dd = new ClusterSchemaDialog( shell, cluster, rep.getSlaveServers() );
  if ( dd.open() ) {
   // See if this slave server already exists...
   ObjectId idCluster = rep.getClusterID( cluster.getName() );
   if ( idCluster == null ) {
    rep.insertLogEntry( "Creating new cluster '" + cluster.getName() + "'" );
    rep.save( cluster, Const.VERSION_COMMENT_INITIAL_VERSION, null );
   } else {
    MessageBox mb = new MessageBox( shell, SWT.ICON_ERROR | SWT.OK );
    mb.setMessage( BaseMessages.getString(
     PKG, "RepositoryExplorerDialog.Cluster.Create.AlreadyExists.Message" ) );
    mb
     .setText( BaseMessages
      .getString( PKG, "RepositoryExplorerDialog.Cluster.Create.AlreadyExists.Title" ) );
    mb.open();
   }
   // Refresh tree...
   refreshTree();
  }
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Cluster.Create.UnexpectedError.Title" ),
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Cluster.Create.UnexpectedError.Message" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

mb.open();
} else {
 ClusterSchemaDialog csd = new ClusterSchemaDialog( shell, clusterSchema, repository.getSlaveServers() );
 if ( csd.open() ) {
  if ( clusterSchema.getName() != null && !clusterSchema.getName().equals( "" ) ) {

代码示例来源:origin: pentaho/pentaho-kettle

public void createCluster() {
 try {
  ClusterSchema cluster = new ClusterSchema();
  ClusterSchemaDialog clusterDialog = new ClusterSchemaDialog( shell, cluster, repository.getSlaveServers() );
  if ( clusterDialog.open() ) {

相关文章

Repository类方法