• Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: io-ideas, io-java-kudu
    • Labels:


      New IO for Apache Kudu (

      This work is in progress on this branch with design aspects documented below.

      The API

      The KuduIO API requires the user to provide a function to convert objects into operations. This is similar to the JdbcIO but different to others, such as HBaseIO which requires a pre-transform stage beforehand to convert into the mutations to apply. It was originally intended to copy the HBaseIO approach, but this was not possible:

      1. The Kudu Operation is a fat class, and is a subclass of KuduRpc<OperationResponse>. It holds RPC logic, callbacks and a Kudu client. Because of this the Operation does not serialize and furthermore, the logic for encoding the operations (Insert, Upsert etc) in the Kudu Java API are one way only (no decode) because the server is written in C++.
      2. An alternative could be to introduce a new object to beam (e.g. to enable PCollection<KuduOperation>. This was considered but was discounted because:
        1. It is not a familiar API to those already knowing Kudu
        2. It still requires serialization and deserialization of the operations. Using the existing Kudu approach of serializing into compact byte arrays would require a decoder along the lines of this almost complete example. This is possible but has fragilities given the Kudu code itself continues to evolve. 
        3. It becomes a trivial codebase in Beam to maintain by defer the object to mutation mapping to within the KuduIO transform. JdbcIO gives us the precedent to do this.

      Testing framework

      Kudu is written in C++. While a TestMiniKuduCluster does exist in Java, it requires binaries to be available for the target environment which is not portable (edit: this is now a work in progress in Kudu). Therefore we opt for the following:

      1. Unit tests will use a mock Kudu client
      2. Integration tests will cover the full aspects of the KuduIO and use a Docker based Kudu instance


          Issue Links



              • Assignee:
                timrobertson100 Tim Robertson
                jbonofre Jean-Baptiste Onofré
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created:

                  Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0h
                  Time Spent - 4h 50m
                  4h 50m