Skip to content

Ready: TS List Keys + Lite/Immutable TS data classes.#579

Merged
alexmoore merged 18 commits intotimeseriesfrom
ts-list-keys
Dec 10, 2015
Merged

Ready: TS List Keys + Lite/Immutable TS data classes.#579
alexmoore merged 18 commits intotimeseriesfrom
ts-list-keys

Conversation

@alexmoore
Copy link
Contributor

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO better to introduce complete Abstract Factory pattern in case we decide to move forward with both mutable and immutable APIs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's the way that class seems to be headed.

@hmmr
Copy link

hmmr commented Dec 6, 2015

Per basho/riak_kv#1291, there will be no non-streaming version of list_keys for TS. Apologies if you guys are already aware and dealing with this.

@alexmoore
Copy link
Contributor Author

@srgg Looks like a convertible iterator won't work, the protobuf library iterates over the collection twice: https://github.com/google/protobuf/blob/v2.5.0/java/src/main/java/com/google/protobuf/AbstractMessageLite.java#L323 https://github.com/google/protobuf/blob/v2.5.0/java/src/main/java/com/google/protobuf/AbstractMessageLite.java#L329

I have some time tonight, I'll see if I can switch it to a convertable iterable so we can get it in.

@srgg
Copy link
Contributor

srgg commented Dec 7, 2015

@alexmoore Damn... will also take a look at it

@alexmoore alexmoore changed the title Not Ready: TS List Keys + Interfaces for all TS classes. Ready: TS List Keys + Interfaces for all TS classes. Dec 7, 2015
@alexmoore alexmoore changed the title Ready: TS List Keys + Interfaces for all TS classes. Ready: TS List Keys + Lite/Immutable TS data classes. Dec 7, 2015
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we refactor this logic to Convertible one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So a ConvertableIteratorIterator ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds like fun, we should look into Guava in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@srgg Actually I think it's better to copy here for now. If we do a ConvertableIteratorIterator we'll still have to copy it to a list for the QueryResult constructor, or completely rewrite QueryResult to use an Iterator under the covers. Thoughts?

@srgg
Copy link
Contributor

srgg commented Dec 8, 2015

+1 with that change #579 (comment)

@alexmoore
Copy link
Contributor Author

I can't wait until we're JDK8+ and we can use the streaming apis.

@srgg
Copy link
Contributor

srgg commented Dec 10, 2015

May be it makes sense to move anything related to the Magic Iterable to the specific packge

@christophermancini
Copy link

👍 Tests pass and looks like your tests provide good coverage of the effected code.

@alexmoore
Copy link
Contributor Author

Thanks for the review @christophermancini & @srgg.

alexmoore added a commit that referenced this pull request Dec 10, 2015
Ready: TS List Keys + Lite/Immutable TS data classes.
@alexmoore alexmoore merged commit 77622c4 into timeseries Dec 10, 2015
@alexmoore alexmoore deleted the ts-list-keys branch December 10, 2015 19:53
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.

4 participants