[
https://issues.apache.org/jira/browse/HBASE-14919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131891#comment-15131891
]
stack commented on HBASE-14919:
-------------------------------
[~eshcar] Below are some questions:
nit: We create a snapshot on construction of an AbstractMemStore. We do not
initialize snapshotId so its value is 0 yet when we clear a snapshot later, we
set snapshotId to -1. Should we set -1 to when create instance of this class?
Define -1 as NO_SNAPSHOT_ID?
This javadoc seems wrong. We return a List with one element in it only, not two
as the javadoc implies.
/**
* @return scanner on memstore and snapshot in this order.
*/
(A simplification which can be done in a followup patch?) So, we create a
MutableSegment first, and then when it gets shoved onto the Pipeline, we wrap
it in an ImmutableSegmentAdapter which makes a MutableSegment Immutable? Why
you need the Adapter? Looks like an ImmutableSegment, like the butterfly from
the caterpillar, is always first a MutableSegment? So, an ImmutableSegment
takes a MutableSegment on construction? You can skip the pupa
ImmutableSegmentAdapter? (It is the only implementation of ImmutableSegment).
FYI, trying to get rid of the need of a rollback in HBASE-15158
Reading the MutableSegment looking at the methods it has, why can't they all be
in ImmutableSegment? What is wrong with having tailSet, first, getComparator,
etc., on ImmutableSegment? These methods do not seem to be means of making
mutation on a segment. And why this subset of Set methods in MutableSegment?
Why not last, headSet, etc. that are in getScannerForMemStoreSnapshot();
In ImmutableSegment, there is this method:
getScannerForMemStoreSnapshot();
As I read it, I am getting a Scanner on a MemStoreSnapshot but MemStoreSnapshot
is a Type that is not an ImmutableSegment. (it 'has' an IS); I am getting a
Scanner on something else altogether. When I have a pipeline made up of
ImmutableSegments will I be able to callt this method on any of them and get a
Scanner on the current MemStoreSnapshot? It seems like this does not belong in
here. I can understand getting a Scanner on myself, the current
ImmutableSegment but a Scanner on another Type that I am contained in seems
unnatural.
What is special about MutableCellSetSegmentScanner? When would the Scanner on
a MutableSegment differ from Scanner on an ImmutableSegment? In other words,
could we just have a SegmentScanner implementation and it work for both Segment
types?
Above is all I have outstanding. Thanks.
> Infrastructure refactoring for In-Memory Flush
> ----------------------------------------------
>
> Key: HBASE-14919
> URL: https://issues.apache.org/jira/browse/HBASE-14919
> Project: HBase
> Issue Type: Sub-task
> Affects Versions: 2.0.0
> Reporter: Eshcar Hillel
> Assignee: Eshcar Hillel
> Attachments: HBASE-14919-V01.patch, HBASE-14919-V01.patch,
> HBASE-14919-V02.patch, HBASE-14919-V03.patch, HBASE-14919-V04.patch,
> HBASE-14919-V04.patch, HBASE-14919-V05.patch, HBASE-14919-V06.patch,
> HBASE-14919-V06.patch, HBASE-14919-V07.patch, HBASE-14919-V08.patch,
> HBASE-14919-V09.patch, HBASE-14919-V10.patch
>
>
> Refactoring the MemStore hierarchy, introducing segment (StoreSegment) as
> first-class citizen and decoupling memstore scanner from the memstore
> implementation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)