| <?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><generator uri="http://jekyllrb.com" version="2.5.3">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2018-08-17T17:34:56+02:00</updated><id>/</id><entry><title>Getting Started with Kudu - an O’Reilly Title</title><link href="/2018/08/06/getting-started-with-kudu-an-oreilly-title.html" rel="alternate" type="text/html" title="Getting Started with Kudu - an O'Reilly Title" /><published>2018-08-06T00:00:00+02:00</published><updated>2018-08-06T00:00:00+02:00</updated><id>/2018/08/06/getting-started-with-kudu-an-oreilly-title</id><content type="html" xml:base="/2018/08/06/getting-started-with-kudu-an-oreilly-title.html"><p>The following article by Brock Noland was reposted from the |
| <a href="https://www.phdata.io/getting-started-with-kudu/">phData</a> |
| blog with their permission.</p> |
| |
| <p>Five years ago, enabling Data Science and Advanced Analytics on the |
| Hadoop platform was hard. Organizations required strong Software Engineering |
| capabilities to successfully implement complex Lambda architectures or even |
| simply implement continuous ingest. Updating or deleting data, were simply a |
| nightmare. General Data Protection Regulation (GDPR) would have been an extreme |
| challenge at that time. |
| <!--more--> |
| In that context, on October 11th 2012 Todd Lipcon perform Apache Kudu’s initial |
| commit. The commit message was:</p> |
| |
| <pre><code>Code for writing cfiles seems to basically work |
| Need to write code for reading cfiles, still |
| </code></pre> |
| |
| <p>And Kudu development was off and running. Around this same time Todd, on his |
| internal Wiki page, started listing out the papers he was reading to develop |
| the theoretical background for creating Kudu. I followed along, reading as many |
| as I could, understanding little, because I knew Todd was up to something |
| important. About a year after that initial commit, I got my |
| <a href="https://github.com/apache/kudu/commit/1d7e6864b4a31d3fe6897e4cb484dfcda6608d43">Kudu first commit</a>, |
| documenting the upper bound of a library. This is a small contribution of which I am still |
| proud.</p> |
| |
| <p>In the meantime, I was lucky enough to be a founder of a Hadoop Managed Services |
| and Consulting company known as <a href="http://phdata.io/">phData</a>. We found that a majority |
| of our customers had use cases which Kudu vastly simplified. Whether it’s Change Data |
| Capture (CDC) from thousands of source tables to Internet of Things (IoT) ingest, Kudu |
| makes life much easier as both an operator of a Hadoop cluster and a developer providing |
| business value on the platform.</p> |
| |
| <p>Through this work, I was lucky enough to be a co-author of |
| <a href="http://shop.oreilly.com/product/0636920065739.do">Getting Started with Kudu</a>. |
| The book is a summation of mine and our co-authors, Jean-Marc Spaggiari, Mladen |
| Kovacevic, and Ryan Bosshart, learnings while cutting our teeth on early versions |
| of Kudu. Specifically you will learn:</p> |
| |
| <ul> |
| <li>Theoretical understanding of Kudu concepts in simple plain spoken words and simple diagrams</li> |
| <li>Why, for many use cases, using Kudu is so much easier than other ecosystem storage technologies</li> |
| <li>How Kudu enables Hybrid Transactional/Analytical Processing (HTAP) use cases</li> |
| <li>How to design IoT, Predictive Modeling, and Mixed Platform Solutions using Kudu</li> |
| <li>How to design Kudu Schemas</li> |
| </ul> |
| |
| <p><img src="/img/2018-08-06-getting-started-with-kudu-an-oreilly-title.gif" alt="Getting Started with Kudu Cover" class="img-responsive" /></p> |
| |
| <p>Looking forward, I am excited to see Kudu gain additional features and adoption |
| and eventually the second revision of this title. In the meantime, if you have |
| feedback or questions, please reach out on the <code>#getting-started-kudu</code> channel of |
| the <a href="https://getkudu-slack.herokuapp.com/">Kudu Slack</a> or if you prefer non-real-time |
| communication, please use the user@ mailing list!</p></content><author><name>Brock Noland</name></author><summary>The following article by Brock Noland was reposted from the |
| phData |
| blog with their permission. |
| |
| Five years ago, enabling Data Science and Advanced Analytics on the |
| Hadoop platform was hard. Organizations required strong Software Engineering |
| capabilities to successfully implement complex Lambda architectures or even |
| simply implement continuous ingest. Updating or deleting data, were simply a |
| nightmare. General Data Protection Regulation (GDPR) would have been an extreme |
| challenge at that time.</summary></entry><entry><title>Instrumentation in Apache Kudu</title><link href="/2018/07/10/instrumentation-in-kudu.html" rel="alternate" type="text/html" title="Instrumentation in Apache Kudu" /><published>2018-07-10T00:00:00+02:00</published><updated>2018-07-10T00:00:00+02:00</updated><id>/2018/07/10/instrumentation-in-kudu</id><content type="html" xml:base="/2018/07/10/instrumentation-in-kudu.html"><p>Last week, the <a href="http://opentracing.io/">OpenTracing</a> community invited me to |
| their monthly Google Hangout meetup to give an informal talk on tracing and |
| instrumentation in Apache Kudu.</p> |
| |
| <p>While Kudu doesn’t currently support distributed tracing using OpenTracing, |
| it does have quite a lot of other types of instrumentation, metrics, and |
| diagnostics logging. The OpenTracing team was interested to hear about some of |
| the approaches that Kudu has used, and so I gave a brief introduction to topics |
| including: |
| <!--more--> |
| - The Kudu <a href="/docs/administration.html#_diagnostics_logging">diagnostics log</a> |
| which periodically logs metrics and stack traces. |
| - The <a href="/docs/troubleshooting.html#kudu_tracing">process-wide tracing</a> |
| support based on the open source tracing framework implemented by Google Chrome. |
| - The <a href="/docs/troubleshooting.html#kudu_tracing">stack watchdog</a> |
| which helps us find various latency outliers and issues in our libraries and |
| the Linux kernel. |
| - <a href="/docs/troubleshooting.html#heap_sampling">Heap sampling</a> support |
| which helps us understand unexpected memory usage.</p> |
| |
| <p>If you’re interested in learning about these topics and more, check out the video recording |
| below. My talk spans the first 34 minutes.</p> |
| |
| <iframe width="800" height="500" src="https://www.youtube.com/embed/qBXwKU6Ubjo?end=2058&amp;start=23"> |
| </iframe> |
| |
| <p>If you have any questions about this content or about Kudu in general, |
| <a href="http://kudu.apache.org/community.html">join the community</a></p></content><author><name>Todd Lipcon</name></author><summary>Last week, the OpenTracing community invited me to |
| their monthly Google Hangout meetup to give an informal talk on tracing and |
| instrumentation in Apache Kudu. |
| |
| While Kudu doesn’t currently support distributed tracing using OpenTracing, |
| it does have quite a lot of other types of instrumentation, metrics, and |
| diagnostics logging. The OpenTracing team was interested to hear about some of |
| the approaches that Kudu has used, and so I gave a brief introduction to topics |
| including:</summary></entry><entry><title>Apache Kudu 1.7.0 released</title><link href="/2018/03/23/apache-kudu-1-7-0-released.html" rel="alternate" type="text/html" title="Apache Kudu 1.7.0 released" /><published>2018-03-23T00:00:00+01:00</published><updated>2018-03-23T00:00:00+01:00</updated><id>/2018/03/23/apache-kudu-1-7-0-released</id><content type="html" xml:base="/2018/03/23/apache-kudu-1-7-0-released.html"><p>The Apache Kudu team is happy to announce the release of Kudu 1.7.0!</p> |
| |
| <p>Apache Kudu 1.7.0 is a minor release that offers new features, performance |
| optimizations, incremental improvements, and bug fixes.</p> |
| |
| <p>Release highlights:</p> |
| |
| <!--more--> |
| |
| <ol> |
| <li>Kudu now supports the decimal column type. The decimal type is a numeric |
| data type with fixed scale and precision suitable for financial and other |
| arithmetic calculations where the imprecise representation and rounding |
| behavior of float and double make those types impractical. The decimal type |
| is also useful for integers larger than int64 and cases with fractional values |
| in a primary key. See <a href="/releases/1.7.0/docs/schema_design.html#decimal">Decimal Type</a> |
| for more details.</li> |
| <li>The strategy Kudu uses for automatically healing tablets which have lost a |
| replica due to server or disk failures has been improved. The new re-replication |
| strategy, or replica management scheme, first adds a replacement tablet replica |
| before evicting the failed one.</li> |
| <li>A new scan read mode READ_YOUR_WRITES. Users can specify READ_YOUR_WRITES when |
| creating a new scanner in C++, Java and Python clients. If this mode is used, |
| the client will perform a read such that it follows all previously known writes |
| and reads from this client. Reads in this mode ensure read-your-writes and |
| read-your-reads session guarantees, while minimizing latency caused by waiting |
| for outstanding write transactions to complete. Note that this is still an |
| experimental feature which may be stabilized in future releases.</li> |
| <li>The tablet server web UI scans dashboard (/scans) has been improved with several |
| new features, including: showing the most recently completed scans, a pseudo-SQL |
| scan descriptor that concisely shows the selected columns and applied predicates, |
| and more complete and better documented scan statistics.</li> |
| <li>Kudu daemons now expose a web page /stacks which dumps the current stack trace of |
| every thread running in the server. This information can be helpful when diagnosing |
| performance issues.</li> |
| <li>By default, each tablet replica will now stripe data blocks across 3 data directories |
| instead of all data directories. This decreases the likelihood that any given tablet |
| will be affected in the event of a single disk failure.</li> |
| <li>The Java client now uses a predefined prioritized list of TLS ciphers when |
| establishing an encrypted connection to Kudu servers. This cipher list matches the |
| list of ciphers preferred for server-to-server communication and ensures that the |
| most efficient and secure ciphers are preferred. When the Kudu client is running on |
| Java 8 or newer, this provides a substantial speed-up to read and write performance.</li> |
| <li>The performance of inserting rows containing many string or binary columns has been |
| improved, especially in the case of highly concurrent write workloads.</li> |
| <li>The Java client will now automatically attempt to re-acquire Kerberos credentials |
| from the ticket cache when the prior credentials are about to expire. This allows |
| client instances to persist longer than the expiration time of a single Kerberos |
| ticket so long as some other process renews the credentials in the ticket cache.</li> |
| </ol> |
| |
| <p>For more details, and the complete list of changes in Kudu 1.7.0, please see |
| the <a href="/releases/1.7.0/docs/release_notes.html">Kudu 1.7.0 release notes</a>.</p> |
| |
| <p>The Apache Kudu project only publishes source code releases. To build Kudu |
| 1.7.0, follow these steps:</p> |
| |
| <ol> |
| <li>Download the <a href="/releases/1.7.0/">Kudu 1.7.0 source release</a>.</li> |
| <li>Follow the instructions in the documentation to |
| <a href="/releases/1.7.0/docs/installation.html#build_from_source">build Kudu 1.7.0 from source</a>.</li> |
| </ol> |
| |
| <p>For your convenience, binary JAR files for the Kudu Java client library, Spark |
| DataSource, Flume sink, and other Java integrations are published to the ASF |
| Maven repository and are |
| <a href="https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.kudu%22%20AND%20v%3A%221.7.0%22">now available</a>.</p></content><author><name>Grant Henke</name></author><summary>The Apache Kudu team is happy to announce the release of Kudu 1.7.0! |
| |
| Apache Kudu 1.7.0 is a minor release that offers new features, performance |
| optimizations, incremental improvements, and bug fixes. |
| |
| Release highlights:</summary></entry><entry><title>Apache Kudu 1.6.0 released</title><link href="/2017/12/08/apache-kudu-1-6-0-released.html" rel="alternate" type="text/html" title="Apache Kudu 1.6.0 released" /><published>2017-12-08T00:00:00+01:00</published><updated>2017-12-08T00:00:00+01:00</updated><id>/2017/12/08/apache-kudu-1-6-0-released</id><content type="html" xml:base="/2017/12/08/apache-kudu-1-6-0-released.html"><p>The Apache Kudu team is happy to announce the release of Kudu 1.6.0!</p> |
| |
| <p>Apache Kudu 1.6.0 is a minor release that offers new features, performance |
| optimizations, incremental improvements, and bug fixes.</p> |
| |
| <p>Release highlights:</p> |
| |
| <!--more--> |
| |
| <ol> |
| <li>Kudu servers can now tolerate short interruptions in NTP clock |
| synchronization. NTP synchronization is still required when any Kudu daemon |
| starts up.</li> |
| <li>Tablet servers will no longer crash when a disk containing data blocks |
| fails, unless that disk also stores WAL segments or tablet metadata. Instead |
| of crashing, the tablet server will shut down any tablets that may have lost |
| data locally and Kudu will re-replicate the affected tablets to another |
| tablet server. More information can be found in the documentation under |
| <a href="/releases/1.6.0/docs/administration.html#disk_failure_recovery">Recovering from Disk Failure</a>.</li> |
| <li>Tablet server startup time has been improved significantly on servers |
| containing large numbers of blocks.</li> |
| <li>The Spark DataSource integration now can take advantage of scan locality for |
| better scan performance. The scan will take place at the closest replica |
| instead of going to the leader.</li> |
| <li>Support for Spark 1 has been removed in Kudu 1.6.0 and now only Spark 2 is |
| supported. Spark 1 support was deprecated in Kudu 1.5.0.</li> |
| <li>HybridTime timestamp propagation now works in the Java client when using |
| scan tokens.</li> |
| <li>Tablet servers now consider the health of all replicas of a tablet before |
| deciding to evict one. This can improve the stability of the Kudu cluster |
| when multiple servers temporarily go down at the same time.</li> |
| <li>A bug in the C++ client was fixed that could cause tablets to be erroneously |
| pruned, or skipped, during certain scans, resulting in fewer results than |
| expected being returned from queries. The bug only affected tables whose |
| range partition columns are a proper prefix of the primary key. |
| See <a href="https://issues.apache.org/jira/browse/KUDU-2173">KUDU-2173</a> for more |
| information.</li> |
| </ol> |
| |
| <p>For more details, and the complete list of changes in Kudu 1.6.0, please see |
| the <a href="/releases/1.6.0/docs/release_notes.html">Kudu 1.6.0 release notes</a>.</p> |
| |
| <p>The Apache Kudu project only publishes source code releases. To build Kudu |
| 1.6.0, follow these steps:</p> |
| |
| <ol> |
| <li>Download the <a href="/releases/1.6.0/">Kudu 1.6.0 source release</a>.</li> |
| <li>Follow the instructions in the documentation to |
| <a href="/releases/1.6.0/docs/installation.html#build_from_source">build Kudu 1.6.0 from source</a>.</li> |
| </ol> |
| |
| <p>For your convenience, binary JAR files for the Kudu Java client library, Spark |
| DataSource, Flume sink, and other Java integrations are published to the ASF |
| Maven repository and are |
| <a href="https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.kudu%22%20AND%20v%3A%221.6.0%22">now available</a>.</p></content><author><name>Mike Percy</name></author><summary>The Apache Kudu team is happy to announce the release of Kudu 1.6.0! |
| |
| Apache Kudu 1.6.0 is a minor release that offers new features, performance |
| optimizations, incremental improvements, and bug fixes. |
| |
| Release highlights:</summary></entry><entry><title>Slides: A brave new world in mutable big data: Relational storage</title><link href="/2017/10/23/nosql-kudu-spanner-slides.html" rel="alternate" type="text/html" title="Slides: A brave new world in mutable big data: Relational storage" /><published>2017-10-23T00:00:00+02:00</published><updated>2017-10-23T00:00:00+02:00</updated><id>/2017/10/23/nosql-kudu-spanner-slides</id><content type="html" xml:base="/2017/10/23/nosql-kudu-spanner-slides.html"><p>Since the Apache Kudu project made its debut in 2015, there have been |
| a few common questions that kept coming up at every presentation:</p> |
| |
| <ul> |
| <li>Is Kudu an open source version of Google’s Spanner system?</li> |
| <li>Is Kudu NoSQL or SQL?</li> |
| <li>Why does Kudu have a relational data model? Isn’t SQL dead?</li> |
| </ul> |
| |
| <!--more--> |
| |
| <p>A few of these questions are addressed in the |
| <a href="https://kudu.apache.org/faq.html">Kudu FAQ</a>, but I thought they were |
| interesting enough that I decided to give a talk on these subjects |
| at <a href="https://conferences.oreilly.com/strata/strata-ny">Strata Data Conference NYC 2017</a>.</p> |
| |
| <p>Preparing this talk was particularly interesting, since Google recently released |
| Spanner to the public in SaaS form as <a href="https://cloud.google.com/spanner/">Google Cloud Spanner</a>. |
| This meant that I was able to compare Kudu vs Spanner not just qualitatively |
| based on some academic papers, but quantitatively as well.</p> |
| |
| <p>To summarize the key points of the presentation:</p> |
| |
| <ul> |
| <li> |
| <p>Despite the growing popularity of “NoSQL” from 2009 through 2013, SQL has |
| once again become the access mechanism of choice for the majority of |
| analytic applications. NoSQL has become “Not Only SQL”.</p> |
| </li> |
| <li> |
| <p>Spanner and Kudu share a lot of common features. However:</p> |
| |
| <ul> |
| <li> |
| <p>Spanner offers a superior feature set and performance for Online |
| Transactional Processing (OLTP) workloads, including ACID transactions and |
| secondary indexing.</p> |
| </li> |
| <li> |
| <p>Kudu offers a superior feature set and performance for Online |
| Analytical Processing (OLAP) and Hybrid Transactional/Analytic Processing |
| (HTAP) workloads, including more complete SQL support and orders of |
| magnitude better performance on large queries.</p> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| |
| <p>For more details and for the full benchmark numbers, check out the slide deck |
| below:</p> |
| |
| <iframe src="//www.slideshare.net/slideshow/embed_code/key/loQpO2vzlwGGgz" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen=""> </iframe> |
| <div style="margin-bottom:15px"> <strong> <a href="//www.slideshare.net/ToddLipcon/a-brave-new-world-in-mutable-big-data-relational-storage-strata-nyc-2017" title="A brave new world in mutable big data relational storage (Strata NYC 2017)" target="_blank">A brave new world in mutable big data relational storage (Strata NYC 2017)</a> </strong> from <strong><a href="https://www.slideshare.net/ToddLipcon" target="_blank">Todd Lipcon</a></strong> </div> |
| |
| <p>Questions or comments? Join the <a href="/community.html">Apache Kudu Community</a> to discuss.</p></content><author><name>Todd Lipcon</name></author><summary>Since the Apache Kudu project made its debut in 2015, there have been |
| a few common questions that kept coming up at every presentation: |
| |
| |
| Is Kudu an open source version of Google’s Spanner system? |
| Is Kudu NoSQL or SQL? |
| Why does Kudu have a relational data model? Isn’t SQL dead?</summary></entry><entry><title>Consistency in Apache Kudu, Part 1</title><link href="/2017/09/18/kudu-consistency-pt1.html" rel="alternate" type="text/html" title="Consistency in Apache Kudu, Part 1" /><published>2017-09-18T00:00:00+02:00</published><updated>2017-09-18T00:00:00+02:00</updated><id>/2017/09/18/kudu-consistency-pt1</id><content type="html" xml:base="/2017/09/18/kudu-consistency-pt1.html"><p>In this series of short blog posts we will introduce Kudu’s consistency model, |
| its design and ultimate goals, current features, and next steps. |
| On the way, we’ll shed some light on the more relevant components and how they |
| fit together.</p> |
| |
| <p>In Part 1 of the series (this one), we’ll cover motivation and design trade-offs, the end goals and |
| the current status.</p> |
| |
| <!--more--> |
| |
| <h2 id="what-is-consistency-and-why-is-it-relevant">What is “consistency” and why is it relevant?</h2> |
| |
| <p>In order to cope with ever increasing data volumes, modern storage systems like Kudu have to support |
| many concurrent users while coordinating requests across many machines, each with many threads executing |
| work at the same time. However, application developers shouldn’t have to understand the internal |
| details of how these systems implement this parallel, distributed, execution in order to write |
| correct applications. <em>Consistency in the context of parallel, distributed systems roughly |
| refers to how the system behaves in comparison to a single-machine, single-thread system</em>. In a |
| single-threaded, single-machine storage system operations happen one-at-a-time, in a clearly |
| defined order, making correct applications easy to code and reason about. A developer writing an |
| application against such a system doesn’t have to care about how simultaneous operations interact |
| or about ordering anomalies, so the code is simpler, but more importantly, cognitive load is greatly |
| reduced, freeing focus for the application logic itself.</p> |
| |
| <p>While such a simple system is definitely possible to build, it wouldn’t be able to cope with very |
| large amounts of data. In order to deal with big data volumes and write throughputs modern storage |
| systems like Kudu are designed to be distributed, storing and processing data across many machines |
| and cores. This means that many things happen simultaneously in the same and different machines, |
| that there are more moving parts and thus more oportunity for mis-orderings and for components |
| to fail. How far systems like Kudu go (or don’t go) in emulating the simple single-threaded, single-machine |
| system a distributed, parallel setting where failures are common is roughly what is referred to |
| as how <em>“consistent”</em> the system is.</p> |
| |
| <p><em>Consistency</em> as a term is somewhat overloaded in the distributed systems and database communities, |
| there are many different models, properties, different names for the same concept, and often |
| different concepts under the same name. This post is not meant to introduce these concepts |
| as there are excellent references already available elsewhere (we recommend Kyle Kinsbury’s excellent |
| series of blog posts on the matter, like <a href="https://aphyr.com/posts/313-strong-consistency-models">this one</a>). |
| Throughout this and follow-up posts we’ll refer to consistency loosely as the <strong>C</strong> in <strong>CAP</strong>[1] |
| in some cases and as the <strong>I</strong> in <strong>ACID</strong>[2] in others; we’ll try to be specific when relevant.</p> |
| |
| <h2 id="design-decisions-trade-offs-and-motivation">Design decisions, trade-offs and motivation</h2> |
| |
| <p>Consistency is essentially about ordering and ordering usually has a cost. Distributed storage |
| system design must choose to prioritize some properties over others according to the target use |
| cases. That is, trade-offs must be made or, borrowing a term from economics, there is |
| “no free lunch”. Different systems choose different trade-off points; for instance, systems inspired by <em>Dynamo</em>[3], usually favor availability in the consistency/availability |
| trade-off: by allowing a write to a data item to succeed even when a majority (or even all) of the |
| replicas serving that data item are unreachable, Dynamo’s design is minimizing insertion errors and |
| insert latency (related to availability) at the cost having to perform extra work for value |
| reconciliation on reads and possibly returning stale or disordered values (related to consistency). |
| On the other end of the spectrum, traditional DBMS design is often driven by the need to support |
| transactions of arbitrary complexity while providing the users stronger, predictable, semantics, |
| favoring consistency at the cost of scalability and availability.</p> |
| |
| <p>Kudu’s overarching goal is to enable <em>fast analytic workloads over large amounts of mutable</em> data, |
| meaning it was designed to perform fast scans over large volumes of data stored in many servers. |
| In practical terms this means that, when given a choice, more often than not, we opted for the |
| design that would enable Kudu to have faster scan performance (i.e. favoring reads even if it meant pushing |
| a bit more work to the path that mutates data, i.e. writes). This does not mean that the write path |
| was not a concern altogether. In fact, modern storage systems like <em>Google’s Spanner</em>[4] |
| global-scale database demonstrate that, with the right set of trade-offs, it is possible to have strong |
| consistency semantics with write latencies and overall availability that are adequate for most use |
| cases (e.g. Spanner achieves 5 9’s of availability). For the write path, we often made similar choices in Kudu.</p> |
| |
| <p>Another important aspect that directed our design decisions is the type of <em>write workload</em> we targeted. |
| Traditionally, analytical storage systems target periodic bulk write workloads and a continuous |
| stream of analytical scans. This design is often problematic in that it forces users to have to |
| build complex pipelines where data is accumulated in one place for later loading into the storage |
| system. Moreover, beyond the architectural complexity, this kind of design usually also |
| means that the data that is available for analytics is not the most recent. In Kudu we aimed for |
| enabling continuous ingest, i.e. having a continuous stream of small writes, obviating the need to |
| assemble a pipeline for data accumulation/loading and allowing analytical scans to have access to |
| the most recent data. Another important aspect of the write workloads that we targeted in Kudu is |
| that they are append-mostly, i.e. most insert new values into the table, with a smaller percentage |
| updating currently existing values. Both the average write size and the data distribution influence |
| the design of the write path, as we’ll see in the following sections.</p> |
| |
| <p>One last concern we had in mind is that different users have different needs when it comes to |
| consistency semantics, particularly as it applies to an analytical storage system like Kudu. For |
| some users consistency isn’t a primary concern, they just want fast scans, and the ability to |
| update/insert/delete values without needing to build a complex pipeline. For example, many machine |
| learning models are mostly insensitive to data recency or ordering so, when using Kudu to store data that |
| will be used to train such a model, consistency is often not as primary a concern as read/write performance is. |
| In other cases consistency is a much higher priority. For example, when using Kudu to |
| store transaction data for fraud analysis it might be important to capture if events are causally |
| related. Fraudulent transactions might be characterized by a specific sequence of events and when |
| retrieving that data it might be important for the scan result to reflect that sequence. Kudu’s |
| design allows users to make a trade-off between consistency and performance at scan time. That is, |
| users can choose to have stronger consistency semantics for scans at the penalty of latency and |
| throughput or they can choose to weaken the consistency semantics for an extra performance boost.</p> |
| |
| <h3 id="note">Note</h3> |
| |
| <blockquote> |
| <p>Kudu currently lacks support for atomic multi-row mutation operations (i.e. mutation |
| operations to more than one row in the same or different tablets, planned as a future feature). |
| So, when discussing writes, we’ll be talking about the consistency semantics of single row mutations. |
| In this context we’ll discuss Kudu’s properties more from a key/value store standpoint. On the |
| other hand Kudu is an analytical storage engine so, for the read path, we’ll also discuss the |
| semantics of large (multi-row) scans. This moves the discussion more into the field of traditional |
| DBMSs. These ingredients make for a non-traditional discussion that is not exactly apples-to-apples |
| with what the reader might be familiar with, but our hope is that it still provides valuable, or |
| at least interesting, insight.</p> |
| </blockquote> |
| |
| <h2 id="consistency-options-in-kudu">Consistency options in Kudu</h2> |
| |
| <p>Consistency, as well as other properties, are underpinned in Kudu by the concept of a <em>timestamp</em>. |
| In follow-up posts we’ll look into detail how these are assigned and how they are assembled. For now |
| it’s sufficient to know that a timestamp is a single, usually large, number that has some mapping |
| to wall time. Each mutation of a Kudu row is tagged with one such timestamp. Globally, these timestamps |
| form a partial order over all the rows with the particularity that causally related mutations (e.g. |
| a write mutation that is the result of the value obtained from a previous read) may be required to |
| have increasing timestamps, depending on the user’s choices.</p> |
| |
| <p>Row mutations performed by a single client <em>instance</em> are guaranteed to have increasing timestamps |
| thus reflecting their potential causal relationship. This property is always enforced. However |
| there are two major <em>“knobs”</em> that are available to the user to make performance trade-offs, the |
| <code>Read</code> mode, and the <code>External Consistency</code> mode (see <a href="https://kudu.apache.org/docs/transaction_semantics.html">here</a> |
| for more information on how to use the relevant APIs).</p> |
| |
| <p>The first and most important knob, the <code>Read</code> mode, pertains to what is the guaranteed recency of |
| data resulting from scans. Since Kudu uses replication for availability and fault-tolerance, there |
| are always multiple replicas of any data item. |
| Not all replicas must be up-to-date so if the user cares about recency, e.g. if the user requires |
| that any data read includes all previously written data <em>from a single client instance</em> then it must |
| choose the <code>READ_AT_SNAPSHOT</code> read mode. With this mode enabled the client is guaranteed to observe |
| <strong>“READ YOUR OWN WRITES”</strong> semantics, i.e. scans from a client will always include all previous mutations |
| performed by that client. Note that this property is local to a single client instance, not a global |
| property.</p> |
| |
| <p>The second “knob”, the <code>External Consistency</code> mode, defines the semantics of how reads and writes |
| are performed across multiple client instances. By default, <code>External Consistency</code> is set to |
| <code>CLIENT_PROPAGATED</code>, meaning it’s up to the user to coordinate a set of <em>timestamp tokens</em> with clients (even |
| across different machines) if they are performing writes/reads that are somehow causally linked. |
| If done correctly this enables <strong>STRICT SERIALIZABILITY</strong>[5], i.e. <strong>LINEARIZABILITY</strong>[6] and |
| <strong>SERIALIZABILITY</strong>[7] at the same time, at the cost of having the user coordinate the timestamp |
| tokens across clients (a survey of the meaning of these, and other definitions can be found |
| <a href="http://www.ics.forth.gr/tech-reports/2013/2013.TR439_Survey_on_Consistency_Conditions.pdf">here</a>). |
| The alternative setting for <code>External Consistency</code> is to have it set to |
| <code>COMMIT_WAIT</code> (experimental), which guarantees the same properties through a different means, by |
| implementing Google Spanner’s <em>TrueTime</em>. This comes at the cost of higher latency (depending on how |
| tightly synchronized the system clocks of the various tablet servers are), but doesn’t require users |
| to propagate timestamps programmatically.</p> |
| |
| <h2 id="next-up">Next up</h2> |
| |
| <p>In following posts we’ll look into the several components of Kudu’s architecture that come together |
| to enable the consistency semantics introduced in the previous section, including:</p> |
| |
| <ul> |
| <li>Transactions and the Transaction Driver</li> |
| <li>Concurrent execution with Multi-Version Concurrency Control</li> |
| <li>Exactly-Once semantics with Replay Cache</li> |
| <li>Replication, Crash Recovery with Consensus and the Write-Ahead-Log</li> |
| <li>Time keeping and timestamp assignment</li> |
| </ul> |
| |
| <h2 id="references">References</h2> |
| |
| <p><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.24.3690&amp;rep=rep1&amp;type=pdf">[1]</a>: Armando Fox and Eric A. Brewer. 1999. Harvest, Yield, and Scalable Tolerant Systems. In Proceedings of the The Seventh Workshop on Hot Topics in Operating Systems (HOTOS ‘99). IEEE Computer Society, Washington, DC, USA.</p> |
| |
| <p><a href="https://en.wikipedia.org/wiki/ACID">[2]</a>: ACID - Wikipedia entry</p> |
| |
| <p><a href="https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf">[3]</a>: Giuseppe DeCandia, Deniz Hastorun, Madan Jampani, Gunavardhan Kakulapati, Avinash Lakshman, Alex Pilchin, Swaminathan Sivasubramanian, Peter Vosshall, and Werner Vogels. 2007. Dynamo: amazon’s highly available key-value store. In Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principles (SOSP ‘07). ACM, New York, NY, USA.</p> |
| |
| <p><a href="https://research.google.com/archive/spanner-osdi2012.pdf">[4]</a>: James C. Corbett, Jeffrey Dean, Michael Epstein, Andrew Fikes, Christopher Frost, J. J. Furman, Sanjay Ghemawat, Andrey Gubarev, Christopher Heiser, Peter Hochschild, Wilson Hsieh, Sebastian Kanthak, Eugene Kogan, Hongyi Li, Alexander Lloyd, Sergey Melnik, David Mwaura, David Nagle, Sean Quinlan, Rajesh Rao, Lindsay Rolig, Yasushi Saito, Michal Szymaniak, Christopher Taylor, Ruth Wang, and Dale Woodford. 2012. Spanner: Google’s globally-distributed database. In Proceedings of the 10th USENIX conference on Operating Systems Design and Implementation (OSDI’12). USENIX Association, Berkeley, CA, USA.</p> |
| |
| <p><a href="https://pdfs.semanticscholar.org/fafa/ebf830bc900bccc5e4fd508fd592f5581cbe.pdf">[5]</a>: Gifford, David K. Information storage in a decentralized computer system. Diss. Stanford University, 1981.</p> |
| |
| <p><a href="http://www.doc.ic.ac.uk/~gbd10/aw590/Linearizability%20-%20A%20Correctness%20Condition%20for%20Concurrent%20Objects.pdf">[6]</a>: Herlihy, Maurice P., and Jeannette M. Wing. “Linearizability: A correctness condition for concurrent objects.” ACM Transactions on Programming Languages and Systems (TOPLAS) 12.3 (1990): 463-492.</p> |
| |
| <p><a href="http://www.dtic.mil/get-tr-doc/pdf?AD=ADA078414">[7]</a>: Papadimitriou, Christos H. “The serializability of concurrent database updates.” Journal of the ACM (JACM) 26.4 (1979): 631-653.</p></content><author><name>David Alves</name></author><summary>In this series of short blog posts we will introduce Kudu’s consistency model, |
| its design and ultimate goals, current features, and next steps. |
| On the way, we’ll shed some light on the more relevant components and how they |
| fit together. |
| |
| In Part 1 of the series (this one), we’ll cover motivation and design trade-offs, the end goals and |
| the current status.</summary></entry><entry><title>Apache Kudu 1.5.0 released</title><link href="/2017/09/08/apache-kudu-1-5-0-released.html" rel="alternate" type="text/html" title="Apache Kudu 1.5.0 released" /><published>2017-09-08T00:00:00+02:00</published><updated>2017-09-08T00:00:00+02:00</updated><id>/2017/09/08/apache-kudu-1-5-0-released</id><content type="html" xml:base="/2017/09/08/apache-kudu-1-5-0-released.html"><p>The Apache Kudu team is happy to announce the release of Kudu 1.5.0!</p> |
| |
| <p>Apache Kudu 1.5.0 is a minor release which offers several new features, |
| improvements, optimizations, and bug fixes.</p> |
| |
| <p>Highlights include:</p> |
| |
| <!--more--> |
| |
| <ul> |
| <li>optimizations to improve write throughput and failover recovery times</li> |
| <li>the Raft consensus implementation has been made more resilient and flexible |
| through “tombstoned voting”, which allows Kudu to self-heal in more edge-case |
| scenarios</li> |
| <li>the number of threads used by Kudu servers has been further reduced, with |
| additional reductions planned for the future</li> |
| <li>a new configuration dashboard on the web UI which provides a high-level |
| summary of important configuration values</li> |
| <li>a new <code>kudu tablet move</code> command which moves a tablet replica from one tablet |
| server to another</li> |
| <li>a new <code>kudu local_replica data_size</code> command which summarizes the space usage |
| of a local tablet</li> |
| <li>all on-disk data is now checksummed by default, which provides error detection |
| for improved confidence when running Kudu on unreliable hardware</li> |
| </ul> |
| |
| <p>The above list of changes is non-exhaustive. Please refer to the |
| <a href="/releases/1.5.0/docs/release_notes.html">release notes</a> |
| for an expanded list of important improvements, bug fixes, and |
| incompatible changes before upgrading.</p> |
| |
| <ul> |
| <li>Download the <a href="/releases/1.5.0/">Kudu 1.5.0 source release</a></li> |
| <li>Convenience binary artifacts for the Java client and various Java |
| integrations (eg Spark, Flume) are also now available via the ASF Maven |
| repository.</li> |
| </ul></content><author><name>Dan Burkert</name></author><summary>The Apache Kudu team is happy to announce the release of Kudu 1.5.0! |
| |
| Apache Kudu 1.5.0 is a minor release which offers several new features, |
| improvements, optimizations, and bug fixes. |
| |
| Highlights include:</summary></entry><entry><title>Apache Kudu 1.4.0 released</title><link href="/2017/06/13/apache-kudu-1-4-0-released.html" rel="alternate" type="text/html" title="Apache Kudu 1.4.0 released" /><published>2017-06-13T00:00:00+02:00</published><updated>2017-06-13T00:00:00+02:00</updated><id>/2017/06/13/apache-kudu-1-4-0-released</id><content type="html" xml:base="/2017/06/13/apache-kudu-1-4-0-released.html"><p>The Apache Kudu team is happy to announce the release of Kudu 1.4.0!</p> |
| |
| <p>Apache Kudu 1.4.0 is a minor release which offers several new features, |
| improvements, optimizations, and bug fixes.</p> |
| |
| <p>Highlights include:</p> |
| |
| <!--more--> |
| |
| <ul> |
| <li>ability to alter storage attributes and default values for existing columns</li> |
| <li>a new C++ client API to efficiently map primary keys to their associated partitions |
| and hosts</li> |
| <li>support for long-running fault-tolerant scans in the Java client</li> |
| <li>a new <code>kudu fs check</code> command which can perform offline consistency checks |
| and repairs on the local on-disk storage of a Tablet Server or Master.</li> |
| <li>many optimizations to reduce disk space usage, improve write throughput, |
| and improve throughput of background maintenance operations.</li> |
| </ul> |
| |
| <p>The above list of changes is non-exhaustive. Please refer to the |
| <a href="/releases/1.4.0/docs/release_notes.html">release notes</a> |
| for an expanded list of important improvements, bug fixes, and |
| incompatible changes before upgrading.</p> |
| |
| <ul> |
| <li>Download the <a href="/releases/1.4.0/">Kudu 1.4.0 source release</a></li> |
| <li>Convenience binary artifacts for the Java client and various Java |
| integrations (eg Spark, Flume) are also now available via the ASF Maven |
| repository.</li> |
| </ul></content><author><name>Todd Lipcon</name></author><summary>The Apache Kudu team is happy to announce the release of Kudu 1.4.0! |
| |
| Apache Kudu 1.4.0 is a minor release which offers several new features, |
| improvements, optimizations, and bug fixes. |
| |
| Highlights include:</summary></entry><entry><title>Apache Kudu 1.3.1 released</title><link href="/2017/04/19/apache-kudu-1-3-1-released.html" rel="alternate" type="text/html" title="Apache Kudu 1.3.1 released" /><published>2017-04-19T00:00:00+02:00</published><updated>2017-04-19T00:00:00+02:00</updated><id>/2017/04/19/apache-kudu-1-3-1-released</id><content type="html" xml:base="/2017/04/19/apache-kudu-1-3-1-released.html"><p>The Apache Kudu team is happy to announce the release of Kudu 1.3.1!</p> |
| |
| <p>Apache Kudu 1.3.1 is a bug fix release which fixes critical issues discovered |
| in Apache Kudu 1.3.0. In particular, this fixes a bug in which data could be |
| incorrectly deleted after certain sequences of node failures. Several other |
| bugs are also fixed. See the release notes for details.</p> |
| |
| <p>Users of Kudu 1.3.0 are encouraged to upgrade to 1.3.1 immediately.</p> |
| |
| <ul> |
| <li>Download the <a href="/releases/1.3.1/">Kudu 1.3.1 source release</a></li> |
| <li>Convenience binary artifacts for the Java client and various Java |
| integrations (eg Spark, Flume) are also now available via the ASF Maven |
| repository.</li> |
| </ul></content><author><name>Todd Lipcon</name></author><summary>The Apache Kudu team is happy to announce the release of Kudu 1.3.1! |
| |
| Apache Kudu 1.3.1 is a bug fix release which fixes critical issues discovered |
| in Apache Kudu 1.3.0. In particular, this fixes a bug in which data could be |
| incorrectly deleted after certain sequences of node failures. Several other |
| bugs are also fixed. See the release notes for details. |
| |
| Users of Kudu 1.3.0 are encouraged to upgrade to 1.3.1 immediately. |
| |
| |
| Download the Kudu 1.3.1 source release |
| Convenience binary artifacts for the Java client and various Java |
| integrations (eg Spark, Flume) are also now available via the ASF Maven |
| repository.</summary></entry><entry><title>Apache Kudu 1.3.0 released</title><link href="/2017/03/20/apache-kudu-1-3-0-released.html" rel="alternate" type="text/html" title="Apache Kudu 1.3.0 released" /><published>2017-03-20T00:00:00+01:00</published><updated>2017-03-20T00:00:00+01:00</updated><id>/2017/03/20/apache-kudu-1-3-0-released</id><content type="html" xml:base="/2017/03/20/apache-kudu-1-3-0-released.html"><p>The Apache Kudu team is happy to announce the release of Kudu 1.3.0!</p> |
| |
| <p>Apache Kudu 1.3 is a minor release which adds various new features, |
| improvements, bug fixes, and optimizations on top of Kudu |
| 1.2. Highlights include:</p> |
| |
| <!--more--> |
| |
| <ul> |
| <li>significantly improved support for security, including Kerberos |
| authentication, TLS encryption, and coarse-grained (cluster-level) |
| authorization</li> |
| <li>automatic garbage collection of historical versions of data</li> |
| <li>lower space consumption and better performance in default |
| configurations.</li> |
| </ul> |
| |
| <p>The above list of changes is non-exhaustive. Please refer to the |
| <a href="/releases/1.3.0/docs/release_notes.html">release notes</a> |
| for an expanded list of important improvements, bug fixes, and |
| incompatible changes before upgrading.</p> |
| |
| <p>Thanks to the 25 developers who contributed code or documentation to |
| this release!</p> |
| |
| <ul> |
| <li>Download the <a href="/releases/1.3.0/">Kudu 1.3.0 source release</a></li> |
| <li>Convenience binary artifacts for the Java client and various Java |
| integrations (eg Spark, Flume) are also now available via the ASF Maven |
| repository.</li> |
| </ul></content><author><name>Todd Lipcon</name></author><summary>The Apache Kudu team is happy to announce the release of Kudu 1.3.0! |
| |
| Apache Kudu 1.3 is a minor release which adds various new features, |
| improvements, bug fixes, and optimizations on top of Kudu |
| 1.2. Highlights include:</summary></entry></feed> |