庫CLI
可以通過將Databricks庫的CLI子命令追加到磚庫
.這些子命令調用庫API 2.0.
Databricks庫-h
用法:databricks libraries [OPTIONS] COMMAND [ARGS]…與庫交互的實用程序。選項:-v,——version [version] -h,——help顯示此信息並退出。命令:all-cluster-status查詢所有庫的狀態。cluster-status獲取集群中所有庫的狀態。選項:——cluster-id CLUSTER_ID可以在https://< databics -instance>/?o=<16-digit-number>#/setting/clusters/$CLUSTER_ID/configuration中找到。install在集群上安裝庫。選項:——cluster-id CLUSTER_ID可以在https://< databics -instance>/?o=<16-digit-number>#/setting/clusters/$CLUSTER_ID/configuration中找到。DBFS或S3或WASB上的jar文本。DBFS或S3或WASB上的蛋。 --whl TEXT Wheel or zipped wheelhouse on DBFS or S3 or WASB. Supported in CLI 0.8.2 and above. --maven-coordinates TEXT Maven coordinates in the form of GroupId:ArtifactId:Version (i.e.org.jsoup:jsoup:1.7.2). --maven-repo TEXT Maven repository to install the Maven package from. If omitted, both Maven Repository and Spark Packages are searched. --maven-exclusion TEXT List of dependences to exclude. For example: --maven-exclusion "slf4j:slf4j" --maven-exclusion "*:hadoop-client". --pypi-package TEXT The name of the PyPI package to install. An optional exact version specification is also supported. Examples "simplejson" and "simplejson==3.8.0". --pypi-repo TEXT The repository where the package can be found. If not specified, the default pip index is used. --cran-package TEXT The name of the CRAN package to install. --cran-repo TEXT The repository where the package can be found. If not specified, the default CRAN repo is used. list Shortcut to `all-cluster-statuses` or `cluster-status`. Options: --cluster-id CLUSTER_ID Can be found in the URL at https:///?o=<16-digit-number>#/setting/clusters/$CLUSTER_ID/configuration. uninstall Uninstall a library on a cluster. Options: --cluster-id CLUSTER_ID Can be found in the URL at https:///?o=<16-digit-number>#/setting/clusters/$CLUSTER_ID/configuration. [required] --all Uninstall all libraries. --jar TEXT JAR on DBFS or S3 or WASB. --egg TEXT Egg on DBFS or S3 or WASB. --whl TEXT Wheel or zipped wheelhouse on DBFS or S3 or WASB. Supported in CLI 0.8.2 and above. --maven-coordinates TEXT Maven coordinates in the form of GroupId:ArtifactId:Version (i.e.org.jsoup:jsoup:1.7.2). --maven-repo TEXT Maven repository to install the Maven package from. If omitted, both Maven Repository and Spark Packages are searched. --maven-exclusion TEXT List of dependences to exclude. For example: --maven-exclusion "slf4j:slf4j" --maven-exclusion "*:hadoop-client". --pypi-package TEXT The name of the PyPI package to install. An optional exact version specification is also supported. Examples "simplejson" and "simplejson==3.8.0". --pypi-repo TEXT The repository where the package can be found. If not specified, the default pip index is used. --cran-package TEXT The name of the CRAN package to install. --cran-repo TEXT The repository where the package can be found. If not specified, the default CRAN repo is used.
列出所有集群上所有庫的狀態
要顯示使用文檔,請運行磚庫all-cluster-statuses——幫助
.
數據庫庫all-cluster-status
{“狀態”:[{“cluster_id”:“1234 - 567890 lest123”,“library_statuses”:({"圖書館":{“罐子”:“dbfs: / FileStore /罐/ bbf81650_a62b_4b7a_b47e_7bdd9505792a-SparkJDBC42.jar”},“狀態”:“安裝”,“is_library_for_all_clusters”:真的},...]},...]}
列出集群中所有庫的狀態
要顯示使用文檔,請運行磚庫集群狀態——幫助
或磚庫列表——幫助
.
數據庫庫集群狀態——集群id1234567890 - lest123
或者:
數據庫庫列表——cluster-id1234567890 - lest123
{“cluster_id”:“1234 - 567890 lest123”,“library_statuses”:({"圖書館":{“罐子”:“dbfs: / FileStore /罐/ bbf81650_a62b_4b7a_b47e_7bdd9505792a-SparkJDBC42.jar”},“狀態”:“安裝”,“is_library_for_all_clusters”:假的},...]}