Skip to content

Conversation

@rnpridgeon
Copy link
Contributor

wrap up work contributed by #419

# magic byte
outf.write(struct.pack('b', MAGIC_BYTE))

# write the schema ID in network byte order (big end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this comment still applies though

Copy link
Contributor

@edenhill edenhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# get the writer
writer = self.id_to_writers[schema_id]
with ContextStringIO() as outf:
# write the header
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: these three comment lines read strange now. combine them into one.

# write the schema ID in network byte order (big end)

outf.write(struct.pack('>I', schema_id))
# Write the magic byte and schema ID in network byte order (big end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

micronit: "big endian" (from original comment though)

writer = self.id_to_writers[schema_id]
with ContextStringIO() as outf:
# Write the magic byte and schema ID in network byte order (big end)
# Write the magic byte and schema ID in network byte order (big endian)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix!

@rnpridgeon rnpridgeon merged commit 160c1c0 into master Dec 4, 2018
@rnpridgeon rnpridgeon deleted the fast_avro_writer branch December 4, 2018 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants