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

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

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

Repository.loadPartitionSchema介绍

暂无

代码示例

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

@Override
public PartitionSchema loadPartitionSchema( ObjectId objectId, String s ) throws KettleException {
 return getDelegate().loadPartitionSchema( objectId, s );
}

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

private List<PartitionSchema> pickupPartitionSchemas( TransMeta transMeta ) throws KettleException {
 if ( rep != null ) {
  ObjectId[] ids = rep.getPartitionSchemaIDs( false );
  List<PartitionSchema> result = new ArrayList<>( ids.length );
  for ( ObjectId id : ids ) {
   PartitionSchema schema = rep.loadPartitionSchema( id, null );
   result.add( schema );
  }
  return result;
 }
 return transMeta.getPartitionSchemas();
}

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

private List<PartitionSchema> pickupPartitionSchemas( TransMeta transMeta ) throws KettleException {
 Repository rep = spoon.getRepository();
 if ( rep != null ) {
  ObjectId[] ids = rep.getPartitionSchemaIDs( false );
  List<PartitionSchema> result = new ArrayList<>( ids.length );
  for ( ObjectId id : ids ) {
   PartitionSchema schema = rep.loadPartitionSchema( id, null );
   result.add( schema );
  }
  return result;
 }
 return transMeta.getPartitionSchemas();
}

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

public void refreshPartitions() {
 if ( repository != null ) {
  final List<UIPartition> tmpList = new ArrayList<UIPartition>();
  Runnable r = () -> {
   try {
    if ( repository instanceof RepositoryExtended ) {
     List<PartitionSchema> partitionSchemas = ((RepositoryExtended) repository).getPartitions( false );
     partitionSchemas.forEach( partitionSchema -> tmpList.add( new UIPartition( partitionSchema ) ) );
    } else {
     ObjectId[] partitionIdList = repository.getPartitionSchemaIDs( false );
     for ( ObjectId partitionId : partitionIdList ) {
      PartitionSchema partition = repository.loadPartitionSchema( partitionId, null );
      // Add the partition schema to the list
      tmpList.add( new UIPartition( partition ) );
     }
    }
   } 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 );
  partitionList.setChildren( tmpList );
 }
}

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

public void editPartitionSchema( String partitionSchemaName ) {
 try {
  ObjectId id = rep.getPartitionSchemaID( partitionSchemaName );
  PartitionSchema partitionSchema = rep.loadPartitionSchema( id, null ); // Load the last version
  PartitionSchemaDialog dd =
   new PartitionSchemaDialog( shell, partitionSchema, rep.readDatabases(), variableSpace );
  if ( dd.open() ) {
   rep.insertLogEntry( "Updating partition schema '" + partitionSchema.getName() + "'" );
   rep.save( partitionSchema, Const.VERSION_COMMENT_EDIT_VERSION, null );
   if ( !partitionSchemaName.equalsIgnoreCase( partitionSchema.getName() ) ) {
    refreshTree();
   }
  }
 } catch ( KettleException e ) {
  new ErrorDialog(
   shell,
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.PartitionSchema.Edit.UnexpectedError.Title" ),
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.PartitionSchema.Edit.UnexpectedError.Message" )
    + partitionSchemaName + "]", e );
 }
}

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

PartitionSchema partitionSchema = rep.loadPartitionSchema( id, null );
validateImportedElement( importRules, partitionSchema );
sharedObjects.storeObject( partitionSchema );

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

if ( stepNode.hasProperty( PROP_PARTITIONING_SCHEMA ) ) {
 String partSchemaId = stepNode.getProperty( PROP_PARTITIONING_SCHEMA ).getRef().getId().toString();
 String schemaName = repo.loadPartitionSchema( new StringObjectId( partSchemaId ), null ).getName();

相关文章

Repository类方法