[
https://issues.apache.org/jira/browse/AVRO-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Doug Cutting updated AVRO-158:
------------------------------
Attachment: AVRO-158.patch
> You removed "according to its metadata" from this comment.
Do you have alternate wording? Arraylist#size() just says, "Returns the number
of elements in this list." The arraylist class-level document does define
order-of-algorithms bounds for different operations, including size(). So I
suppose we could say, "Runs in constant time", although we don't bother giving
the order of algorithms for most other methods here. Personally I think it's
overkill. We should perhaps warn folks away from things that might be
unexpectedly slow, but I don't see a need to tell them that something that they
should expect to be fast is in fact fast.
> I'd prefer DataFileWriter.createForAppend(File, DatumWriter) as a factory
> method.
Factory methods make it hard to subclass. Probably we should make opening the
writer a separate method(s) from the constructor, but that should be done in a
separate issue, and could be done for both readers and writers and would be an
incompatible change. If you feel strongly about this, please file that issue.
> Perhaps better to catch NoSuchAlgorithmException explicitly?
Done. Good catch.
> In Junit3, setUp() and tearDown() were used for this.
I think @Before and @After methods are what's replaced these. But they
unfortunately are run before and after each @Test, so are a poor means to
express dependencies. In practice, JUnit runs tests in the order they are
defined. The file to which this test is added already depends on this, as do
many others, so I don't see addressing that as relevant to the current issue.
> Add test to Java bindings for opening a non-empty file object container and
> successfully adding new elements
> ------------------------------------------------------------------------------------------------------------
>
> Key: AVRO-158
> URL: https://issues.apache.org/jira/browse/AVRO-158
> Project: Avro
> Issue Type: Test
> Components: java
> Reporter: Jeff Hammerbacher
> Assignee: Doug Cutting
> Fix For: 1.3.0
>
> Attachments: AVRO-158.patch, AVRO-158.patch
>
>
> Avro file object container are mutable and we should test that fact.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.