PHP code example of degagne / yarn-resource-manager-api
1. Go to this page and download the library: Download degagne/yarn-resource-manager-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
degagne / yarn-resource-manager-api example snippets
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);