degagne/yarn-resource-manager-api

此包的最新版本(v1.0)没有提供许可信息。

PHP Yarn 资源管理器 REST API 库

v1.0 2017-10-30 13:45 UTC

This package is not auto-updated.

Last update: 2024-09-20 07:28:45 UTC


README

将 yarn-resource-manager-api 包添加到您的 composer.json 文件中。

{
    "require": {
        "degagne/yarn-resource-manager-api": "~1.0"
    }
}

或运行 composer require degagne/yarn-resource-manager-api

基本用法

require_once(__DIR__ . '/vendor/autoload.php');

use YarnResourceManager\ResourceManager;

$parameters = [
        'user'              => 'jdoe',
        'limit'             => 10,
        'states'            => 'KILLED,FAILED,FINISHED',
        'startedTimeBegin'  => '2017-10-10 02:23:12',
        'applicationTypes'  => 'TEZ,SPARK'
];

$rm = new ResourceManager('api_url', 'port', 'format');
$rm->applications($parameters);