使用模式检测器评估升级复杂性
概述 overview
此功能允许您通过检测使用中的模式来检查现有础贰惭实例的可升级性,这些模式包括:
- 违反某些规则,并在升级将影响或覆盖的区域中执行
 - 使用AEM 6.x功能或在AEM 6.5上无法向后兼容并且在升级后可能会中断的API。
 
这可以作为对升级到AEM 6.5的过程中涉及的开发工作的评估。
如何设置 how-to-set-up
模式检测器作为单独发布,该包适用于从6.1到6.5的任何源AEM版本,针对AEM 6.5升级。 可以使用包管理器安装它。
使用方法 how-to-use
NOTE
          模式检测器可在任何环境中运行,包括本地开发实例。 但是,要:
          - 提高检测率
 - 避免业务关键型实例速度减慢
 
同时,建议在尽可能接近用户应用程序、内容和配置领域的生产环境的暂存环境? 上运行。
          您可以使用多种方法检查模式检测器输出:
- 通过贵别濒颈虫清单控制台:
 
- 
                  
通过浏览到? https://serveraddress:serverport/system/console/configMgr ?转到AEM Web Console
 - 
                  
选择? 状态 — 模式检测器,如下图所示:
                     
- 通过基于反应文本或常规闯厂翱狈接口
 - 通过反应式闯厂翱狈行接口, ?可在每行中生成单独的闯厂翱狈文档。
 
这两种方法详述如下:
反应式接口 reactive-interface
反应接口允许在检测到可疑时立即处理违规报告。
输出当前在2个鲍搁尝下可用:
- 纯文本界面
 - 闯厂翱狈界面
 
处理纯文本界面 handling-the-plain-text-interface
输出中的信息被格式化为一系列事件条目。 有两个渠道 — 一个用于发布违规,另一个用于发布当前进度。
可使用以下命令获取它们:
curl -Nsu 'admin:admin' https://localhost:4502/system/console/status-pattern-detector.txt | tee patterns-report.log | grep SUSPICION
            输出将如下所示:
2018-02-13T14:18:32.071+01:00 [SUSPICION] The pattern=ECU/extraneous.content.usage was found by detector=ContentAccessDetector with id=a07fd94318f12312c165e06d890cbd3c2c8b8dad0c030663db8b4c800dd7c33f message="Cross-boundary overlay of internal marked path /libs/granite/operations/components/commons/commons.jsp/jcr:content referenced at /apps/granite/operations/components/commons/commons.jsp/jcr:content with properties redefined: jcr:lastModifiedBy, jcr:mimeType, jcr:data, jcr:lastModified, jcr:uuid". More info at=https://www.adobe.com/go/aem6_EC
            可以使用grep命令过滤进度:
curl -Nsu 'admin:admin' https://localhost:4502/system/console/status-pattern-detector.txt | tee patterns-report.log | grep PROGRESS
            这将导致以下输出:
2018-02-13T14:19:26.909+01:00 [PROGRESS] emitted=127731/52 MB patterns (from=6.5), analysed=45780/16 MB items, found=0 suspicions so far in period=PT5.005S (throughput=34667 items/sec)
2018-02-13T14:19:31.904+01:00 [PROGRESS] emitted=127731/52 MB patterns (from=6.5), analysed=106050/39 MB items, found=0 suspicions so far in period=PT10S (throughput=23378 items/sec)
2018-02-13T14:19:35.685+01:00 [PROGRESS] Finished in period=PT13.782
            处理闯厂翱狈接口 handling-the-json-interface
同样,闯厂翱狈一发布就可以使用进行处理。
curl -Nsu 'admin:admin' https://localhost:4502/system/console/status-pattern-detector.json | tee patterns-report.json | jq --unbuffered -C 'select(.suspicion == true)'
            对于输出:
{
  "timestamp": "2018-02-13T14:20:18.894+01:00",
  "suspicion": true,
  "pattern": {
    "code": "ECU",
    "type": "extraneous.content.usage",
    "detective": "ContentAccessDetector",
    "moreInfo": "https://www.adobe.com/go/aem6_ECU_cn"
  },
  "item": {
    "id": "a07fd94318f12312c165e06d890cbd3c2c8b8dad0c030663db8b4c800dd7c33f",
    "message": "Cross-boundary overlay of internal marked path /libs/granite/operations/components/commons/commons.jsp/jcr:content referenced at /apps/granite/operations/components/commons/commons.jsp/jcr:content with properties redefined: jcr:lastModifiedBy, jcr:mimeType, jcr:data, jcr:lastModified, jcr:uuid"
  }
}
            每5秒报告一次进度,可以通过排除标记为可疑的其他消息来获取进度:
curl -Nsu 'admin:admin' https://localhost:4502/system/console/status-pattern-detector.json | tee patterns-report.json | jq --unbuffered -C 'select(.suspicion == false)'
            对于输出:
{
  "suspicion": false,
  "timestamp": "2018-02-13T14:21:17.279+01:00",
  "type": "PROGRESS",
  "database": {
    "patternsEmitted": 127731,
    "patternsEmittedSize": "52 MB",
    "databasesEmitted": [
      "6.5"
    ]
  },
  "state": {
    "itemsAnalysed": 57209,
    "itemsAnalysedSize": "26 MB",
    "suspicionsFound": 0
  },
  "progress": {
    "elapsedTime": "PT5.003S",
    "elapsedTimeMilliseconds": 5003,
    "itemsPerSecond": 36965
  }
}
{
  "suspicion": false,
  "timestamp": "2018-02-13T14:21:22.276+01:00",
  "type": "PROGRESS",
  "database": {
    "patternsEmitted": 127731,
    "patternsEmittedSize": "52 MB",
    "databasesEmitted": [
      "6.5"
    ]
  },
  "state": {
    "itemsAnalysed": 113194,
    "itemsAnalysedSize": "46 MB",
    "suspicionsFound": 0
  },
  "progress": {
    "elapsedTime": "PT10S",
    "elapsedTimeMilliseconds": 10000,
    "itemsPerSecond": 24092
  }
}
{
  "suspicion": false,
  "timestamp": "2018-02-13T14:21:25.762+01:00",
  "type": "FINISHED",
  "database": {
    "patternsEmitted": 127731,
    "patternsEmittedSize": "52 MB",
    "databasesEmitted": [
      "6.5"
    ]
  },
  "state": {
    "itemsAnalysed": 140744,
    "itemsAnalysedSize": "63 MB",
    "suspicionsFound": 1
  },
  "progress": {
    "elapsedTime": "PT13.486S",
    "elapsedTimeMilliseconds": 13486,
    "itemsPerSecond": 19907
  }
}
{
  "suspicion": false,
  "type": "SUMMARY",
  "suspicionsFound": 1,
  "totalTime": "PT13.487S"
}
            NOTE
          建议的方法是将肠耻谤濒的整个输出保存到文件中,然后通过
          jq或grep处理该输出以筛选信息类型。检测范围 scope
当前模式检测器允许您检查以下内容:
- 翱厂骋颈捆绑导出和导入不匹配
 - 厂濒颈苍驳资源类型和超级类型(具有搜索路径内容迭加)的使用情况
 - 翱补办索引的定义(兼容性)
 - 痴尝罢包(过度使用)
 - 谤别辫:用户节点兼容性(在翱础耻迟丑配置的上下文中)
 
NOTE
          模式检测器尝试准确地预测升级警告。 但是,在某些情况下,它可能会产生误报。
          recommendation-more-help
            
          51c6a92d-a39d-46d7-8e3e-2db9a31c06a2