blob: 673dbe9d2b6ded3c6b824ab9fd82f5e158d9f43d [file] [log] [blame]
<html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<body><a href="https://code.google.com/p/protobuf/">Protocol Buffer</a>
compatibility.
<p>Protocol Buffer primitive types are mapped to Avro types as follows:
<table>
<tr><th>protobuf type</th><th>Avro type</th></tr>
<tr><td>int32, uint32, sint32, fixed32, sfixed32</td><td>int</td></tr>
<tr><td>int64, uint64, sint64, fixed64, sfixed64</td><td>long</td></tr>
<tr><td>float</td><td>float</td></tr>
<tr><td>double</td><td>double</td></tr>
<tr><td>bool</td><td>boolean</td></tr>
<tr><td>string</td><td>string</td></tr>
<tr><td>bytes</td><td>bytes</td></tr>
<tr><td>enum</td><td>enum</td></tr>
<tr><td>message</td><td>record</td></tr>
</table>
<p>Notes:
<ul>
<li>protobuf repeated fields are represented as Avro arrays
<li>protobuf default values are translated to Avro default values
</ul>
</body>
</html>