Fennel: LhxHashKeyAccessor Class Reference (original) (raw)

#include <[LhxHashTable.h](LhxHashTable%5F8h-source.html)>

Inheritance diagram for LhxHashKeyAccessor:

List of all members.

Public Member Functions
LhxHashKeyAccessor ()
void init (TupleDescriptor const &keyDescInit, TupleProjection const &keyColsProjInit, TupleProjection const &aggsProjInit)
Set the shape of the data tuple to be stored via this accessor.
void setCurrent (PBuffer nodePtrInit, bool valid)
Set the current node pointer for this accessor.
PBuffer getFirstData ()
Get the first data node off this key node.
void setFirstData (PBuffer inputFirstData)
Set pointer to the first data node.
PBuffer * getNextSlot ()
Get the first data node off this key node.
void setNextSlot (PBuffer *nextSlot)
Set pointer to the first data node.
bool isMatched ()
Check if this key has been matched before.
void setMatched (bool matched)
Set if this key has been seen.
void addData (PBuffer inputData)
Add data node to this key.
uint getAvgStorageSize ()
Get avg buffer size required to store all the fields based on TupleDescriptor information previously passed in init().
uint getStorageSize (TupleData const &inputTuple)
Get actual buffer size required to store all the fields.
uint getDiskStorageSize (TupleData const &inputTuple)
Get actual disk size required to store all the fields.
void checkStorageSize (TupleData const &inputTuple, uint maxBufferSize)
Check that buffer size required to store all the fields does not exceed scratch buffer size.
void pack (TupleData const &inputTuple)
Store a tuple in the buffer associated with this accessor.
void unpack (TupleData &outputTuple, TupleProjection &destProj)
Retrieve the data stored in the buffer.
bool matches (TupleData const &inputTuple, TupleProjection const &inputKeyProj)
string toString ()
Print the content of the node associated with this accessor.
PBuffer getCurrent ()
**Returns:**current node associated with this accessor
void setCurrent (PBuffer nodePtrInit)
Set the current node pointer for this accessor.
void reset ()
Reset the node pointer to NULL.
PBuffer getBuffer ()
**Returns:**buffer to the payload in this node
PBuffer getNext ()
**Returns:**the next node
PBuffer getNextLocation ()
**Returns:**the location which stores the next node pointer
void setNext (PBuffer nextNode)
Set the next node pointer for node associated with this accessor.
void setNext (PBuffer inputNode, PBuffer nextNode)
Set the next node pointer for an input node.
uint getNextFieldSize ()
**Returns:**number of bytes required to store the next node pointer
uint getBufferOffset ()
**Returns:**offset to the .
Private Attributes
uint firstDataOffset
uint isMatchedOffset
uint nextSlotOffset
TupleDescriptor keyDescriptor
TupleData keyTuple
TupleAccessor keyAccessor
TupleProjection keyColsProj
TupleDescriptor keyColsDesc
TupleProjection aggsProj
TupleData inputKey
TupleData currentKey
LhxHashDataAccessor firstData

Detailed Description

Definition at line 256 of file LhxHashTable.h.


Constructor & Destructor Documentation

| LhxHashKeyAccessor::LhxHashKeyAccessor | ( | | ) | | -------------------------------------- | - | | - |


Member Function Documentation

Set the shape of the data tuple to be stored via this accessor.

Parameters:

[in] keyDescInit
[in] keyColsProjInit the key fields
[in] aggsProjInit the aggregate fields

Definition at line 105 of file LhxHashTable.cpp.

References aggsProj, TupleAccessor::compute(), TupleData::compute(), keyAccessor, keyColsDesc, keyColsProj, keyDescriptor, keyTuple, and TupleDescriptor::projectFrom().

Referenced by LhxHashTable::calculateSize(), LhxHashTableReader::init(), and LhxHashTable::init().

void LhxHashKeyAccessor::setCurrent ( PBuffer nodePtrInit,
bool valid
) [inline]

Set the current node pointer for this accessor.

