zfs.tier.rewrite_job_query
==========================

Subscribe to ZFS rewrite job collection events (ADDED, CHANGED, REMOVED).
On subscribe, sends ADDED for all existing jobs, then polls every 5 seconds
and fires CHANGED when a job transitions state or REMOVED when it disappears.

This event is generated by a dynamic source. If you want to specify subscription params, subscribe to it using the name in the following format `zfs.tier.rewrite_job_query:{"param": "value"}`

.. raw:: html

    <div id="json-schema">
    <span class="badge badge-dark value-type">Type: object</span><br/>
    <div class="accordion" id="accordionSubscription_parameters">
    <div class="card">
    <div class="card-header" id="headingSubscription_parameters">
    <h2 class="mb-0">
    <button aria-controls="Subscription_parameters" aria-expanded="" class="btn btn-link property-name-button" data-target="#Subscription_parameters" data-toggle="collapse" onclick="setAnchor('#Subscription_parameters')" type="button"><span class="property-name">Subscription parameters</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingSubscription_parameters" class="collapse property-definition-div" data-parent="#accordionSubscription_parameters" id="Subscription_parameters">
    <div class="card-body pl-5">
    <h4>ZfsTierRewriteJobQueryEventSourceArgs</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="description"><p>No arguments — subscribes to all rewrite job lifecycle events.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionADDED">
    <div class="card">
    <div class="card-header" id="headingADDED">
    <h2 class="mb-0">
    <button aria-controls="ADDED" aria-expanded="" class="btn btn-link property-name-button" data-target="#ADDED" data-toggle="collapse" onclick="setAnchor('#ADDED')" type="button"><span class="property-name">ADDED</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingADDED" class="collapse property-definition-div" data-parent="#accordionADDED" id="ADDED">
    <div class="card-body pl-5">
    <h4>ZfsTierRewriteJobQueryEventSourceEvent</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="badge badge-info no-additional">No Additional Properties</span>
    <div class="accordion" id="accordionADDED_fields">
    <div class="card">
    <div class="card-header" id="headingADDED_fields">
    <h2 class="mb-0">
    <button aria-controls="ADDED_fields" aria-expanded="" class="btn btn-link property-name-button" data-target="#ADDED_fields" data-toggle="collapse" onclick="setAnchor('#ADDED_fields')" type="button"><span class="property-name">fields</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingADDED_fields" class="collapse property-definition-div" data-parent="#accordionADDED_fields" id="ADDED_fields">
    <div class="card-body pl-5">
    <h4>ZfsTierRewriteJobQueryEventSourceEvent</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="badge badge-info no-additional">No Additional Properties</span>
    <div class="accordion" id="accordionADDED_fields_fields">
    <div class="card">
    <div class="card-header" id="headingADDED_fields_fields">
    <h2 class="mb-0">
    <button aria-controls="ADDED_fields_fields" aria-expanded="" class="btn btn-link property-name-button" data-target="#ADDED_fields_fields" data-toggle="collapse" onclick="setAnchor('#ADDED_fields_fields')" type="button"><span class="property-name">fields</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingADDED_fields_fields" class="collapse property-definition-div" data-parent="#accordionADDED_fields_fields" id="ADDED_fields_fields">
    <div class="card-body pl-5">
    <h4>ZfsTierRewriteJobEntry</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="description"><p>Current job entry reflecting the latest lifecycle state.</p>
    </span> <span class="badge badge-info no-additional">No Additional Properties</span>
    <div class="accordion" id="accordionADDED_fields_fields_tier_job_id">
    <div class="card">
    <div class="card-header" id="headingADDED_fields_fields_tier_job_id">
    <h2 class="mb-0">
    <button aria-controls="ADDED_fields_fields_tier_job_id" aria-expanded="" class="btn btn-link property-name-button" data-target="#ADDED_fields_fields_tier_job_id" data-toggle="collapse" onclick="setAnchor('#ADDED_fields_fields_tier_job_id')" type="button"><span class="property-name">tier_job_id</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingADDED_fields_fields_tier_job_id" class="collapse property-definition-div" data-parent="#accordionADDED_fields_fields_tier_job_id" id="ADDED_fields_fields_tier_job_id">
    <div class="card-body pl-5">
    <h4>Tier Job Id</h4><span class="badge badge-dark value-type">Type: string</span><br/>
    <span class="description"><p>Rewrite job identifier in <code>dataset_name@job_uuid</code> format.</p>
    </span>
    <p><span class="badge badge-light restriction min-length-restriction" id="ADDED_fields_fields_tier_job_id_minLength">Must be at least <code>1</code> characters long</span></p>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionADDED_fields_fields_dataset_name">
    <div class="card">
    <div class="card-header" id="headingADDED_fields_fields_dataset_name">
    <h2 class="mb-0">
    <button aria-controls="ADDED_fields_fields_dataset_name" aria-expanded="" class="btn btn-link property-name-button" data-target="#ADDED_fields_fields_dataset_name" data-toggle="collapse" onclick="setAnchor('#ADDED_fields_fields_dataset_name')" type="button"><span class="property-name">dataset_name</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingADDED_fields_fields_dataset_name" class="collapse property-definition-div" data-parent="#accordionADDED_fields_fields_dataset_name" id="ADDED_fields_fields_dataset_name">
    <div class="card-body pl-5">
    <h4>Dataset Name</h4><span class="badge badge-dark value-type">Type: string</span><br/>
    <span class="description"><p>ZFS dataset this job is operating on.</p>
    </span>
    <p><span class="badge badge-light restriction min-length-restriction" id="ADDED_fields_fields_dataset_name_minLength">Must be at least <code>1</code> characters long</span></p>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionADDED_fields_fields_job_uuid">
    <div class="card">
    <div class="card-header" id="headingADDED_fields_fields_job_uuid">
    <h2 class="mb-0">
    <button aria-controls="ADDED_fields_fields_job_uuid" aria-expanded="" class="btn btn-link property-name-button" data-target="#ADDED_fields_fields_job_uuid" data-toggle="collapse" onclick="setAnchor('#ADDED_fields_fields_job_uuid')" type="button"><span class="property-name">job_uuid</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingADDED_fields_fields_job_uuid" class="collapse property-definition-div" data-parent="#accordionADDED_fields_fields_job_uuid" id="ADDED_fields_fields_job_uuid">
    <div class="card-body pl-5">
    <h4>Job Uuid</h4><span class="badge badge-dark value-type">Type: string</span><br/>
    <span class="description"><p>Unique identifier for this rewrite job.</p>
    </span>
    <p><span class="badge badge-light restriction min-length-restriction" id="ADDED_fields_fields_job_uuid_minLength">Must be at least <code>1</code> characters long</span></p>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionADDED_fields_fields_status">
    <div class="card">
    <div class="card-header" id="headingADDED_fields_fields_status">
    <h2 class="mb-0">
    <button aria-controls="ADDED_fields_fields_status" aria-expanded="" class="btn btn-link property-name-button" data-target="#ADDED_fields_fields_status" data-toggle="collapse" onclick="setAnchor('#ADDED_fields_fields_status')" type="button"><span class="property-name">status</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingADDED_fields_fields_status" class="collapse property-definition-div" data-parent="#accordionADDED_fields_fields_status" id="ADDED_fields_fields_status">
    <div class="card-body pl-5">
    <h4>Status</h4><span class="badge badge-dark value-type">Type: enum (of string)</span><br/>
    <span class="description"><p>Current lifecycle state of the job.</p>
    <ul>
    <li><code>COMPLETE</code> - All files in the dataset have been processed.</li>
    <li><code>RUNNING</code> - Job is actively processing files.</li>
    <li><code>QUEUED</code> - Job is waiting for a free execution slot (see <code>max_concurrent_jobs</code>).</li>
    <li><code>CANCELLED</code> - Job was stopped via <code>zfs_tier_job.cancel</code>. Not resumable.</li>
    <li><code>STOPPED</code> - Job was RUNNING but its process is no longer active (e.g. daemon restart). This state is computed on read and is never written to persistent storage.</li>
    <li><code>ERROR</code> - Job halted due to an unrecoverable error. Use <code>zfs_tier_job.recover</code> to retry failed files.</li>
    </ul>
    </span><div class="enum-value" id="ADDED_fields_fields_status_enum">
    <h5>Must be one of:</h5>
    <ul class="list-group"><li class="list-group-item enum-item">"COMPLETE"</li><li class="list-group-item enum-item">"RUNNING"</li><li class="list-group-item enum-item">"QUEUED"</li><li class="list-group-item enum-item">"CANCELLED"</li><li class="list-group-item enum-item">"STOPPED"</li><li class="list-group-item enum-item">"ERROR"</li></ul>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div><br><br>

*Required roles:* DATASET_READ

