PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/odbc/src/cpp/HiveConnection.h

#
C Header | 58 lines | 13 code | 9 blank | 36 comment | 0 complexity | 1a184c8728d54f02d399397eb839a8fe MD5 | raw file
 1/**************************************************************************//**
 2 *
 3 * Licensed to the Apache Software Foundation (ASF) under one
 4 * or more contributor license agreements.  See the NOTICE file
 5 * distributed with this work for additional information
 6 * regarding copyright ownership.  The ASF licenses this file
 7 * to you under the Apache License, Version 2.0 (the
 8 * "License"); you may not use this file except in compliance
 9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 ******************************************************************************
20 *
21 * @file HiveConnection.h
22 * @brief Provides the HiveConnection struct
23 *
24 *****************************************************************************/
25
26
27#ifndef __hive_connection_h__
28#define __hive_connection_h__
29
30#include "ThriftHive.h"
31#include <boost/shared_ptr.hpp>
32
33using namespace boost;
34using namespace apache::thrift::transport;
35
36
37/*************************************************************************************************
38 * HiveConnection Class Definition
39 ************************************************************************************************/
40
41/**
42 * @brief Container class for Hive database connections.
43 *
44 * This class stores the Hive database connection information. It was only meant to be created by
45 * DBOpenConnection and destroyed by DBCloseConnection.
46 *
47 * @see DBOpenConnection()
48 * @see DBCloseConnection()
49 */
50struct HiveConnection {
51  HiveConnection(shared_ptr<Apache::Hadoop::Hive::ThriftHiveClient> c, shared_ptr<TTransport> t) :
52    client(c), transport(t) {}
53  shared_ptr<Apache::Hadoop::Hive::ThriftHiveClient> client;
54  shared_ptr<TTransport> transport;
55};
56
57
58#endif // __hive_connection_h__