PageRenderTime 59ms CodeModel.GetById 13ms 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
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  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. #ifndef __hive_connection_h__
  26. #define __hive_connection_h__
  27. #include "ThriftHive.h"
  28. #include <boost/shared_ptr.hpp>
  29. using namespace boost;
  30. using namespace apache::thrift::transport;
  31. /*************************************************************************************************
  32. * HiveConnection Class Definition
  33. ************************************************************************************************/
  34. /**
  35. * @brief Container class for Hive database connections.
  36. *
  37. * This class stores the Hive database connection information. It was only meant to be created by
  38. * DBOpenConnection and destroyed by DBCloseConnection.
  39. *
  40. * @see DBOpenConnection()
  41. * @see DBCloseConnection()
  42. */
  43. struct HiveConnection {
  44. HiveConnection(shared_ptr<Apache::Hadoop::Hive::ThriftHiveClient> c, shared_ptr<TTransport> t) :
  45. client(c), transport(t) {}
  46. shared_ptr<Apache::Hadoop::Hive::ThriftHiveClient> client;
  47. shared_ptr<TTransport> transport;
  48. };
  49. #endif // __hive_connection_h__