Parameters:

[in] nodePtrInit pointer to node that will be associated with this accessor
[in] valid whether buffer content is valid.

Definition at line 1178 of file LhxHashTable.h.

References LhxHashNodeAccessor::getBuffer(), keyAccessor, LhxHashNodeAccessor::setCurrent(), and TupleAccessor::setCurrentTupleBuf().

Referenced by LhxHashTable::addData(), LhxHashTable::addKeyData(), LhxHashTableReader::advanceKey(), LhxHashTableReader::advanceSlot(), LhxHashTable::aggData(), LhxHashTable::findKeyLocation(), LhxHashTable::getNextSlot(), and LhxHashTable::printSlot().

| PBuffer LhxHashKeyAccessor::getFirstData | ( | | ) | [inline] | | -------------------------------------------------------------------------------------------- | - | | - | ---------- |

void LhxHashKeyAccessor::setFirstData ( PBuffer inputFirstData ) [inline]

| PBuffer * LhxHashKeyAccessor::getNextSlot | ( | | ) | [inline] | | ---------------------------------------------------------------------------------------------- | - | | - | ---------- |

void LhxHashKeyAccessor::setNextSlot ( PBuffer * nextSlot ) [inline]

| bool LhxHashKeyAccessor::isMatched | ( | | ) | [inline] | | ---------------------------------- | - | | - | ---------- |

void LhxHashKeyAccessor::setMatched ( bool matched ) [inline]
void LhxHashKeyAccessor::addData ( PBuffer inputData )

| uint LhxHashKeyAccessor::getAvgStorageSize | ( | | ) | [inline] | | ------------------------------------------------------------------------------------------------------- | - | | - | ---------- |

uint LhxHashKeyAccessor::getStorageSize ( TupleData const & inputTuple ) [inline]
uint LhxHashKeyAccessor::getDiskStorageSize ( TupleData const & inputTuple ) [inline]
void LhxHashKeyAccessor::checkStorageSize ( TupleData const & inputTuple,
uint maxBufferSize
) [inline]
void LhxHashKeyAccessor::pack ( TupleData const & inputTuple ) [inline]

| string LhxHashKeyAccessor::toString | ( | | ) | | ----------------------------------- | - | | - |

| PBuffer LhxHashNodeAccessor::getCurrent | ( | | ) | [inline, inherited] | | ------------------------------------------------------------------------------------------- | - | | - | --------------------- |

void LhxHashNodeAccessor::setCurrent ( PBuffer nodePtrInit ) [inline, inherited]

| void LhxHashNodeAccessor::reset | ( | | ) | [inline, inherited] | | ------------------------------- | - | | - | --------------------- |

| PBuffer LhxHashNodeAccessor::getBuffer | ( | | ) | [inline, inherited] | | ------------------------------------------------------------------------------------------ | - | | - | --------------------- |

| PBuffer LhxHashNodeAccessor::getNext | ( | | ) | [inline, inherited] | | ---------------------------------------------------------------------------------------- | - | | - | --------------------- |

| PBuffer LhxHashNodeAccessor::getNextLocation | ( | | ) | [inline, inherited] | | ------------------------------------------------------------------------------------------------ | - | | - | --------------------- |

void LhxHashNodeAccessor::setNext ( PBuffer nextNode ) [inline, inherited]
void LhxHashNodeAccessor::setNext ( PBuffer inputNode,
PBuffer nextNode
) [inline, inherited]

| uint LhxHashNodeAccessor::getNextFieldSize | ( | | ) | [inline, inherited] | | ------------------------------------------------------------------------------------------------------- | - | | - | --------------------- |

| uint LhxHashNodeAccessor::getBufferOffset | ( | | ) | [inline, inherited] | | ------------------------------------------------------------------------------------------------------ | - | | - | --------------------- |


Member Data Documentation


The documentation for this class was generated from the following files:


Generated on Mon Jun 22 04:00:38 2009 for Fennel by doxygen 1.5.1