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.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
AbstractAggregateComp.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 ABSTRACT_AGG_COMP
19
#define ABSTRACT_AGG_COMP
20
21
#include "
Computation.h
"
22
#include "
DataTypes.h
"
23
#include "
SimpleSingleTableQueryProcessor.h
"
24
#include "
DataProxy.h
"
25
#include "
PageCircularBufferIterator.h
"
26
#include "
ScanUserSet.h
"
27
#include "
DataTypes.h
"
28
#include <vector>
29
30
31
namespace
pdb {
32
37
class
AbstractAggregateComp
:
public
Computation
{
38
39
public
:
40
44
AbstractAggregateComp
() =
default
;
45
52
virtual
SimpleSingleTableQueryProcessorPtr
getCombinerProcessor
(std::vector<HashPartitionID> nodePartitionIds) = 0;
53
60
virtual
SimpleSingleTableQueryProcessorPtr
getAggregationProcessor
(
HashPartitionID
id
) = 0;
61
67
virtual
SimpleSingleTableQueryProcessorPtr
getAggOutProcessor
() = 0;
68
73
void
setNumPartitions
(
int
numPartitions
) {
74
this->numPartitions =
numPartitions
;
75
}
76
82
int
getNumPartitions
() {
83
return
this->
numPartitions
;
84
}
85
90
void
setNumNodes
(
int
numNodes
) {
91
this->numNodes =
numNodes
;
92
}
93
99
int
getNumNodes
() {
100
return
this->
numNodes
;
101
}
102
107
void
setBatchSize
(
int
batchSize
)
override
{
108
this->batchSize =
batchSize
;
109
}
110
115
int
getBatchSize
() {
116
return
this->
batchSize
;
117
}
118
123
virtual
void
setIterator
(
PageCircularBufferIteratorPtr
iterator) = 0;
124
129
virtual
void
setProxy
(
DataProxyPtr
proxy) = 0;
130
135
virtual
void
setDatabaseName
(std::string dbName) = 0;
136
141
virtual
void
setSetName
(std::string setName) = 0;
142
147
ComputationTypeID
getComputationTypeID
()
override
{
148
return
AbstractAggregateCompTypeID
;
149
}
150
155
bool
needsMaterializeOutput
()
override
{
156
return
this->
materializeAggOut
;
157
}
158
163
void
setHashTable
(
void
* hashTableLocation) {
164
this->
materializeAggOut
=
false
;
165
this->
whereHashTableSitsForThePartition
= hashTableLocation;
166
}
167
172
bool
isUsingCombiner
()
override
{
173
return
useCombinerOrNot
;
174
}
175
180
void
setUsingCombiner
(
bool
useCombinerOrNot
)
override
{
181
this->useCombinerOrNot =
useCombinerOrNot
;
182
}
183
184
185
protected
:
189
int
numPartitions
= -1;
190
194
int
numNodes
= -1;
195
199
int
batchSize
= -1;
200
204
void
*
whereHashTableSitsForThePartition
=
nullptr
;
205
209
bool
materializeAggOut
=
false
;
210
214
bool
useCombinerOrNot
=
true
;
215
};
216
}
217
218
#endif
pdb::ComputationTypeID
ComputationTypeID
Definition:
Computation.h:39
Computation.h
pdb::AbstractAggregateComp::getNumNodes
int getNumNodes()
Definition:
AbstractAggregateComp.h:99
pdb::AbstractAggregateComp::setBatchSize
void setBatchSize(int batchSize) override
Definition:
AbstractAggregateComp.h:107
DataProxyPtr
shared_ptr< DataProxy > DataProxyPtr
Definition:
DataProxy.h:30
pdb::AbstractAggregateComp::setUsingCombiner
void setUsingCombiner(bool useCombinerOrNot) override
Definition:
AbstractAggregateComp.h:180
pdb::AbstractAggregateComp
Definition:
AbstractAggregateComp.h:37
PageCircularBufferIterator.h
HashPartitionID
unsigned int HashPartitionID
Definition:
DataTypes.h:28
pdb::AbstractAggregateComp::whereHashTableSitsForThePartition
void * whereHashTableSitsForThePartition
Definition:
AbstractAggregateComp.h:204
pdb::AbstractAggregateComp::setProxy
virtual void setProxy(DataProxyPtr proxy)=0
pdb::AbstractAggregateComp::setHashTable
void setHashTable(void *hashTableLocation)
Definition:
AbstractAggregateComp.h:163
pdb::AbstractAggregateComp::needsMaterializeOutput
bool needsMaterializeOutput() override
Definition:
AbstractAggregateComp.h:155
pdb::AbstractAggregateComp::numNodes
int numNodes
Definition:
AbstractAggregateComp.h:194
pdb::AbstractAggregateComp::getComputationTypeID
ComputationTypeID getComputationTypeID() override
Definition:
AbstractAggregateComp.h:147
DataTypes.h
pdb::AbstractAggregateComp::getAggOutProcessor
virtual SimpleSingleTableQueryProcessorPtr getAggOutProcessor()=0
pdb::AbstractAggregateComp::AbstractAggregateComp
AbstractAggregateComp()=default
pdb::AbstractAggregateComp::getBatchSize
int getBatchSize()
Definition:
AbstractAggregateComp.h:115
SimpleSingleTableQueryProcessor.h
DataProxy.h
pdb::AbstractAggregateComp::batchSize
int batchSize
Definition:
AbstractAggregateComp.h:199
pdb::Computation
Definition:
Computation.h:59
pdb::AbstractAggregateComp::useCombinerOrNot
bool useCombinerOrNot
Definition:
AbstractAggregateComp.h:214
pdb::AbstractAggregateComp::getNumPartitions
int getNumPartitions()
Definition:
AbstractAggregateComp.h:82
ScanUserSet.h
pdb::AbstractAggregateComp::numPartitions
int numPartitions
Definition:
AbstractAggregateComp.h:189
pdb::SimpleSingleTableQueryProcessorPtr
std::shared_ptr< SimpleSingleTableQueryProcessor > SimpleSingleTableQueryProcessorPtr
Definition:
SimpleSingleTableQueryProcessor.h:27
pdb::AbstractAggregateComp::materializeAggOut
bool materializeAggOut
Definition:
AbstractAggregateComp.h:209
pdb::AbstractAggregateComp::getCombinerProcessor
virtual SimpleSingleTableQueryProcessorPtr getCombinerProcessor(std::vector< HashPartitionID > nodePartitionIds)=0
pdb::AbstractAggregateComp::setNumPartitions
void setNumPartitions(int numPartitions)
Definition:
AbstractAggregateComp.h:73
pdb::AbstractAggregateComp::isUsingCombiner
bool isUsingCombiner() override
Definition:
AbstractAggregateComp.h:172
pdb::AbstractAggregateComp::setSetName
virtual void setSetName(std::string setName)=0
pdb::AbstractAggregateComp::setNumNodes
void setNumNodes(int numNodes)
Definition:
AbstractAggregateComp.h:90
pdb::AbstractAggregateComp::setIterator
virtual void setIterator(PageCircularBufferIteratorPtr iterator)=0
pdb::AbstractAggregateComp::setDatabaseName
virtual void setDatabaseName(std::string dbName)=0
pdb::AbstractAggregateComp::getAggregationProcessor
virtual SimpleSingleTableQueryProcessorPtr getAggregationProcessor(HashPartitionID id)=0
PageCircularBufferIteratorPtr
shared_ptr< PageCircularBufferIterator > PageCircularBufferIteratorPtr
Definition:
PageCircularBufferIterator.h:33
pdb::AbstractAggregateCompTypeID
Definition:
Computation.h:49
plinycompute
pdb
src
computations
headers
base
AbstractAggregateComp.h
Generated on Mon Jun 18 2018 18:10:35 by
1.8.6