迁移 Nexus 存储库上的未分配作业 - 8.0

Talend 迁移与升级指南

Version
8.0
Language
中文(简体)
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend ESB
Talend Identity and Access Management
Talend JobServer
Talend Log Server
Talend MDM Server
Talend MDM Web UI
Talend Runtime
Talend SAP RFC Server
Talend Studio
Content
安装和升级
Last publication date
2024-03-11
升级 Talend Administration Center 后,您需要迁移已经发布到 Nexus 存储库的未分配作业,然后才能在新的 Talend Administration Center 中执行它们。

开始之前

确保 Nexus 端的 Redeploy (重新部署) 选项已激活。

步骤

  1. 解压缩 Talend Administration Center 包中包含的存档 Artifact-Repository-Nexus-<version>.zip,以获得 migration-<version> 文件夹。
  2. 转到 configuration 子文件夹并打开配置文件 repository.properties
  3. 根据您的实际情况编辑配置文件以指定以下详细信息:
    • 存储库类型
    • 存储库 URL
    • 存储库 ID
    • 组 ID 或搜索关键字
    • 用户名及密码
    • 许可证文件的路径
  4. 执行 migration-<version> 文件夹中的 JAR 文件 nexus-signature-migration-<version>.jar
    java -jar nexus-signature-migration-<version>.jar

结果

您已发布到 Nexus 存储库的旧作业将下载到您的本地文件系统、进行签名并重新部署到 Nexus 存储库。
排错: 如果迁移失败,并且未显示任何错误消息,请尝试以下步骤。
  1. 以管理员身份登录到 Nexus Repository Manager。
  2. 单击 Server Administration and Configuration (服务器管理和配置) 按钮。
  3. 滚动至 Update stored script by name (按名称更新存储的脚本) API。
  4. name (名称) 参数值中写入 search
  5. 如果尚无搜索脚本,将以下搜索脚本粘贴到 body (主体) 参数的 value (值) 中:
    { "name": "search", "content": "import org.sonatype.nexus.repository.storage.Query; 
    import org.sonatype.nexus.repository.storage.StorageFacet; 
    import org.sonatype.nexus.repository.storage.Query.Builder; 
    import groovy.json.JsonOutput; 
    import groovy.json.JsonSlurper; 
    def search = new JsonSlurper().parseText(args); 
    log.info('search arguments: ' + args); 
    def repositoryId = search.repositoryId; 
    def groupId = search.g; 
    def artifactId = search.a; 
    def version = search.v; 
    def data = []; 
    def repo = repository.repositoryManager.get(repositoryId); 
    StorageFacet storageFacet = repo.facet(StorageFacet); 
    def tx = storageFacet.txSupplier().get(); 
    tx.begin(); 
    def builder = Query.builder(); 
    if(groupId != null){ builder.where('group = ').param(groupId); };
    if(version != null){ if(builder.hasWhere()){ builder.and('version = ').param(version); }else{ builder.where('version = ').param(version); } };
    if(artifactId != null){ artifactId =[artifactId]; log.info('artifactId: ' + artifactId); if(builder.hasWhere()){ builder.and('name in ').param(artifactId); }else{ builder.where('name in ').param(artifactId); } };
    def query = builder.build() ;
    log.info('query: ' + query.getParameters());
    log.info('query: ' + query.getWhere());
    def components = tx.findComponents(query , [repo]);
    components.each{ ArtifactResult artifact = new ArtifactResult(); artifact.groupId = it.attributes().child('maven2').get('groupId'); artifact.artifactId = it.attributes().child('maven2').get('artifactId'); artifact.version = it.attributes().child('maven2').get('baseVersion'); artifact.extension = it.attributes().child('maven2').get('packaging'); artifact.last_updated = it.lastUpdated(); artifact.description = it.attributes().child('maven2').get('pom_description'); log.info('search arguments: ' + it.attributes()); log.info('search getProperties: ' + it.getProperties()); log.info('search getEntityMetadata: ' + it.getEntityMetadata()); log.info('search getMetaPropertyValues: ' + it.getMetaPropertyValues()); data << artifact; };
    tx.commit();
    tx.close();
    return JsonOutput.toJson(data);
    class ArtifactResult{ String groupId; String artifactId; String version; String extension; String last_updated; String description; } ", "type": "groovy" }
  6. 单击 Try it out! (试用)