来自CLI

时间:2018-06-13 22:28:56

标签: streamsets

我目前正在编写通过CLI在本地安装流集扩展的代码。我想写的一个检查是确保扩展适用于本地安装的流集版本。

当我尝试从CLI查询版本时,这就是我遇到的问题。

:) streamsets --version

Invalid sub-command

streamsets <SUB_COMMAND> [<SUB_COMMAND_ARGUMENTS>]

  Sub-commands:

    dc: Starts the Data Collector

    create-dc: Creates new instance of Data Collector

    cli: Data Collector CLI

    jks-cs: Java Keystore Credential Store

    stagelibs: Data Collector Stage library installer

    show-vault-id: Shows the user-id to authorize in Vault

    setup-mapr: Enables the MapR stage library for the detected
                MapR installation.
:( streamsets cli --version
Found unexpected parameters: [--version]
) streamsets dc --version

Invalid option(s)

streamsets dc <OPTIONS>

  Options:
    -verbose          : prints out Data Collector detailed environment settings
    -exec             : starts Data Collector JVM within the same process of the script
    -skipenvsourcing  : skips the sourcing of the libexec/sdc-env.sh file

除了遍历文件系统和查找VERSION文件之外,我如何确定安装了哪些版本的流集?

1 个答案:

答案 0 :(得分:2)

您可以使用CLI的ping命令获取Data Collector的信息,包括版本:

$ streamsets cli -U http://localhost:18630 ping
{
  "info" : {
    "built.date" : "2018-06-13T23:02Z",
    "version" : "3.4.0-SNAPSHOT",
    "built.repo.sha" : "9f803ed0f5167bbb91af2493b20c9a20b566106f",
    "source.md5.checksum" : "1d59dbb2281a974f4b192a28efe7624c",
    "built.by" : "pat"
  },
  "version" : "3.4.0-SNAPSHOT",
  "builtDate" : "2018-06-13T23:02Z",
  "builtBy" : "pat",
  "builtRepoSha" : "9f803ed0f5167bbb91af2493b20c9a20b566106f",
  "sourceMd5Checksum" : "1d59dbb2281a974f4b192a28efe7624c"
}

system infoping

的同义词

尚未记录。我会打开一个文档Jira这样做。