[jira] [Commented] (HBASE-17278) Cell Scanner Implementation to be used by ResultScanner

2016-12-14 Thread Sudeep Sunthankar (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15747652#comment-15747652
 ] 

Sudeep Sunthankar commented on HBASE-17278:
---

Thanks for the feedback [~enis]. I will have a look at the points mentioned 
above.

> Cell Scanner Implementation to be used by ResultScanner
> ---
>
> Key: HBASE-17278
> URL: https://issues.apache.org/jira/browse/HBASE-17278
> Project: HBase
>  Issue Type: Sub-task
>Reporter: Sudeep Sunthankar
>Assignee: Sudeep Sunthankar
> Attachments: HBASE-17278.HBASE-14850.v1.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-17278) Cell Scanner Implementation to be used by ResultScanner

2016-12-12 Thread Enis Soztutar (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15744192#comment-15744192
 ] 

Enis Soztutar commented on HBASE-17278:
---

- Can you remove the DLOG statements (or maybe move them to a debug method): 
{code}
+#if 0
{code}
 - Let's keep Cell class to be only the data structure, and move parsing / 
encoding logic to KeyValueCodec class. We can use the same Codec structure here 
as well with the Encoder and Decoder classes.  
 - Normally, CellScanner is an interface in Java with different 
implementations. {{Result}} also implements the CellScanner so, it maybe useful 
to have this to be an abstract base class, and the KeyValueDecoder to be an 
implementation. 
 - Let's use ntohs and friends if possible for dealing with endianness. 
(https://linux.die.net/man/3/ntohs) rather than SwapByteOrder methods. 
 - Can we do this with zero-copy by overtaking the buffer: 
{code}
+void CellScanner::SetData(char *cell_block_data, int data_length) {
+  cell_block_data_.reset(new char[data_length]);
+  std::memcpy(cell_block_data_.get(), cell_block_data, data_length);
+  data_length_ = data_length;
+  cur_pos_ = 0;
+}
{code}
The only CellScanner implementation for now will be the scanner that will work 
on top of the IPC buffers, so we do not need to memcpy the bytes. Better yet, 
we should use the 
https://github.com/facebook/folly/blob/master/folly/io/IOBuf.h for the 
CellScanner since that is what will be coming from the network using wangle. 
- Do we need the second Cell wrapper here? 
{code}
new Cell(*Cell::ParseCellData(*current_cell_data))
{code}



> Cell Scanner Implementation to be used by ResultScanner
> ---
>
> Key: HBASE-17278
> URL: https://issues.apache.org/jira/browse/HBASE-17278
> Project: HBase
>  Issue Type: Sub-task
>Reporter: Sudeep Sunthankar
>Assignee: Sudeep Sunthankar
> Attachments: HBASE-17278.HBASE-14850.v1.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)