}
private Schema createAvroSchema() {
Schema avroSchema = Schema.createRecord("Doc", "adoc", null, false);
List<Field> fields = new ArrayList<Field>();
fields.add(new Field("id", Schema.create(Type.STRING), null, null));
fields.add(new Field("user_friends_count",
createOptional(Schema.create(Type.INT)),
null, null));
fields.add(new Field("user_location",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("user_description",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("user_statuses_count",
createOptional(Schema.create(Type.INT)),
null, null));
fields.add(new Field("user_followers_count",
createOptional(Schema.create(Type.INT)),
null, null));
fields.add(new Field("user_name",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("user_screen_name",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("created_at",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("text",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("retweet_count",
createOptional(Schema.create(Type.LONG)),
null, null));
fields.add(new Field("retweeted",
createOptional(Schema.create(Type.BOOLEAN)),
null, null));
fields.add(new Field("in_reply_to_user_id",
createOptional(Schema.create(Type.LONG)),
null, null));
fields.add(new Field("source",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("in_reply_to_status_id",
createOptional(Schema.create(Type.LONG)),
null, null));
fields.add(new Field("media_url_https",
createOptional(Schema.create(Type.STRING)),
null, null));
fields.add(new Field("expanded_url",
createOptional(Schema.create(Type.STRING)),
null, null));
avroSchema.setFields(fields);
return avroSchema;
}