blob: 257006a99c8b59c2a6f2c0b150798c638b11f95d [file] [log] [blame]
<!doctype html><html lang=en class=no-js><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=generator content="Hugo 0.111.3"><link rel=alternate type=text/html href=/update-site/project/how-to-contribute/_print/><link rel=alternate type=application/rss+xml href=/update-site/project/how-to-contribute/index.xml><meta name=robots content="index, follow"><link rel=apple-touch-icon sizes=57x57 href=https://apache.org/favicons/apple-touch-icon-57x57.png><link rel=apple-touch-icon sizes=60x60 href=https://apache.org/favicons/apple-touch-icon-60x60.png><link rel=apple-touch-icon sizes=72x72 href=https://apache.org/favicons/apple-touch-icon-72x72.png><link rel=apple-touch-icon sizes=76x76 href=https://apache.org/favicons/apple-touch-icon-76x76.png><link rel=apple-touch-icon sizes=114x114 href=https://apache.org/favicons/apple-touch-icon-114x114.png><link rel=apple-touch-icon sizes=120x120 href=https://apache.org/favicons/apple-touch-icon-120x120.png><link rel=apple-touch-icon sizes=144x144 href=https://apache.org/favicons/apple-touch-icon-144x144.png><link rel=apple-touch-icon sizes=152x152 href=https://apache.org/favicons/apple-touch-icon-152x152.png><link rel=apple-touch-icon sizes=180x180 href=https://apache.org/favicons/apple-touch-icon-180x180.png><link rel=icon type=image/png href=https://apache.org/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=https://apache.org/favicons/favicon-194x194.png sizes=194x194><link rel=icon type=image/png href=https://apache.org/favicons/favicon-96x96.png sizes=96x96><link rel=icon type=image/png href=https://apache.org/favicons/android-chrome-192x192.png sizes=192x192><link rel=icon type=image/png href=https://apache.org/favicons/favicon-16x16.png sizes=16x16><link rel=manifest href=https://apache.org/favicons/manifest.json><link rel="shortcut icon" href=https://apache.org/favicons/favicon.ico><title>How to contribute | Apache Avro</title><meta name=description content><meta property="og:title" content="How to contribute"><meta property="og:description" content><meta property="og:type" content="website"><meta property="og:url" content="/update-site/project/how-to-contribute/"><meta property="og:site_name" content="Apache Avro"><meta itemprop=name content="How to contribute"><meta itemprop=description content><meta name=twitter:card content="summary"><meta name=twitter:title content="How to contribute"><meta name=twitter:description content><link rel=preload href=/update-site/scss/main.min.6deb8a211453721a965671b611280fb11af8ef2def6b7a2b0a34f6a94939360f.css as=style><link href=/update-site/scss/main.min.6deb8a211453721a965671b611280fb11af8ef2def6b7a2b0a34f6a94939360f.css rel=stylesheet integrity><script src=https://code.jquery.com/jquery-3.5.1.min.js integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin=anonymous></script>
<link rel=stylesheet href=/css/prism.css></head><body class=td-section><header><nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar"><a class=navbar-brand href=/update-site/><span class=navbar-logo><img src=/docs/++version++/logo.svg width=100 height=30 style="margin:0 10px"></span><span class="text-uppercase font-weight-bold">Apache Avro</span></a><div class="td-navbar-nav-scroll ml-md-auto" id=main_navbar><ul class="navbar-nav mt-2 mt-lg-0"><li class="nav-item mr-4 mb-2 mb-lg-0"><a class="nav-link active" href=/update-site/project/><span class=active>Project</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/update-site/blog/><span>Blog</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/update-site/community/><span>Community</span></a></li><li class="nav-item dropdown mr-4 d-none d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>Documentation</a><div class=dropdown-menu aria-labelledby=navbarDropdownMenuLink><a class=dropdown-item href=./docs/++version++/>++version++ (Current)</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.11.0/>1.11.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.10.2/>1.10.2</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.10.1/>1.10.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.10.0/>1.10.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.9.2/>1.9.2</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.9.1/>1.9.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.9.0/>1.9.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.8.2/>1.8.2</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.8.1/>1.8.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.8.0/>1.8.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.7/>1.7.7</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.6/>1.7.6</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.5/>1.7.5</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.4/>1.7.4</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.3/>1.7.3</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.2/>1.7.2</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.1/>1.7.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.7.0/>1.7.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.6.3/>1.6.3</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.6.2/>1.6.2</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.6.1/>1.6.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.6.0/>1.6.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.5.4/>1.5.4</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.5.3/>1.5.3</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.5.2/>1.5.2</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.5.1/>1.5.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.5.0/>1.5.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.4.1/>1.4.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.4.0/>1.4.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.3.3/>1.3.3</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.3.2/>1.3.2</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.3.1/>1.3.1</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.3.0/>1.3.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.2.0/>1.2.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.1.0/>1.1.0</a>
<a class=dropdown-item href=https://avro.apache.org/docs/1.0.0/>1.0.0</a></div></li><li class="nav-item dropdown mr-4 d-none d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>ASF links</a><div class=dropdown-menu aria-labelledby=navbarDropdownMenuLink><a class=dropdown-item href=http://www.apache.org/ target=_blank>ASF Web Site</a>
<a class=dropdown-item href=http://www.apache.org/licenses/ target=_blank>License</a>
<a class=dropdown-item href=http://www.apache.org/foundation/sponsorship.html target=_blank>Donate</a>
<a class=dropdown-item href=http://www.apache.org/foundation/thanks.html target=_blank>Thanks</a>
<a class=dropdown-item href=http://www.apache.org/security/ target=_blank>Security</a></div></li></ul></div><div class="navbar-nav d-none d-lg-block"></div></nav></header><div class="container-fluid td-outer"><div class=td-main><div class="row flex-xl-nowrap"><aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none"><div id=td-sidebar-menu class=td-sidebar__inner><div id=content-mobile><form class="td-sidebar__search d-flex align-items-center"><button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type=button data-toggle=collapse data-target=#td-section-nav aria-controls=td-docs-nav aria-expanded=false aria-label="Toggle section navigation"></button></form></div><div id=content-desktop></div><nav class="collapse td-sidebar-nav foldable-nav" id=td-section-nav><ul class="td-sidebar-nav__section pr-md-3 ul-0"><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child active-path" id=m-update-siteproject-li><a href=/update-site/project/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section tree-root" id=m-update-siteproject><span>Project</span></a><ul class=ul-1><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectdownload-li><input type=checkbox id=m-update-siteprojectdownload-check>
<label for=m-update-siteprojectdownload-check><a href=/update-site/project/download/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectdownload><span>Download</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectcredits-li><input type=checkbox id=m-update-siteprojectcredits-check>
<label for=m-update-siteprojectcredits-check><a href=/update-site/project/credits/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectcredits><span>Credits</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectpapers-li><input type=checkbox id=m-update-siteprojectpapers-check>
<label for=m-update-siteprojectpapers-check><a href=/update-site/project/papers/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectpapers><span>Papers</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectarticles-li><input type=checkbox id=m-update-siteprojectarticles-check>
<label for=m-update-siteprojectarticles-check><a href=/update-site/project/articles/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectarticles><span>Articles</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojecthow-to-contribute-li><input type=checkbox id=m-update-siteprojecthow-to-contribute-check>
<label for=m-update-siteprojecthow-to-contribute-check><a href=/update-site/project/how-to-contribute/ class="align-left pl-0 active td-sidebar-link td-sidebar-link__section" id=m-update-siteprojecthow-to-contribute><span class=td-sidebar-nav-active-item>How to contribute</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectpmc-onboarding-guide-li><input type=checkbox id=m-update-siteprojectpmc-onboarding-guide-check>
<label for=m-update-siteprojectpmc-onboarding-guide-check><a href=/update-site/project/pmc-onboarding-guide/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectpmc-onboarding-guide><span>PMC onboarding guide</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectcommitter-onboarding-guide-li><input type=checkbox id=m-update-siteprojectcommitter-onboarding-guide-check>
<label for=m-update-siteprojectcommitter-onboarding-guide-check><a href=/update-site/project/committer-onboarding-guide/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectcommitter-onboarding-guide><span>Committer onboarding guide</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectcontributors-onboarding-guide--li><input type=checkbox id=m-update-siteprojectcontributors-onboarding-guide--check>
<label for=m-update-siteprojectcontributors-onboarding-guide--check><a href=/update-site/project/contributors-onboarding-guide-/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectcontributors-onboarding-guide-><span>Contributor onboarding guide</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectprivacy-policy-li><input type=checkbox id=m-update-siteprojectprivacy-policy-check>
<label for=m-update-siteprojectprivacy-policy-check><a href=https://hadoop.apache.org/privacy_policy.html class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectprivacy-policy><span>Privacy policy</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectsecurity-li><input type=checkbox id=m-update-siteprojectsecurity-check>
<label for=m-update-siteprojectsecurity-check><a href=https://www.apache.org/security/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectsecurity><span>Security</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectlicense-li><input type=checkbox id=m-update-siteprojectlicense-check>
<label for=m-update-siteprojectlicense-check><a href=https://www.apache.org/licenses/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectlicense><span>License</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectevents-li><input type=checkbox id=m-update-siteprojectevents-check>
<label for=m-update-siteprojectevents-check><a href=/update-site/project/events/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectevents><span>Events</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectdonate-li><input type=checkbox id=m-update-siteprojectdonate-check>
<label for=m-update-siteprojectdonate-check><a href=https://www.apache.org/foundation/sponsorship.html class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectdonate><span>Donate</span></a></label></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id=m-update-siteprojectthanks-li><input type=checkbox id=m-update-siteprojectthanks-check>
<label for=m-update-siteprojectthanks-check><a href=https://www.apache.org/foundation/thanks.html class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-update-siteprojectthanks><span>Thanks</span></a></label></li></ul></li></ul></nav></div></aside><aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none"><div class="td-page-meta ml-2 pb-1 pt-2 mb-0"><a href=https://github.com/apache/avro/tree/master/doc/content/en/project/How%20to%20contribute/_index.md class=td-page-meta--view target=_blank rel=noopener><i class="fa fa-file-alt fa-fw"></i> View page source</a>
<a href=https://github.com/apache/avro/edit/master/doc/content/en/project/How%20to%20contribute/_index.md class=td-page-meta--edit target=_blank rel=noopener><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/apache/avro/new/master/doc/content/en/project/How%20to%20contribute/_index.md?filename=change-me.md&amp;value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A" class=td-page-meta--child target=_blank rel=noopener><i class="fa fa-edit fa-fw"></i> Create child page</a>
<a href="https://github.com/apache/avro/issues/new?title=How%20to%20contribute" class=td-page-meta--issue target=_blank rel=noopener><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href=https://github.com/apache/avro/issues/new class=td-page-meta--project-issue target=_blank rel=noopener><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
<a id=print href=/update-site/project/how-to-contribute/_print/><i class="fa fa-print fa-fw"></i> Print entire section</a></div><div class=td-toc><nav id=TableOfContents><ul><li><a href=#getting-the-source-code>Getting the source code</a></li><li><a href=#making-changes>Making Changes</a></li><li><a href=#code-style-autoformatting>Code Style (Autoformatting)</a></li><li><a href=#unit-tests>Unit Tests</a></li><li><a href=#contributing-your-code>Contributing your code</a></li><li><a href=#jira-guidelines>Jira Guidelines</a></li><li><a href=#stay-involved>Stay involved</a></li><li><a href=#workflow>Workflow</a></li><li><a href=#running-a-container-locally>Running a container locally</a></li><li><a href=#troubleshooting>Troubleshooting</a></li><li><a href=#edit-content>Edit content</a></li><li><a href=#jira-conventions>JIRA conventions</a></li><li><a href=#see-also>See Also</a></li></ul></nav></div><div class="taxonomy taxonomy-terms-cloud taxo-tags"><h5 class=taxonomy-title>Tag Cloud</h5><ul class=taxonomy-terms><li><a class=taxonomy-term href=/update-site/tags/java/ data-taxonomy-term=java><span class=taxonomy-label>java</span><span class=taxonomy-count>1</span></a></li><li><a class=taxonomy-term href=/update-site/tags/python/ data-taxonomy-term=python><span class=taxonomy-label>python</span><span class=taxonomy-count>1</span></a></li></ul></div></aside><main class="col-12 col-md-9 col-xl-8 pl-md-5" role=main><nav aria-label=breadcrumb class=td-breadcrumbs><ol class=breadcrumb><li class=breadcrumb-item><a href=/update-site/project/>Project</a></li><li class="breadcrumb-item active" aria-current=page><a href=/update-site/project/how-to-contribute/>How to contribute</a></li></ol></nav><div class=td-content><h1>How to contribute</h1><header class=article-meta><p class=reading-time><i class="fa fa-clock" aria-hidden=true></i>&nbsp; 7 minute read &nbsp;</p></header><h2 id=getting-the-source-code>Getting the source code</h2><p>First of all, you need the Avro source code.</p><p>The easiest way is to clone or fork the GitHub mirror:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>git clone https://github.com/apache/avro.git -o github
</span></span></code></pre></div><h2 id=making-changes>Making Changes</h2><p>Before you start, file an issue in <a href=https://issues.apache.org/jira/browse/AVRO>JIRA</a> or discuss your ideas on the <a href=http://avro.apache.org/mailing_lists.html>Avro developer mailing list</a>. Describe your proposed changes and check that they fit in with what others are doing and have planned for the project. Be patient, it may take folks a while to understand your requirements.</p><p>Modify the source code and add some (very) nice features using your favorite IDE.</p><p>But take care about the following points</p><p><strong>All Languages</strong></p><ul><li>Contributions should pass existing unit tests.</li><li>Contributions should document public facing APIs.</li><li>Contributions should add new tests to demonstrate bug fixes or test new features.</li></ul><p><strong>Java</strong></p><ul><li>All public classes and methods should have informative <a href=https://www.oracle.com/fr/technical-resources/articles/java/javadoc-tool.html>Javadoc comments</a>.</li><li>Do not use @author tags.</li><li>Java code should be formatted according to <a href=https://www.oracle.com/java/technologies/javase/codeconventions-introduction.html>Oracle&rsquo;s conventions</a>, with one exception:<ul><li>Indent two spaces per level, not four.</li></ul></li><li><a href=http://www.junit.org/>JUnit</a> is our test framework:</li><li>You must implement a class whose class name starts with Test.</li><li>Define methods within your class and tag them with the @Test annotation. Call JUnit&rsquo;s many assert methods to verify conditions; these methods will be executed when you run mvn test.</li><li>By default, do not let tests write any temporary files to /tmp. Instead, the tests should write to the location specified by the test.dir system property.</li><li>Place your class in the src/test/java/ tree.</li><li>You can run all the unit tests with the command mvn test, or you can run a specific unit test with the command mvn -Dtest=&lt;class name, fully qualified or short name> test (for example mvn -Dtest=TestFoo test)</li></ul><h2 id=code-style-autoformatting>Code Style (Autoformatting)</h2><p>For Java code we use <a href=https://github.com/diffplug/spotless/>Spotless</a> to format the code to comply with Avro&rsquo;s code style conventions (see above). Automatic formatting relies on <a href=https://github.com/apache/avro/blob/master/lang/java/eclipse-java-formatter.xml>Avro&rsquo;s Eclipse JDT formatter definition</a>. You can use the same definition to auto format from Eclipse or from IntelliJ configuring the Eclipse formatter plugin.</p><p>If you use maven code styles issues are checked at the compile phase. If your code breaks because of bad formatting, you can format it automatically by running the command:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>mvn spotless:apply
</span></span></code></pre></div><h2 id=unit-tests>Unit Tests</h2><p>Please make sure that all unit tests succeed before constructing your patch and that no new compiler warnings are introduced by your patch. Each language has its own directory and test process.</p><details><summary>Java</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/java
</span></span><span style=display:flex><span>mvn clean <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><details><summary>Python</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/py
</span></span><span style=display:flex><span>./setup.py build <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><details><summary><a href=https://www.rust-lang.org/>Rust</a></summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/rust
</span></span><span style=display:flex><span>./build.sh clean <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><details><summary>C#</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/csharp
</span></span><span style=display:flex><span>./build.sh clean <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><details><summary>C</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/c
</span></span><span style=display:flex><span>./build.sh clean
</span></span><span style=display:flex><span>./build.sh <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><details><summary>C++</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/c++
</span></span><span style=display:flex><span>./build.sh clean <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><details><summary>Ruby</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/ruby
</span></span><span style=display:flex><span>gem install echoe
</span></span><span style=display:flex><span>rake clean <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><details><summary>PHP</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> avro-trunk/lang/php
</span></span><span style=display:flex><span>./build.sh clean
</span></span><span style=display:flex><span>./build.sh <span style=color:#204a87>test</span>
</span></span></code></pre></div></details><h2 id=contributing-your-code>Contributing your code</h2><p>Contribution can be made directly via github with a Pull Request, or via a patch.</p><p><strong>Via Github</strong></p><p>Method is to create a <a href=https://help.github.com/articles/using-pull-requests/>pull request</a>.</p><p>On your fork, create a branch named with JIRA (avro-1234_fixNpe for example)
On source, go to it</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>git pull
</span></span><span style=display:flex><span>git switch avro-1234_fixNpe
</span></span></code></pre></div><p>code your changes (following preceding recommendations)</p><p>check and add updated sources</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>git status
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Add any new or changed files with:</span>
</span></span><span style=display:flex><span>git add src/.../MyNewClass.java
</span></span><span style=display:flex><span>git add src/.../TestMyNewClass.java
</span></span></code></pre></div><p>Finally, create a commit with your changes and a good log message, and push it:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>git commit -m <span style=color:#4e9a06>&#34;AVRO-1234: Fix NPE by adding check to ...&#34;</span>
</span></span><span style=display:flex><span>git push
</span></span></code></pre></div><p>On your github fork site, a button will propose you to build the Pull Request.
Click on it, fill Conversation form, and create it.
Link this PR to the corresponding JIRA ticket (on JIRA ticket, add PR to &ldquo;Issue Links&rdquo; chapter, and add label &lsquo;pull-request-available&rsquo; to it .</p><h2 id=jira-guidelines>Jira Guidelines</h2><p>Please comment on issues in <a href=https://issues.apache.org/jira/projects/AVRO/issues>Jira</a>, making your concerns known. Please also vote for issues that are a high priority for you.</p><p>Please refrain from editing descriptions and comments if possible, as edits spam the mailing list and clutter Jira&rsquo;s &ldquo;All&rdquo; display, which is otherwise very useful. Instead, preview descriptions and comments using the preview button (on the right) before posting them. Keep descriptions brief and save more elaborate proposals for comments, since descriptions are included in Jira&rsquo;s automatically sent messages. If you change your mind, note this in a new comment, rather than editing an older comment. The issue should preserve this history of the discussion.</p><h2 id=stay-involved>Stay involved</h2><p>Contributors should join the Avro mailing lists. In particular, the commit list (to see changes as they are made), the dev list (to join discussions of changes) and the user list (to help others).</p><h2 id=workflow>Workflow</h2><p>Building and running the site locally requires a recent extended version of Hugo. Install <a href=https://gohugo.io/installation/>Hugo</a> for your environment. Once you&rsquo;ve made your working copy of the site repo, from the repo root folder, run:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>hugo server --navigateToChanged
</span></span></code></pre></div><p>Edit .md and .html files in content/ folder</p><p>Once satisfied with the changes, commit them:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>git commit -a
</span></span></code></pre></div><p>Generate the HTML file stop hugo server &ndash;navigateToChanged (with Ctrl+C) and run</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>hugo
</span></span></code></pre></div><p>This will generate the HTMLs in public/ folder and this is actually what is being deployed</p><p>Add the modified HTML files to Git</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>git add .
</span></span><span style=display:flex><span>git rm offline-search-index.&lt;&lt;OLD-HASH&gt;&gt;.json
</span></span><span style=display:flex><span>git commit -a
</span></span><span style=display:flex><span>git push
</span></span></code></pre></div><p>This way even when the PR modifies a lot of files we can review only the first commit, the meaningful one, with the modified files in content/ folder</p><h2 id=running-a-container-locally>Running a container locally</h2><p>You can also run avro-website inside a Docker container, the container runs with a volume bound to the avro-website folder. This approach doesn&rsquo;t require you to install any dependencies other than Docker Desktop on Windows and Mac, and Docker Compose on Linux.</p><p>Build the docker image</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>docker-compose build
</span></span></code></pre></div><p>Run the built image</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>docker-compose up
</span></span></code></pre></div><p>NOTE: You can run both commands at once with docker-compose up &ndash;build.</p><p>Verify that the service is working.</p><p>Open your web browser and type http://localhost:1313 in your navigation bar, This opens a local instance of the docsy-example homepage. You can now make changes to the docsy example and those changes will immediately show up in your browser after you save.</p><p><strong>Cleanup</strong></p><p>To stop Docker Compose, on your terminal window, press Ctrl + C.</p><p>To remove the produced images run:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>docker-compose rm
</span></span></code></pre></div><h2 id=troubleshooting>Troubleshooting</h2><p>As you run the website locally, you may run into the following error:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>➜ hugo server
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>INFO 2021/01/21 21:07:55 Using config file:
</span></span><span style=display:flex><span>Building sites … INFO 2021/01/21 21:07:55 syncing static files to /
</span></span><span style=display:flex><span>Built in <span style=color:#0000cf;font-weight:700>288</span> ms
</span></span><span style=display:flex><span>Error: Error building site: TOCSS: failed to transform <span style=color:#4e9a06>&#34;scss/main.scss&#34;</span> <span style=color:#ce5c00;font-weight:700>(</span>text/x-scss<span style=color:#ce5c00;font-weight:700>)</span>: resource <span style=color:#4e9a06>&#34;scss/scss/main.scss_9fadf33d895a46083cdd64396b57ef68&#34;</span> not found in file cache
</span></span></code></pre></div><p>This error occurs if you have not installed the extended version of Hugo. See our user guide for instructions on how to install Hugo.</p><h2 id=edit-content>Edit content</h2><p>The website content is in content/en folder. It contains .md (Markdown) and .html (HTML) files.</p><p><strong>Layouts</strong></p><p>To change the layout of any page edit layouts/<page>/**.html. If there is no layout for a given page at that location then copy the one provided by the theme and edit it:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>cp themes/docsy/layouts/&lt;xyz&gt; layouts/&lt;xyz&gt;
</span></span></code></pre></div><p><strong>Avro version</strong></p><p>When a new version of Apache Avro is released:</p><p>Change the value of params.avroversion in config.toml
Add a new entry to the Releases pages in the Blog section, for example:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>cp content/en/blog/releases/avro-1.10.2-released.md content/en/blog/releases/avro-1.11.0-released.md
</span></span></code></pre></div><p><strong>API documentation for C/C++/C# modules</strong></p><p>The API documentations for C/C++/C# are built by their respective build.sh dist implementations. The final HTML should be copied to the external folder, for example:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>cp ../avro/build/avro-doc-1.12.0-SNAPSHOT/api/c/* content/en/docs/external/c/
</span></span></code></pre></div><h2 id=jira-conventions>JIRA conventions</h2><p>Issue types: JIRA issues are categorized into different types such as bugs, improvements, new features, etc. Each issue type has a unique icon and a set of fields that are specific to that type.</p><p>Workflow: JIRA issues follow a predefined workflow that defines the steps that an issue goes through from creation to resolution. Each step in the workflow can have its own set of conditions and actions.</p><p>Priority: JIRA allows users to set priorities for issues to help determine the order in which they should be addressed. The priority can be set to one of five levels: Blocker, Critical, Major, Minor, and Trivial. Blocker is the highest priority and Trivial is the lowest priority.</p><p>Labels: Labels are used to tag issues with keywords or phrases that can help with searching and filtering.</p><p>Components: Components are used to group related issues together. For example, a software project might have components for the user interface, database, and networking.</p><h2 id=see-also>See Also</h2><ul><li><a href=http://www.apache.org/dev/contributors.html>Apache contributor documentation</a></li><li><a href=http://www.apache.org/foundation/voting.html>Apache voting documentation</a></li></ul><div class=section-index></div><div class="text-muted mt-5 pt-3 border-top">Last modified April 13, 2023: <a href=https://github.com/apache/avro/commit/8b181dcaa392cfc9bf9ed903deb586de9878f938>Fix the path for Java javadoc HTMLs (8b181dc)</a></div></div></main></div></div><footer class="bg-dark py-5 row d-print-none"><div class="container-fluid mx-sm-5"><div class=row><div class="col-4 col-sm-3 text-xs-center order-sm-2"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="User mailing list" aria-label="User mailing list"><a class=text-white target=_blank rel=noopener href=mailto:user@avro.apache.org aria-label="User mailing list"><i class="fa fa-envelope"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=Twitter aria-label=Twitter><a class=text-white target=_blank rel=noopener href=https://twitter.com/ApacheAvro aria-label=Twitter><i class="fab fa-twitter"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Stack Overflow" aria-label="Stack Overflow"><a class=text-white target=_blank rel=noopener href=https://stackoverflow.com/questions/tagged/avro aria-label="Stack Overflow"><i class="fab fa-stack-overflow"></i></a></li></ul></div><div class="col-4 col-sm-3 text-right text-xs-center order-sm-3"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=GitHub aria-label=GitHub><a class=text-white target=_blank rel=noopener href=https://github.com/apache/avro aria-label=GitHub><i class="fab fa-github"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=Issues aria-label=Issues><a class=text-white target=_blank rel=noopener href=https://issues.apache.org/jira/projects/AVRO/issues aria-label=Issues><i class="fab fa-jira"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Chat with other project developers at Slack" aria-label="Chat with other project developers at Slack"><a class=text-white target=_blank rel=noopener href=https://the-asf.slack.com/ aria-label="Chat with other project developers at Slack"><i class="fab fa-slack"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Developer mailing list" aria-label="Developer mailing list"><a class=text-white target=_blank rel=noopener href=mailto:dev@avro.apache.org aria-label="Developer mailing list"><i class="fa fa-envelope"></i></a></li></ul></div><div class="col-10 col-sm-3 text-center py-2 order-sm-2"><a href=https://www.apache.org/><small class=text-white>&copy; 2023 The Apache Software Foundation </small></a><small class=text-white>All Rights Reserved</small><p><small class=text-white>Apache Avro, Avro&trade;, Apache&reg;, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation.</small></p></div><div class="col-5 col-sm-3 order-sm-2"><a href=https://www.apache.org/events/current-event.html><img src=https://www.apache.org/events/current-event-234x60.png></a></div></div></div></footer></div><script src=https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js integrity=sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN crossorigin=anonymous></script>
<script src=https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js integrity="sha512-UR25UO94eTnCVwjbXozyeVd6ZqpaAE9naiEUBK/A+QDbfSTQFhPGj5lOR6d8tsgbBk84Ggb5A3EkjsOgPRPcKA==" crossorigin=anonymous></script>
<script src=/js/tabpane-persist.js></script>
<script src=/update-site/js/main.min.b0910468256f44515fad3d1c8b5cf64a439da3abc1acef42ad39b9ceac3ae705.js integrity="sha256-sJEEaCVvRFFfrT0ci1z2SkOdo6vBrO9CrTm5zqw65wU=" crossorigin=anonymous></script>
<script src=/js/prism.js></script></body></html>