Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <object-pool.h>
Classes | |
struct | GenericElement |
struct | SpecificElement |
Public Member Functions | |
ObjectPool () | |
~ObjectPool () | |
template<class T > | |
T * | Add (T *t) |
Private Types | |
typedef std::vector < GenericElement * > | ElementVector |
Private Attributes | |
ElementVector | objects_ |
SpinLock | lock_ |
An ObjectPool maintains a list of C++ objects which are deallocated by destroying the pool. Thread-safe.
Definition at line 30 of file object-pool.h.
|
private |
Definition at line 66 of file object-pool.h.
|
inline |
Definition at line 32 of file object-pool.h.
|
inline |
Definition at line 34 of file object-pool.h.
References objects_.
|
inline |
Create the object to be pushed to the shared vector outside the critical section. TODO: Consider using a lock-free structure.
Definition at line 42 of file object-pool.h.
References lock_, and objects_.
Referenced by impala::Sorter::AddBatch(), impala::RuntimeProfile::AddDerivedCounter(), impala::ScannerContext::AddStream(), impala::RuntimeProfile::AddThreadCounters(), impala::HdfsScanNode::AllocateScanRange(), impala::Coordinator::BackendExecState::BackendExecState(), impala::ExprContext::Clone(), impala::AggFnEvaluator::Create(), impala::DescriptorTbl::Create(), impala::HdfsScanNode::CreateAndPrepareScanner(), impala::CreateAnyVal(), impala::LlvmCodeGenTest::CreateCodegen(), impala::SimpleTupleStreamTest::CreateDescriptors(), impala::SimpleNullStreamTest::CreateDescriptors(), impala::MultiTupleStreamTest::CreateDescriptors(), impala::MultiNullableTupleStreamTest::CreateDescriptors(), impala::Expr::CreateExpr(), impala::PartitionedAggregationNode::CreateHashPartitions(), impala::SimpleTupleStreamTest::CreateIntBatch(), impala::ExecNode::CreateNode(), impala::HdfsParquetScanner::CreateReader(), impala::RowBatchListTest::CreateRowBatch(), impala::SimpleTupleStreamTest::CreateStringBatch(), impala::Expr::CreateTreeFromThrift(), impala::DataStreamRecvr::DataStreamRecvr(), impala::DescriptorTblBuilder::DeclareTuple(), impala::BufferedBlockMgr::FindBuffer(), impala::DiskIoMgr::GetBufferDesc(), impala::BufferedBlockMgr::GetNewBlock(), impala::HdfsTableSink::GetOutputPartition(), impala::BufferedBlockMgr::GetUnusedBlock(), impala::HdfsTableDescriptor::HdfsTableDescriptor(), impala::HdfsParquetTableWriter::Init(), impala::Sorter::Init(), impala::PartitionedAggregationNode::Partition::InitStreams(), impala::Sorter::MergeIntermediateRuns(), impala::HdfsScanNode::Open(), impala::BufferedBlockMgr::PinBlock(), impala::HBaseTableSink::Prepare(), impala::AggregationNode::Prepare(), impala::SortedRunMerger::Prepare(), impala::AnalyticEvalNode::Prepare(), impala::PartitionedHashJoinNode::Prepare(), impala::DataStreamSender::Prepare(), impala::PartitionedAggregationNode::Prepare(), impala::HdfsTableSink::Prepare(), impala::PartitionedHashJoinNode::ProcessBuildInput(), impala::BaseSequenceScanner::ProcessSplit(), impala::BufferedBlockMgr::RegisterClient(), impala::RuntimeProfile::RuntimeProfile(), impala::HdfsScanNode::ScannerThread(), impala::RowBatchListTest::SetUp(), impala::OldHashTableTest::SetUp(), impala::HashTableTest::SetUp(), impala::TEST(), impala::TEST_F(), impala::TestSingleLiteralConstruction(), impala::RuntimeProfile::UpdateAverage(), and impala::BufferedBlockMgr::WriteUnpinnedBlock().
|
private |
Definition at line 68 of file object-pool.h.
Referenced by Add().
|
private |
Definition at line 67 of file object-pool.h.
Referenced by Add(), and ~ObjectPool().