| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <title>Apache Aurora</title> |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> |
| <link href="/assets/css/main.css" rel="stylesheet"> |
| <!-- Analytics --> |
| <script type="text/javascript"> |
| var _gaq = _gaq || []; |
| _gaq.push(['_setAccount', 'UA-45879646-1']); |
| _gaq.push(['_setDomainName', 'apache.org']); |
| _gaq.push(['_trackPageview']); |
| |
| (function() { |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| })(); |
| </script> |
| </head> |
| <body> |
| <div class="container-fluid section-header"> |
| <div class="container"> |
| <div class="nav nav-bar"> |
| <a href="/"><img src="/assets/img/aurora_logo_dkbkg.svg" width="300" alt="Transparent Apache Aurora logo with dark background"/></a> |
| <ul class="nav navbar-nav navbar-right"> |
| <li><a href="/documentation/latest/">Documentation</a></li> |
| <li><a href="/community/">Community</a></li> |
| <li><a href="/downloads/">Downloads</a></li> |
| <li><a href="/blog/">Blog</a></li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| |
| <div class="container-fluid"> |
| <div class="container content"> |
| <div class="col-md-12 documentation"> |
| <h5 class="page-header text-uppercase">Documentation |
| <select onChange="window.location.href='/documentation/' + this.value + '/thrift-deprecation/'" |
| value="0.11.0"> |
| <option value="0.22.0" |
| > |
| 0.22.0 |
| (latest) |
| </option> |
| <option value="0.21.0" |
| > |
| 0.21.0 |
| </option> |
| <option value="0.20.0" |
| > |
| 0.20.0 |
| </option> |
| <option value="0.19.1" |
| > |
| 0.19.1 |
| </option> |
| <option value="0.19.0" |
| > |
| 0.19.0 |
| </option> |
| <option value="0.18.1" |
| > |
| 0.18.1 |
| </option> |
| <option value="0.18.0" |
| > |
| 0.18.0 |
| </option> |
| <option value="0.17.0" |
| > |
| 0.17.0 |
| </option> |
| <option value="0.16.0" |
| > |
| 0.16.0 |
| </option> |
| <option value="0.15.0" |
| > |
| 0.15.0 |
| </option> |
| <option value="0.14.0" |
| > |
| 0.14.0 |
| </option> |
| <option value="0.13.0" |
| > |
| 0.13.0 |
| </option> |
| <option value="0.12.0" |
| > |
| 0.12.0 |
| </option> |
| <option value="0.11.0" |
| selected="selected"> |
| 0.11.0 |
| </option> |
| <option value="0.10.0" |
| > |
| 0.10.0 |
| </option> |
| <option value="0.9.0" |
| > |
| 0.9.0 |
| </option> |
| <option value="0.8.0" |
| > |
| 0.8.0 |
| </option> |
| <option value="0.7.0-incubating" |
| > |
| 0.7.0-incubating |
| </option> |
| <option value="0.6.0-incubating" |
| > |
| 0.6.0-incubating |
| </option> |
| <option value="0.5.0-incubating" |
| > |
| 0.5.0-incubating |
| </option> |
| </select> |
| </h5> |
| <h1 id="thrift-api-changes">Thrift API Changes</h1> |
| |
| <h2 id="overview">Overview</h2> |
| |
| <p>Aurora uses <a href="https://thrift.apache.org/">Apache Thrift</a> for representing structured data in |
| client/server RPC protocol as well as for internal data storage. While Thrift is capable of |
| correctly handling additions and renames of the existing members, field removals must be done |
| carefully to ensure backwards compatibility and provide predictable deprecation cycle. This |
| document describes general guidelines for making Thrift schema changes to the existing fields in |
| <a href="https://github.com/apache/aurora/blob/#{git_tag}/api/src/main/thrift/org/apache/aurora/gen/api.thrift">api.thrift</a>).</p> |
| |
| <p>It is highly recommended to go through the |
| <a href="http://diwakergupta.github.io/thrift-missing-guide/">Thrift: The Missing Guide</a> first to refresh on |
| basic Thrift schema concepts.</p> |
| |
| <h2 id="checklist">Checklist</h2> |
| |
| <p>Every existing Thrift schema modification is unique in its requirements and must be analyzed |
| carefully to identify its scope and expected consequences. The following checklist may help in that |
| analysis: |
| * Is this a new field/struct? If yes, go ahead |
| * Is this a pure field/struct rename without any type/structure change? If yes, go ahead and rename |
| * Anything else, read further to make sure your change is properly planned</p> |
| |
| <h2 id="deprecation-cycle">Deprecation cycle</h2> |
| |
| <p>Any time a breaking change (e.g.: field replacement or removal) is required, the following cycle |
| must be followed:</p> |
| |
| <h3 id="vcurrent">vCurrent</h3> |
| |
| <p>Change is applied in a way that does not break scheduler/client with this version to |
| communicate with scheduler/client from vCurrent-1. |
| * Do not remove or rename the old field |
| * Add a new field as an eventual replacement of the old one and implement a dual read/write |
| anywhere the old field is used |
| * Check <a href="https://github.com/apache/aurora/blob/#{git_tag}/api/src/main/thrift/org/apache/aurora/gen/storage.thrift">storage.thrift</a>) to see if the |
| affected struct is stored in Aurora scheduler storage. If so, you most likely need to backfill |
| existing data to ensure both fields are populated eagerly on startup |
| See <a href="https://github.com/apache/aurora/blob/#{git_tag}/src/main/java/org/apache/aurora/scheduler/storage/StorageBackfill.java">StorageBackfill.java</a>) |
| * Add a deprecation jira ticket into the vCurrent+1 release candidate |
| * Add a TODO for the deprecated field mentioning the jira ticket</p> |
| |
| <h3 id="vcurrent-1">vCurrent+1</h3> |
| |
| <p>Finalize the change by removing the deprecated fields from the Thrift schema. |
| * Drop any dual read/write routines added in the previous version |
| * Remove the deprecated Thrift field</p> |
| |
| <h2 id="testing">Testing</h2> |
| |
| <p>It’s always advisable to test your changes in the local vagrant environment to build more |
| confidence that you change is backwards compatible. It’s easy to simulate different |
| client/scheduler versions by playing with <code>aurorabuild</code> command. See <a href="/documentation/0.11.0/vagrant/">this document</a> |
| for more.</p> |
| |
| </div> |
| |
| </div> |
| </div> |
| <div class="container-fluid section-footer buffer"> |
| <div class="container"> |
| <div class="row"> |
| <div class="col-md-2 col-md-offset-1"><h3>Quick Links</h3> |
| <ul> |
| <li><a href="/downloads/">Downloads</a></li> |
| <li><a href="/community/">Mailing Lists</a></li> |
| <li><a href="http://issues.apache.org/jira/browse/AURORA">Issue Tracking</a></li> |
| <li><a href="/documentation/latest/contributing/">How To Contribute</a></li> |
| </ul> |
| </div> |
| <div class="col-md-2"><h3>The ASF</h3> |
| <ul> |
| <li><a href="http://www.apache.org/licenses/">License</a></li> |
| <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> |
| <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li> |
| <li><a href="http://www.apache.org/security/">Security</a></li> |
| </ul> |
| </div> |
| <div class="col-md-6"> |
| <p class="disclaimer">© 2014-2017 <a href="http://www.apache.org/">Apache Software Foundation</a>. Licensed under the <a href="http://www.apache.org/licenses/">Apache License v2.0</a>. The <a href="https://www.flickr.com/photos/trondk/12706051375/">Aurora Borealis IX photo</a> displayed on the homepage is available under a <a href="https://creativecommons.org/licenses/by-nc-nd/2.0/">Creative Commons BY-NC-ND 2.0 license</a>. Apache, Apache Aurora, and the Apache feather logo are trademarks of The Apache Software Foundation.</p> |
| </div> |
| </div> |
| </div> |
| |
| </body> |
| </html> |