LcsClusterReplaceExecStream.h

Go to the documentation of this file.
00001 /*
00002 // $Id: //open/dev/fennel/lucidera/colstore/LcsClusterReplaceExecStream.h#5 $
00003 // Fennel is a library of data storage and processing components.
00004 // Copyright (C) 2005-2009 LucidEra, Inc.
00005 // Copyright (C) 2005-2009 The Eigenbase Project
00006 //
00007 // This program is free software; you can redistribute it and/or modify it
00008 // under the terms of the GNU General Public License as published by the Free
00009 // Software Foundation; either version 2 of the License, or (at your option)
00010 // any later version approved by The Eigenbase Project.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 */
00021 
00022 #ifndef Fennel_LcsClusterReplaceExecStream_Included
00023 #define Fennel_LcsClusterReplaceExecStream_Included
00024 
00025 #include "fennel/lucidera/colstore/LcsClusterAppendExecStream.h"
00026 #include "fennel/segment/SnapshotRandomAllocationSegment.h"
00027 #include "fennel/exec/DynamicParam.h"
00028 #include "fennel/tuple/TupleProjectionAccessor.h"
00029 #include "fennel/tuple/UnalignedAttributeAccessor.h"
00030 #include "fennel/tuple/TupleDataWithBuffer.h"
00031 
00032 FENNEL_BEGIN_NAMESPACE
00033 
00034 struct LcsClusterReplaceExecStreamParams :
00035     public LcsClusterAppendExecStreamParams
00036 {
00037 };
00038 
00053 class FENNEL_LCS_EXPORT LcsClusterReplaceExecStream
00054     : public LcsClusterAppendExecStream
00055 {
00061     DynamicParamId newClusterRootParamId;
00062 
00067     TupleDescriptor projInputTupleDesc;
00068 
00072     TupleData projInputTupleData;
00073 
00077     std::vector<UnalignedAttributeAccessor> attrAccessors;
00078 
00082     SnapshotRandomAllocationSegment *pSnapshotSegment;
00083 
00087     SharedLcsClusterReader pOrigClusterReader;
00088 
00092     RecordNum origNumRows;
00093 
00097     PageId origRootPageId;
00098 
00102     LcsRid currLoadRid;
00103 
00107     bool needTuple;
00108 
00112     LcsRid currInputRid;
00113 
00117     TupleProjectionAccessor clusterColsTupleAccessor;
00118 
00122     TupleDataWithBuffer origClusterTupleData;
00123 
00127     bool newData;
00128 
00137     virtual void initTupleLoadParams(const TupleProjection &inputProj);
00138 
00144     virtual ExecStreamResult getTupleForLoad();
00145 
00149     virtual void postProcessTuple();
00150 
00155     void readOrigClusterRow();
00156 
00157     virtual void close();
00158 
00159 public:
00160     virtual void prepare(LcsClusterReplaceExecStreamParams const &params);
00161     virtual void open(bool restart);
00162     virtual void getResourceRequirements(
00163         ExecStreamResourceQuantity &minQuantity,
00164         ExecStreamResourceQuantity &optQuantity);
00165 };
00166 
00167 
00168 FENNEL_END_NAMESPACE
00169 
00170 #endif
00171 
00172 // End LcsClusterReplaceExecStream.h

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