I Defined a Person record as Avro IDL (person.avdl):
@namespace("net.tzolov.avro.extend")
protocol PersonProtocol {
record Person {
string firstName;
string lastName;
}
}
I am generating the java files, so this one is generating PersonProtocol.java and Person.java. The PersonProtocol.java is empty file, is there a way I can exclude generating this file...
You can't exclude the generation of this file because Avro IDL defines a protocol (see more here).
Your PersonProtocol.java is empty because you don't use the RPCs that provides Avro IDL language.
For example:
@namespace("net.tzolov.avro.extend")
protocol PersonProtocol {
record Person {
string firstName;
string lastName;
}
string printMessage(string theMessage);
}
By using the code generation, you will obtain this particular line which defines the RPC method :
void printMessage(java.lang.CharSequence theMessage, org.apache.avro.ipc.Callback<java.lang.CharSequence> callback) throws java.io.IOException;
If you just want to store data, you should use avro schema (avsc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With