phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-5123) Avoid using MappedByteBuffers for server side GROUP BY
Date Tue, 05 Feb 2019 00:53:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-5123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16760361#comment-16760361
] 

Andrew Purtell commented on PHOENIX-5123:
-----------------------------------------

RAF just uses a file descriptor, there's no mapping, unless you ask for it. You set a position
and then read or write.

{quote}

Instances of this class support both reading and writing to a random access file. A random
access file behaves like a large array of bytes stored in the file system. There is a kind
of cursor, or index into the implied array, called the _file pointer_; input operations read
bytes starting at the file pointer and advance the file pointer past the bytes read. If the
random access file is created in read/write mode, then output operations are also available;
output operations write bytes starting at the file pointer and advance the file pointer past
the bytes written. Output operations that write past the current end of the implied array
cause the array to be extended. The file pointer can be read by the {{getFilePointer}} method
and set by the {{seek}} method.

{quote}

Presumably Phoenix is tracking position so can move or advance the pointer to known locations,
and from there you use DataInput or DataOutput methods to write or extract records.

> Avoid using MappedByteBuffers for server side GROUP BY
> ------------------------------------------------------
>
>                 Key: PHOENIX-5123
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5123
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Priority: Major
>
> Like PHOENIX-5120 but for GROUP BY.
> Solution is a bit more tricky, since outline for sorting the access here is truly random.
> [~apurtell] suggests to perhaps just use a RandomAccessFile for this.
> (I'm not sure that uses under the hood, though)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message