A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
AggregationProcessor.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * *
3  * Copyright 2018 Rice University *
4  * *
5  * Licensed under the Apache License, Version 2.0 (the "License"); *
6  * you may not use this file except in compliance with the License. *
7  * You may obtain a copy of the License at *
8  * *
9  * http://www.apache.org/licenses/LICENSE-2.0 *
10  * *
11  * Unless required by applicable law or agreed to in writing, software *
12  * distributed under the License is distributed on an "AS IS" BASIS, *
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14  * See the License for the specific language governing permissions and *
15  * limitations under the License. *
16  * *
17  *****************************************************************************/
18 #ifndef AGGREGATION_PROCESSOR_H
19 #define AGGREGATION_PROCESSOR_H
20 
21 
23 #include "InterfaceFunctions.h"
24 #include "AggregationMap.h"
25 #include "PDBMap.h"
26 #include "PDBVector.h"
27 #include "Handle.h"
29 
30 namespace pdb {
31 
32 template <class KeyType, class ValueType>
34 
35 public:
39  void initialize() override;
40  void loadInputPage(void* pageToProcess) override;
41  void loadInputObject(Handle<Object>& objectToProcess) override;
42  void loadOutputPage(void* pageToWriteTo, size_t numBytesInPage) override;
43  bool fillNextOutputPage() override;
44  void finalize() override;
45  void clearOutputPage() override;
46  void clearInputPage() override;
47  bool needsProcessInput() override;
48 
49 private:
53  bool finalized;
55  int id;
56 
57  // the iterators for current map partition
60 
61  int count;
62 };
63 }
64 
65 
66 #include "AggregationProcessor.cc"
67 
68 
69 #endif
void loadInputObject(Handle< Object > &objectToProcess) override
unsigned int HashPartitionID
Definition: DataTypes.h:28
PDBMapIterator< KeyType, ValueType > * begin
PDBMapIterator< KeyType, ValueType > * end
void loadInputPage(void *pageToProcess) override
std::shared_ptr< UseTemporaryAllocationBlock > UseTemporaryAllocationBlockPtr
Handle< Map< KeyType, ValueType > > outputData
UseTemporaryAllocationBlockPtr blockPtr
void loadOutputPage(void *pageToWriteTo, size_t numBytesInPage) override
Handle< Vector< Handle< AggregationMap< KeyType, ValueType > > > > inputData
Handle< AggregationMap< KeyType, ValueType > > curMap