diff --git .classpath._hbase .classpath._hbase
deleted file mode 100644
index 15fd1c5..0000000
--- .classpath._hbase
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git .gitignore .gitignore
index e54804f..a0449e0 100644
--- .gitignore
+++ .gitignore
@@ -1,6 +1,6 @@
build
build-eclipse
-.classpath
+.classpath*
.externalToolBuilders
.project
.settings
diff --git build-common.xml build-common.xml
index 53fd1b1..1e348c7 100644
--- build-common.xml
+++ build-common.xml
@@ -25,6 +25,8 @@
+
+
@@ -34,6 +36,8 @@
+
+
@@ -101,7 +105,7 @@
-
+
@@ -159,18 +163,18 @@
log="${ivyresolvelog}"/>
-
-
-
-
-
+
+
+
+
-
+
@@ -461,4 +465,15 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git build.xml build.xml
index dc20725..41a4dbc 100644
--- build.xml
+++ build.xml
@@ -25,6 +25,8 @@
+
+
@@ -91,6 +93,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -121,7 +145,7 @@
-
@@ -165,16 +189,24 @@
+
+
+
+
+
+
+
+
-
@@ -212,7 +244,7 @@
-
+
@@ -280,16 +312,16 @@
-
+
-
+
-
+
-
+
@@ -298,16 +330,16 @@
-
+
-
+
-
+
-
+
@@ -320,7 +352,7 @@
-
+
@@ -449,18 +481,21 @@
-
+
-
+
+
-
+
+
+
diff --git eclipse-templates/.classpath eclipse-templates/.classpath
index d06d6bd..23e33cc 100644
--- eclipse-templates/.classpath
+++ eclipse-templates/.classpath
@@ -16,10 +16,10 @@
-
-
-
-
+
+
+
+
@@ -33,25 +33,28 @@
-
-
+
+
+
+
-
+
-
+
-
+
+
-
+
diff --git eclipse-templates/.classpath._hbase eclipse-templates/.classpath._hbase
index b81c24a..f0e5a33 100644
--- eclipse-templates/.classpath._hbase
+++ eclipse-templates/.classpath._hbase
@@ -6,29 +6,29 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -42,7 +42,8 @@
-
+
+
@@ -53,7 +54,7 @@
-
+
-
+
diff --git ivy/libraries.properties ivy/libraries.properties
index fdd54c8..ef24aff 100644
--- ivy/libraries.properties
+++ ivy/libraries.properties
@@ -35,11 +35,16 @@ commons-lang.version=2.4
commons-logging.version=1.0.4
commons-logging-api.version=1.0.4
commons-pool.version=1.5.4
+hbase.version=0.20.3
+hbase-test.version=0.20.3
jdo-api.version=3.0.0
jdom.version=1.1
jline.version=0.9.94
junit.version=3.8.1
ivy.version=2.1.0
log4j.version=1.2.15
+slf4j-api.version=1.6.1
+slf4j-log4j12.version=1.6.1
+thrift.version=0.5.0
+thrift-fb303.version=0.5.0
zookeeper.version=3.2.2
-
diff --git lib/README lib/README
index 72d90b7..1c2f0b1 100644
--- lib/README
+++ lib/README
@@ -1,8 +1,8 @@
Folowing is the list of external jars contained in this directory and the sources from where they were obtained:
---------------------------------------------------------------------------------------------------------------
-* libfb303.jar - http://developers.facebook.com/thrift/
-* libthrift.jar - http://developers.facebook.com/thrift/
+* thrift-0.5.0.jar - http://thrift.apache.org/
+* thrift-fb303-0.5.0.jar - http://thrift.apache.org/
* jpox-core-1.2.2.jar - http://www.jpox.org/docs/download.html
* derby.jar - http://db.apache.org/derby/derby_downloads.html
* asm-3.1.jar - http://forge.objectweb.org/projects/asm/
diff --git lib/libfb303.LICENSE lib/libfb303.LICENSE
deleted file mode 100644
index 6b5c3b1..0000000
--- lib/libfb303.LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Thrift Software License
-
-Copyright © 2006- Facebook, Inc.
-
-Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the
-software and accompanying documentation covered by this license (the "Software") to use, reproduce,
-display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software,
-and to permit third-parties to whom the Software is furnished to do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including the above license grant,
-this restriction and the following disclaimer, must be included in all copies of the Software, in whole
-or in part, and all derivative works of the Software, unless such copies or derivative works are solely
-in the form of machine-executable object code generated by a source language processor.
-
-The software is provided "as is", without warranty of any kind, express or implied, including but not
-limited to the warranties of merchantability, fitness for a particular purpose, title and non-infringement.
-In no event shall the copyright holders or anyone distributing the software be liable for any damages or
-other liability, whether in contract, tort, or otherwise, arising from, out of or in connection with the
-software or the use or other dealings in the software.
diff --git lib/libfb303.jar lib/libfb303.jar
deleted file mode 100644
index 516b597..0000000
Binary files lib/libfb303.jar and /dev/null differ
diff --git lib/libthrift.LICENSE lib/libthrift.LICENSE
deleted file mode 100644
index 6b5c3b1..0000000
--- lib/libthrift.LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Thrift Software License
-
-Copyright © 2006- Facebook, Inc.
-
-Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the
-software and accompanying documentation covered by this license (the "Software") to use, reproduce,
-display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software,
-and to permit third-parties to whom the Software is furnished to do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including the above license grant,
-this restriction and the following disclaimer, must be included in all copies of the Software, in whole
-or in part, and all derivative works of the Software, unless such copies or derivative works are solely
-in the form of machine-executable object code generated by a source language processor.
-
-The software is provided "as is", without warranty of any kind, express or implied, including but not
-limited to the warranties of merchantability, fitness for a particular purpose, title and non-infringement.
-In no event shall the copyright holders or anyone distributing the software be liable for any damages or
-other liability, whether in contract, tort, or otherwise, arising from, out of or in connection with the
-software or the use or other dealings in the software.
diff --git lib/libthrift.jar lib/libthrift.jar
deleted file mode 100644
index 7e7f90e..0000000
Binary files lib/libthrift.jar and /dev/null differ
diff --git lib/thrift-0.5.0.jar lib/thrift-0.5.0.jar
new file mode 100644
index 0000000..f38617b
Binary files /dev/null and lib/thrift-0.5.0.jar differ
diff --git lib/thrift-fb303-0.5.0.jar lib/thrift-fb303-0.5.0.jar
new file mode 100644
index 0000000..bad90ce
Binary files /dev/null and lib/thrift-fb303-0.5.0.jar differ
diff --git lib/thrift-fb303.LICENSE lib/thrift-fb303.LICENSE
new file mode 100644
index 0000000..4eacb64
--- /dev/null
+++ lib/thrift-fb303.LICENSE
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
diff --git lib/thrift.LICENSE lib/thrift.LICENSE
new file mode 100644
index 0000000..9d189ef
--- /dev/null
+++ lib/thrift.LICENSE
@@ -0,0 +1,324 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+--------------------------------------------------
+SOFTWARE DISTRIBUTED WITH THRIFT:
+
+The Apache Thrift software includes a number of subcomponents with
+separate copyright notices and license terms. Your use of the source
+code for the these subcomponents is subject to the terms and
+conditions of the following licenses.
+
+--------------------------------------------------
+Portions of the following files are licensed under the MIT License:
+
+ lib/erl/src/Makefile.am
+
+Please see doc/otp-base-license.txt for the full terms of this license.
+
+
+--------------------------------------------------
+The following files contain some portions of code contributed under
+the Thrift Software License (see doc/old-thrift-license.txt), and relicensed
+under the Apache 2.0 License:
+
+ compiler/cpp/Makefile.am
+ compiler/cpp/src/generate/t_cocoa_generator.cc
+ compiler/cpp/src/generate/t_cpp_generator.cc
+ compiler/cpp/src/generate/t_csharp_generator.cc
+ compiler/cpp/src/generate/t_erl_generator.cc
+ compiler/cpp/src/generate/t_hs_generator.cc
+ compiler/cpp/src/generate/t_java_generator.cc
+ compiler/cpp/src/generate/t_ocaml_generator.cc
+ compiler/cpp/src/generate/t_perl_generator.cc
+ compiler/cpp/src/generate/t_php_generator.cc
+ compiler/cpp/src/generate/t_py_generator.cc
+ compiler/cpp/src/generate/t_rb_generator.cc
+ compiler/cpp/src/generate/t_st_generator.cc
+ compiler/cpp/src/generate/t_xsd_generator.cc
+ compiler/cpp/src/main.cc
+ compiler/cpp/src/parse/t_field.h
+ compiler/cpp/src/parse/t_program.h
+ compiler/cpp/src/platform.h
+ compiler/cpp/src/thriftl.ll
+ compiler/cpp/src/thrifty.yy
+ lib/csharp/src/Protocol/TBinaryProtocol.cs
+ lib/csharp/src/Protocol/TField.cs
+ lib/csharp/src/Protocol/TList.cs
+ lib/csharp/src/Protocol/TMap.cs
+ lib/csharp/src/Protocol/TMessage.cs
+ lib/csharp/src/Protocol/TMessageType.cs
+ lib/csharp/src/Protocol/TProtocol.cs
+ lib/csharp/src/Protocol/TProtocolException.cs
+ lib/csharp/src/Protocol/TProtocolFactory.cs
+ lib/csharp/src/Protocol/TProtocolUtil.cs
+ lib/csharp/src/Protocol/TSet.cs
+ lib/csharp/src/Protocol/TStruct.cs
+ lib/csharp/src/Protocol/TType.cs
+ lib/csharp/src/Server/TServer.cs
+ lib/csharp/src/Server/TSimpleServer.cs
+ lib/csharp/src/Server/TThreadPoolServer.cs
+ lib/csharp/src/TApplicationException.cs
+ lib/csharp/src/Thrift.csproj
+ lib/csharp/src/Thrift.sln
+ lib/csharp/src/TProcessor.cs
+ lib/csharp/src/Transport/TServerSocket.cs
+ lib/csharp/src/Transport/TServerTransport.cs
+ lib/csharp/src/Transport/TSocket.cs
+ lib/csharp/src/Transport/TStreamTransport.cs
+ lib/csharp/src/Transport/TTransport.cs
+ lib/csharp/src/Transport/TTransportException.cs
+ lib/csharp/src/Transport/TTransportFactory.cs
+ lib/csharp/ThriftMSBuildTask/Properties/AssemblyInfo.cs
+ lib/csharp/ThriftMSBuildTask/ThriftBuild.cs
+ lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj
+ lib/rb/lib/thrift.rb
+ lib/st/README
+ lib/st/thrift.st
+ test/OptionalRequiredTest.cpp
+ test/OptionalRequiredTest.thrift
+ test/ThriftTest.thrift
+
+--------------------------------------------------
+For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 components:
+
+# Copyright (c) 2007 Thomas Porschberg
+#
+# Copying and distribution of this file, with or without
+# modification, are permitted in any medium without royalty provided
+# the copyright notice and this notice are preserved.
+
+--------------------------------------------------
+For the compiler/cpp/src/md5.[ch] components:
+
+/*
+ Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+
+---------------------------------------------------
+For the lib/rb/setup.rb: Copyright (c) 2000-2005 Minero Aoki,
+lib/ocaml/OCamlMakefile and lib/ocaml/README-OCamlMakefile components:
+ Copyright (C) 1999 - 2007 Markus Mottl
+
+Licensed under the terms of the GNU Lesser General Public License 2.1
+(see doc/lgpl-2.1.txt for the full terms of this license)
diff --git metastore/build.xml metastore/build.xml
index ffb86c1..7f01f91 100755
--- metastore/build.xml
+++ metastore/build.xml
@@ -22,36 +22,37 @@
-
- Executing thrift (which needs to be in your path) to build java metastore APIs....
-
-
+
+ You must set the 'thrift.home' property!
+ Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/hive_metastore.thrift
+
+
-
+
Building Grammar ${src.dir}/java/org/apache/hadoop/hive/metastore/parser/Filter.g ....
-
+
-
+
@@ -47,5 +63,7 @@
+
+
diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index 96ef5b7..a636dbb 100644
--- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -416,7 +416,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
}
@Override
- public int getStatus() {
+ public fb_status getStatus() {
return fb_status.ALIVE;
}
diff --git metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
index 3c9369b..97637d2 100644
--- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
+++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
@@ -448,7 +448,12 @@ public class ObjectStore implements RawStore, Configurable {
.getComment()));
}
}
- return new Type(mtype.getName(), mtype.getType1(), mtype.getType2(), fields);
+ Type ret = new Type();
+ ret.setName(mtype.getName());
+ ret.setType1(mtype.getType1());
+ ret.setType2(mtype.getType2());
+ ret.setFields(fields);
+ return ret;
}
public boolean createType(Type type) {
diff --git odbc/Makefile odbc/Makefile
index 816ffd4..2750708 100644
--- odbc/Makefile
+++ odbc/Makefile
@@ -56,12 +56,13 @@ LINK = ln -sf
BUILD_DIR = $(HIVE_ROOT)/build
ODBC_BUILD_DIR = $(BUILD_DIR)/odbc
OBJ_SERVICE_BUILD_DIR = $(BUILD_DIR)/service/objs
-OBJ_FB303_BUILD_DIR = $(BUILD_DIR)/service/fb303/objs
+OBJ_QL_BUILD_DIR = $(BUILD_DIR)/ql/objs
OBJ_METASTORE_BUILD_DIR = $(BUILD_DIR)/metastore/objs
OBJ_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/objs
LIB_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/lib
TEST_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/test
-THRIFT_INCLUDE_PATH = $(HIVE_ROOT)/service/include/thrift
+THRIFT_INCLUDE_PATH=$(THRIFT_HOME)/include/thrift
+FB303_INCLUDE_PATH=$(THRIFT_INCLUDE_PATH)/fb303
INSTALL_PATH = /usr/local
INSTALL_LIB_PATH = $(INSTALL_PATH)/lib
INSTALL_INCLUDE_PATH = $(INSTALL_PATH)/include
@@ -85,11 +86,10 @@ SERVICE_SOURCES = ThriftHive.cpp \
hive_service_types.cpp
SERVICE_OBJS = $(addprefix $(OBJ_SERVICE_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(SERVICE_SOURCES))))
-FB303_SRC_DIR = $(THRIFT_INCLUDE_PATH)/fb303
-FB303_SOURCES = FacebookService.cpp \
- fb303_constants.cpp \
- fb303_types.cpp
-FB303_OBJS = $(addprefix $(OBJ_FB303_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(FB303_SOURCES))))
+QL_SRC_DIR = $(HIVE_ROOT)/ql/src/gen-cpp
+QL_SOURCES = queryplan_types.cpp queryplan_constants.cpp
+QL_OBJS = $(addprefix $(OBJ_QL_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(QL_SOURCES))))
+
METASTORE_SRC_DIR = $(HIVE_ROOT)/metastore/src/gen-cpp
METASTORE_SOURCES = ThriftHiveMetastore.cpp \
@@ -98,11 +98,13 @@ METASTORE_SOURCES = ThriftHiveMetastore.cpp \
METASTORE_OBJS = $(addprefix $(OBJ_METASTORE_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(METASTORE_SOURCES))))
ODBC_SRC_DIR = $(BASE_DIR)/src/cpp
+
ODBC_SOURCES = hiveclient.cpp \
HiveResultSet.cpp \
HiveColumnDesc.cpp \
HiveRowSet.cpp \
hiveclienthelper.cpp
+
ODBC_OBJS = $(addprefix $(OBJ_ODBC_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(ODBC_SOURCES))))
ODBC_TEST_SRC_DIR = $(BASE_DIR)/src/test
@@ -111,9 +113,10 @@ TEST_FLAGS = -DTEST_DATA_DIR=$(ODBC_TEST_DATA_DIR)
HIVE_CLIENT_TEST = $(TEST_ODBC_BUILD_DIR)/HiveClientTestC
INCLUDE_PATHS = -I$(THRIFT_INCLUDE_PATH) \
+ -I$(FB303_INCLUDE_PATH) \
-I$(BOOST_INCLUDE_PATH) \
- -I$(FB303_SRC_DIR) \
-I$(SERVICE_SRC_DIR) \
+ -I$(QL_SRC_DIR) \
-I$(METASTORE_SRC_DIR) \
-I$(ODBC_SRC_DIR)
@@ -127,20 +130,25 @@ LIB_THRIFT_DIR = $(THRIFT_HOME)/lib
LIB_THRIFT_ADD = -L$(LIB_THRIFT_DIR) -lthrift
LIB_THRIFT_AR = $(LIB_THRIFT_DIR)/libthrift.a
+LIB_FB303_DIR = $(THRIFT_HOME)/lib
+LIB_FB303_ADD = -L$(LIB_FB303_DIR) -lfb303
+LIB_FB303_AR = $(LIB_FB303_DIR)/libfb303.a
+
all:: $(AR_TARGET) $(SO_TARGET) $(HIVE_CLIENT_TEST)
-$(AR_TARGET): $(FB303_OBJS) $(METASTORE_OBJS) $(SERVICE_OBJS) $(ODBC_OBJS)
+$(AR_TARGET): $(METASTORE_OBJS) $(SERVICE_OBJS) $(QL_OBJS) $(ODBC_OBJS)
if test -z '$(THRIFT_HOME)'; then echo 'THRIFT_HOME directory?'; exit 1; else exit 0; fi
mkdir -p $(LIB_ODBC_BUILD_DIR)
$(AR) $(ARXFLAGS) $(LIB_THRIFT_AR) #Extract thrift archive
+ $(AR) $(ARXFLAGS) $(LIB_FB303_AR) #Extract fb303 archive
$(AR) $(ARFLAGS) $@ $+ *.o #Include all object files into new archive
rm *.o #Remove extracted archive object files
-$(SO_TARGET): $(FB303_OBJS) $(METASTORE_OBJS) $(SERVICE_OBJS) $(ODBC_OBJS)
+$(SO_TARGET): $(METASTORE_OBJS) $(SERVICE_OBJS) $(QL_OBJS) $(ODBC_OBJS)
if test -z '$(THRIFT_HOME)'; then echo 'THRIFT_HOME directory?'; exit 1; else exit 0; fi
mkdir -p $(LIB_ODBC_BUILD_DIR)
- $(LD) $(ARCH_FLAGS) $(LDFLAGS) $+ $(LIB_THRIFT_ADD) -o $@ \
+ $(LD) $(ARCH_FLAGS) $(LDFLAGS) $+ $(LIB_THRIFT_ADD) $(LIB_FB303_ADD) -o $@ \
&& $(LINK) $(SO_NAME) $(SO_LINK_TARGET)
@@ -148,8 +156,8 @@ $(OBJ_SERVICE_BUILD_DIR)/%.o: $(SERVICE_SRC_DIR)/%.cpp
mkdir -p $(OBJ_SERVICE_BUILD_DIR)
$(CXX) $(CXXFLAGS) $(ARCH_FLAGS) $(INCLUDE_PATHS) -c $< -o $@
-$(OBJ_FB303_BUILD_DIR)/%.o: $(FB303_SRC_DIR)/%.cpp
- mkdir -p $(OBJ_FB303_BUILD_DIR)
+$(OBJ_QL_BUILD_DIR)/%.o: $(QL_SRC_DIR)/%.cpp
+ mkdir -p $(OBJ_QL_BUILD_DIR)
$(CXX) $(CXXFLAGS) $(ARCH_FLAGS) $(INCLUDE_PATHS) -c $< -o $@
$(OBJ_METASTORE_BUILD_DIR)/%.o: $(METASTORE_SRC_DIR)/%.cpp
@@ -162,7 +170,7 @@ $(OBJ_ODBC_BUILD_DIR)/%.o: $(ODBC_SRC_DIR)/%.cpp
$(HIVE_CLIENT_TEST): $(SO_TARGET) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c
mkdir -p $(TEST_ODBC_BUILD_DIR)
- $(CC) $(CFLAGS) $(ARCH_FLAGS) $(TEST_FLAGS) $(INCLUDE_PATHS) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c -L$(LIB_ODBC_BUILD_DIR) -L$(LIB_THRIFT_DIR) -l$(LIB_NAME) -lthrift -o $@
+ $(CC) $(CFLAGS) $(ARCH_FLAGS) $(TEST_FLAGS) $(INCLUDE_PATHS) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c -L$(LIB_ODBC_BUILD_DIR) -L$(LIB_THRIFT_DIR) -l$(LIB_NAME) -lthrift $(LIB_FB303_ADD) -o $@
install: $(AR_TARGET) $(SO_TARGET)
@@ -179,7 +187,7 @@ uninstall:
rm -f $(HEADER_TARGETS)
clean:
- rm -rf $(ODBC_BUILD_DIR) $(OBJ_SERVICE_BUILD_DIR) $(OBJ_FB303_BUILD_DIR) $(OBJ_METASTORE_BUILD_DIR)
+ rm -rf $(ODBC_BUILD_DIR) $(OBJ_SERVICE_BUILD_DIR) $(OBJ_QL_BUILD_DIR) $(OBJ_METASTORE_BUILD_DIR)
test: $(AR_TARGET) $(SO_TARGET) $(HIVE_CLIENT_TEST)
- LD_LIBRARY_PATH=$(LIB_ODBC_BUILD_DIR):$(LIB_THRIFT_DIR):$(LD_LIBRARY_PATH) $(HIVE_CLIENT_TEST)
+ LD_LIBRARY_PATH=$(LIB_ODBC_BUILD_DIR):$(LIB_THRIFT_DIR):$(LIB_FB303_DIR):$(LD_LIBRARY_PATH) $(HIVE_CLIENT_TEST)
diff --git odbc/build.xml odbc/build.xml
index 64cf988..db9f4af 100644
--- odbc/build.xml
+++ odbc/build.xml
@@ -46,18 +46,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git odbc/src/cpp/HiveRowSet.cpp odbc/src/cpp/HiveRowSet.cpp
index b4dc2c0..3de6124 100644
--- odbc/src/cpp/HiveRowSet.cpp
+++ odbc/src/cpp/HiveRowSet.cpp
@@ -17,6 +17,7 @@
*/
#include
+#include
#include "HiveRowSet.h"
#include "hiveclienthelper.h"
diff --git odbc/src/cpp/hiveclienthelper.cpp odbc/src/cpp/hiveclienthelper.cpp
index e2d48f3..b0f3aae 100644
--- odbc/src/cpp/hiveclienthelper.cpp
+++ odbc/src/cpp/hiveclienthelper.cpp
@@ -18,6 +18,7 @@
#include
#include
+#include
#include "hiveclienthelper.h"
#include "thriftserverconstants.h"
diff --git ql/build.xml ql/build.xml
index a025a2b..3eea73c 100644
--- ql/build.xml
+++ ql/build.xml
@@ -28,7 +28,6 @@
-
@@ -55,10 +54,11 @@
-
- Executing thrift (which needs to be in your path) on if/queryplan.thrift
-
-
+
+ You must set the 'thrift.home' property!
+ Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/queryplan.thrift
+
+
@@ -132,27 +132,27 @@
-
+
Building Grammar ${src.dir}/org/apache/hadoop/hive/ql/parse/Hive.g ....
-
+
-
+
-
+
diff --git ql/if/queryplan.thrift ql/if/queryplan.thrift
index aca0e8f..0f59249 100644
--- ql/if/queryplan.thrift
+++ ql/if/queryplan.thrift
@@ -1,5 +1,5 @@
namespace java org.apache.hadoop.hive.ql.plan.api
-namespace cpp Hive
+namespace cpp Apache.Hadoop.Hive
enum AdjacencyType { CONJUNCTIVE, DISJUNCTIVE }
struct Adjacency {
@@ -16,7 +16,27 @@ struct Graph {
}
#Represents a operator along with its counters
-enum OperatorType { JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD }
+enum OperatorType {
+ JOIN,
+ MAPJOIN,
+ EXTRACT,
+ FILTER,
+ FORWARD,
+ GROUPBY,
+ LIMIT,
+ SCRIPT,
+ SELECT,
+ TABLESCAN,
+ FILESINK,
+ REDUCESINK,
+ UNION,
+ UDTF,
+ LATERALVIEWJOIN,
+ LATERALVIEWFORWARD,
+ HASHTABLESINK,
+ HASHTABLEDUMMY,
+}
+
struct Operator {
1: string operatorId,
2: OperatorType operatorType,
@@ -41,7 +61,18 @@ struct Task {
}
# Represents a Stage - unfortunately, it is represented as Task in ql/exec
-enum StageType { CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE }
+enum StageType {
+ CONDITIONAL,
+ COPY,
+ DDL,
+ MAPRED,
+ EXPLAIN,
+ FETCH,
+ FUNC,
+ MAPREDLOCAL,
+ MOVE,
+ STATS
+}
struct Stage {
1: string stageId,
diff --git ql/ivy.xml ql/ivy.xml
index e72a450..26041b5 100644
--- ql/ivy.xml
+++ ql/ivy.xml
@@ -3,6 +3,8 @@
-
+
+
+
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java
index 5ccb909..52d14ae 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java
@@ -132,7 +132,7 @@ public abstract class AbstractMapJoinOperator extends Co
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.MAPJOIN;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java
index 7daea2d..aa45b7d 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.ql.plan.api.OperatorType;
import org.apache.hadoop.hive.ql.plan.CollectDesc;
import org.apache.hadoop.hive.serde2.objectinspector.InspectableObject;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
@@ -78,7 +79,7 @@ public class CollectOperator extends Operator implements
}
@Override
- public int getType() {
- return -1;
+ public OperatorType getType() {
+ return null;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java
index bf7b7a5..90589ed 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java
@@ -172,7 +172,7 @@ public class ConditionalTask extends Task implements Serializab
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.CONDITIONAL;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java
index 46b8bf4..30ea670 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java
@@ -90,7 +90,7 @@ public class CopyTask extends Task implements Serializable {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.COPY;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
index aa3c189..0d1bdfd 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
@@ -2688,7 +2688,7 @@ public class DDLTask extends Task implements Serializable {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.DDL;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
index 49e708c..622cee8 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
@@ -1269,7 +1269,7 @@ public class ExecDriver extends Task implements Serializable {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.MAPRED;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
index a572bcb..9e0d48e 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
@@ -407,7 +407,7 @@ public class ExplainTask extends Task implements Serializable {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.EXPLAIN;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java
index 7bf8886..5257463 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java
@@ -46,7 +46,7 @@ public class ExtractOperator extends Operator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.EXTRACT;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
index de2c42d..5987a3c 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
@@ -151,7 +151,7 @@ public class FetchTask extends Task implements Serializable {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.FETCH;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
index d510f95..ba1a9b1 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
@@ -759,7 +759,7 @@ public class FileSinkOperator extends TerminalOperator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.FILESINK;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java
index 554bf25..44e0e31 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java
@@ -108,7 +108,7 @@ public class FilterOperator extends Operator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.FILTER;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java
index 2a35c96..4c15f69 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java
@@ -37,7 +37,7 @@ public class ForwardOperator extends Operator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.FORWARD;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java
index 1e6941e..225c5c7 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java
@@ -120,7 +120,7 @@ public class FunctionTask extends Task {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.FUNC;
}
@@ -133,4 +133,4 @@ public class FunctionTask extends Task {
protected void localizeMRTmpFilesImpl(Context ctx) {
throw new RuntimeException ("Unexpected call");
}
-}
\ No newline at end of file
+}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
index 8423178..e5de8d1 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
@@ -1039,7 +1039,7 @@ public class GroupByOperator extends Operator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.GROUPBY;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java
index 87fc61c..57ae5fc 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java
@@ -58,7 +58,7 @@ public class HashTableDummyOperator extends Operator impleme
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.HASHTABLEDUMMY;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java
index 4cf055f..43749d4 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java
@@ -442,10 +442,7 @@ public class HashTableSinkOperator extends TerminalOperator i
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.HASHTABLESINK;
}
-
-
-
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
index e16df36..b9714cc 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
@@ -133,7 +133,7 @@ public class JoinOperator extends CommonJoinOperator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.JOIN;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java
index c070aca..5bfb805 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java
@@ -43,7 +43,7 @@ public class LateralViewForwardOperator extends Operator
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.LATERALVIEWFORWARD;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java
index 5eb9098..f5c42ef 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java
@@ -143,7 +143,7 @@ public class LateralViewJoinOperator extends Operator {
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.LATERALVIEWJOIN;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java
index da5dbb9..b1958a5 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java
@@ -57,7 +57,7 @@ public class LimitOperator extends Operator implements Serializable {
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.LIMIT;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
index c9f99ac..dd7c723 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
@@ -297,7 +297,7 @@ public class MapJoinOperator extends AbstractMapJoinOperator implem
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.MAPJOIN;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
index 887ad30..3b7d5c1 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
@@ -34,6 +34,7 @@ import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.io.IOContext;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.metadata.VirtualColumn;
+import org.apache.hadoop.hive.ql.plan.api.OperatorType;
import org.apache.hadoop.hive.ql.plan.MapredWork;
import org.apache.hadoop.hive.ql.plan.PartitionDesc;
import org.apache.hadoop.hive.ql.plan.TableScanDesc;
@@ -519,8 +520,8 @@ public class MapOperator extends Operator implements Serializable {
}
@Override
- public int getType() {
- return -1;
+ public OperatorType getType() {
+ return null;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java
index 0fab63c..83bbc1c 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java
@@ -409,7 +409,4 @@ public class MapRedTask extends ExecDriver implements Serializable {
return null;
}
-
-
-
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java
index 2bb7ec5..ff5f010 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java
@@ -451,8 +451,8 @@ public class MapredLocalTask extends Task implements Serializab
}
@Override
- public int getType() {
- // assert false;
+ public StageType getType() {
+ //assert false;
return StageType.MAPREDLOCAL;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
index 7fbc586..d19b1db 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
@@ -283,7 +283,7 @@ public class MoveTask extends Task implements Serializable {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.MOVE;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
index 6c6ea89..dc3ea1e 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.ql.lib.Node;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.api.OperatorType;
import org.apache.hadoop.hive.ql.plan.Explain;
import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
@@ -1204,7 +1205,7 @@ public abstract class Operator implements Serializable,
*
* @return OperatorType.*
*/
- abstract public int getType();
+ abstract public OperatorType getType();
public void setGroupKeyObject(Object keyObject) {
this.groupKeyObject = keyObject;
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
index 592f4f7..2685820 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
@@ -314,7 +314,7 @@ public class ReduceSinkOperator extends TerminalOperator
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.REDUCESINK;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java
index 001d1f0..9c52deb 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java
@@ -588,7 +588,7 @@ public class SMBMapJoinOperator extends AbstractMapJoinOperator imp
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.MAPJOIN;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java
index 4f8b4bd..aec5fca 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java
@@ -662,7 +662,7 @@ public class ScriptOperator extends Operator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.SCRIPT;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java
index d644a33..3582e78 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java
@@ -93,7 +93,7 @@ public class SelectOperator extends Operator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.SELECT;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java
index 47adbed..b818dc5 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java
@@ -211,7 +211,7 @@ public class StatsTask extends Task implements Serializable {
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.STATS;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java
index 96e63b8..6ba7a9d 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java
@@ -181,7 +181,7 @@ public class TableScanOperator extends Operator implements
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.TABLESCAN;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java
index 95d90e6..d8636d8 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java
@@ -34,6 +34,7 @@ import org.apache.hadoop.hive.ql.QueryPlan;
import org.apache.hadoop.hive.ql.lib.Node;
import org.apache.hadoop.hive.ql.metadata.Hive;
import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.ql.plan.api.StageType;
import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.hadoop.hive.ql.session.SessionState.LogHelper;
import org.apache.hadoop.util.StringUtils;
@@ -351,14 +352,11 @@ public abstract class Task implements Serializable, Node
}
/**
- * Should be overridden to return the type of the specific task among the types in TaskType.
+ * Should be overridden to return the type of the specific task among the types in StageType.
*
- * @return TaskTypeType.* or -1 if not overridden
+ * @return StageType.* or null if not overridden
*/
- public int getType() {
- assert false;
- return -1;
- }
+ public abstract StageType getType();
/**
* If this task uses any map-reduce intermediate data (either for reading or for writing),
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java
index 682f38a..919656c 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java
@@ -118,7 +118,7 @@ public class UDTFOperator extends Operator implements Serializable {
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.UDTF;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java
index 2c42ed7..2462517 100644
--- ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java
@@ -141,7 +141,7 @@ public class UnionOperator extends Operator implements Serializable {
}
@Override
- public int getType() {
+ public OperatorType getType() {
return OperatorType.UNION;
}
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java
index 0d60507..1f01446 100644
--- ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java
+++ ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java
@@ -57,7 +57,7 @@ public class CompactIndexHandler extends AbstractIndexHandler {
Table indexTable) throws HiveException {
StorageDescriptor storageDesc = index.getSd();
if (this.usesIndexTable() && indexTable != null) {
- StorageDescriptor indexTableSd = storageDesc.clone();
+ StorageDescriptor indexTableSd = storageDesc.deepCopy();
List indexTblCols = indexTableSd.getCols();
FieldSchema bucketFileName = new FieldSchema("_bucketname", "string", "");
indexTblCols.add(bucketFileName);
diff --git ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java
index 734bd72..eac168f 100644
--- ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java
+++ ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java
@@ -96,7 +96,7 @@ public class IndexMetadataChangeTask extends Task{
}
@Override
- public int getType() {
+ public StageType getType() {
return StageType.DDL;
}
diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index 5d33550..9780fea 100644
--- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -514,7 +514,7 @@ public class Hive {
}
}
- org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor = baseTbl.getSd().clone();
+ org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor = baseTbl.getSd().deepCopy();
SerDeInfo serdeInfo = storageDescriptor.getSerdeInfo();
if(serde != null) {
serdeInfo.setSerializationLib(serde);
diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
index 33991f3..5a63196 100644
--- ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
+++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
@@ -730,7 +730,7 @@ public class Table implements Serializable {
}
public Table copy() throws HiveException {
- return new Table(tTable.clone());
+ return new Table(tTable.deepCopy());
}
public void setCreateTime(int createTime) {
diff --git serde/build.xml serde/build.xml
index b64b142..51ac8dd 100644
--- serde/build.xml
+++ serde/build.xml
@@ -30,7 +30,6 @@ to call at top-level: ant deploy-contrib compile-core-test
-
-
+
@@ -56,18 +55,19 @@ to call at top-level: ant deploy-contrib compile-core-test
-
- Executing thrift (which needs to be in your path) to build java serde Constants...
-
-
+
+ You must set the 'thrift.home' property!
+ Executing ${thrift.home}/bin/thrift to build java serde Constants...
+
+
- Executing thrift (which needs to be in your path) to build complex.thrift test classes...
-
-
+ Executing ${thrift.home}/bin/thrift to build complex.thrift test classes...
+
+
- Executing thrift (which needs to be in your path) to build testthrift.thrift classes...
-
-
+ Executing ${thrift.home}/bin/thrift to build testthrift.thrift classes...
+
+
diff --git serde/ivy.xml serde/ivy.xml
index da69342..2b38da4 100644
--- serde/ivy.xml
+++ serde/ivy.xml
@@ -1,8 +1,26 @@
+
-
+
+
+
diff --git serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java
index 961c24f..2a4d0b7 100644
--- serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java
+++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java
@@ -19,6 +19,7 @@
package org.apache.hadoop.hive.serde2.thrift;
import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Properties;
@@ -345,12 +346,39 @@ public class TBinarySortableProtocol extends TProtocol implements
}
@Override
+ public void writeBinary(ByteBuffer bin) throws TException {
+ if (bin == null) {
+ writeRawBytes(nullByte, 0, 1);
+ return;
+ }
+
+ int length = bin.limit() - bin.position() - bin.arrayOffset();
+ if (bin.hasArray()) {
+ writeBinary(bin.array(), bin.arrayOffset() + bin.position(),
+ length);
+ } else {
+ byte []copy = new byte[length];
+ bin.get(copy);
+ writeBinary(copy);
+ }
+ }
+
public void writeBinary(byte[] bin) throws TException {
if (bin == null) {
writeRawBytes(nullByte, 0, 1);
} else {
- writeI32(bin.length);
- writeRawBytes(bin, 0, bin.length);
+ writeBinary(bin, 0, bin.length);
+ }
+ }
+
+
+ public void writeBinary(byte[] bin, int offset, int length)
+ throws TException {
+ if (bin == null) {
+ writeRawBytes(nullByte, 0, 1);
+ } else {
+ writeI32(length);
+ writeRawBytes(bin, offset, length);
}
}
@@ -612,14 +640,14 @@ public class TBinarySortableProtocol extends TProtocol implements
}
@Override
- public byte[] readBinary() throws TException {
+ public ByteBuffer readBinary() throws TException {
int size = readI32();
if (lastPrimitiveWasNull) {
return null;
}
byte[] buf = new byte[size];
readRawAll(buf, 0, size);
- return buf;
+ return ByteBuffer.wrap(buf);
}
boolean lastPrimitiveWasNull;
diff --git serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java
index e781a06..5757e3b 100644
--- serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java
+++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hive.serde2.thrift;
import java.io.EOFException;
import java.nio.charset.CharacterCodingException;
+import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.Properties;
@@ -605,7 +606,7 @@ public class TCTLSeparatedProtocol extends TProtocol implements
}
@Override
- public void writeBinary(byte[] bin) throws TException {
+ public void writeBinary(ByteBuffer bin) throws TException {
throw new TException(
"Ctl separated protocol cannot support writing Binary data!");
}
@@ -838,7 +839,7 @@ public class TCTLSeparatedProtocol extends TProtocol implements
}
@Override
- public byte[] readBinary() throws TException {
+ public ByteBuffer readBinary() throws TException {
throw new TException("Not implemented for control separated data");
}
}
diff --git serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java
index 4bdcf88..a18f4a7 100644
--- serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java
+++ serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java
@@ -56,15 +56,15 @@ public class TestObjectInspectorUtils extends TestCase {
// real object
Complex cc = new Complex();
- cc.aint = 1;
- cc.aString = "test";
+ cc.setAint(1);
+ cc.setAString("test");
List c2 = Arrays.asList(new Integer[] {1, 2, 3});
- cc.lint = c2;
+ cc.setLint(c2);
List c3 = Arrays.asList(new String[] {"one", "two"});
- cc.lString = c3;
+ cc.setLString(c3);
List c4 = new ArrayList();
- cc.lintString = c4;
- cc.mStringString = null;
+ cc.setLintString(c4);
+ cc.setMStringString(null);
// standard object
Object c = ObjectInspectorUtils.copyToStandardObject(cc, oi1);
diff --git serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java
index 99b0e90..5f692fb 100644
--- serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java
+++ serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java
@@ -59,15 +59,15 @@ public class TestThriftObjectInspectors extends TestCase {
// real object
Complex c = new Complex();
- c.aint = 1;
- c.aString = "test";
+ c.setAint(1);
+ c.setAString("test");
List c2 = Arrays.asList(new Integer[] {1, 2, 3});
- c.lint = c2;
+ c.setLint(c2);
List c3 = Arrays.asList(new String[] {"one", "two"});
- c.lString = c3;
+ c.setLString(c3);
List c4 = new ArrayList();
- c.lintString = c4;
- c.mStringString = null;
+ c.setLintString(c4);
+ c.setMStringString(null);
assertEquals(1, soi.getStructFieldData(c, fields.get(0)));
assertEquals("test", soi.getStructFieldData(c, fields.get(1)));
diff --git service/build.xml service/build.xml
index ffd1854..3c54625 100644
--- service/build.xml
+++ service/build.xml
@@ -26,7 +26,6 @@
-
@@ -41,17 +40,18 @@
-
- Executing thrift (which needs to be in your path) on if/hive_service.thrift
-
-
+
+ You must set the 'thrift.home' property!
+ Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/hive_service.thrift
+
+
-#else
-#include
-#endif
-
-#ifdef HAVE_STDINT_H
-#include
-#endif
-
-/**
- * T_GLOBAL_DEBUGGING_LEVEL = 0: all debugging turned off, debug macros undefined
- * T_GLOBAL_DEBUGGING_LEVEL = 1: all debugging turned on
- */
-#define T_GLOBAL_DEBUGGING_LEVEL 0
-
-
-/**
- * T_GLOBAL_LOGGING_LEVEL = 0: all logging turned off, logging macros undefined
- * T_GLOBAL_LOGGING_LEVEL = 1: all logging turned on
- */
-#define T_GLOBAL_LOGGING_LEVEL 1
-
-
-/**
- * Standard wrapper around fprintf what will prefix the file name and line
- * number to the line. Uses T_GLOBAL_DEBUGGING_LEVEL to control whether it is
- * turned on or off.
- *
- * @param format_string
- */
-#if T_GLOBAL_DEBUGGING_LEVEL > 0
- #define T_DEBUG(format_string,...) \
- if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \
- fprintf(stderr,"[%s,%d] " #format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \
- }
-#else
- #define T_DEBUG(format_string,...)
-#endif
-
-
-/**
- * analagous to T_DEBUG but also prints the time
- *
- * @param string format_string input: printf style format string
- */
-#if T_GLOBAL_DEBUGGING_LEVEL > 0
- #define T_DEBUG_T(format_string,...) \
- { \
- if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \
- time_t now; \
- char dbgtime[26] ; \
- time(&now); \
- ctime_r(&now, dbgtime); \
- dbgtime[24] = '\0'; \
- fprintf(stderr,"[%s,%d] [%s] " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \
- } \
- }
-#else
- #define T_DEBUG_T(format_string,...)
-#endif
-
-
-/**
- * analagous to T_DEBUG but uses input level to determine whether or not the string
- * should be logged.
- *
- * @param int level: specified debug level
- * @param string format_string input: format string
- */
-#define T_DEBUG_L(level, format_string,...) \
- if ((level) > 0) { \
- fprintf(stderr,"[%s,%d] " #format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \
- }
-
-
-/**
- * Explicit error logging. Prints time, file name and line number
- *
- * @param string format_string input: printf style format string
- */
-#define T_ERROR(format_string,...) \
- { \
- time_t now; \
- char dbgtime[26] ; \
- time(&now); \
- ctime_r(&now, dbgtime); \
- dbgtime[24] = '\0'; \
- fprintf(stderr,"[%s,%d] [%s] ERROR: " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \
- }
-
-
-/**
- * Analagous to T_ERROR, additionally aborting the process.
- * WARNING: macro calls abort(), ending program execution
- *
- * @param string format_string input: printf style format string
- */
-#define T_ERROR_ABORT(format_string,...) \
- { \
- time_t now; \
- char dbgtime[26] ; \
- time(&now); \
- ctime_r(&now, dbgtime); \
- dbgtime[24] = '\0'; \
- fprintf(stderr,"[%s,%d] [%s] ERROR: Going to abort " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \
- exit(1); \
- }
-
-
-/**
- * Log input message
- *
- * @param string format_string input: printf style format string
- */
-#if T_GLOBAL_LOGGING_LEVEL > 0
- #define T_LOG_OPER(format_string,...) \
- { \
- if (T_GLOBAL_LOGGING_LEVEL > 0) { \
- time_t now; \
- char dbgtime[26] ; \
- time(&now); \
- ctime_r(&now, dbgtime); \
- dbgtime[24] = '\0'; \
- fprintf(stderr,"[%s] " #format_string " \n", dbgtime,##__VA_ARGS__); \
- } \
- }
-#else
- #define T_LOG_OPER(format_string,...)
-#endif
-
-#endif // #ifndef _THRIFT_TLOGGING_H_
diff --git service/include/thrift/TProcessor.h service/include/thrift/TProcessor.h
deleted file mode 100644
index f2d5279..0000000
--- service/include/thrift/TProcessor.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _THRIFT_TPROCESSOR_H_
-#define _THRIFT_TPROCESSOR_H_ 1
-
-#include
-#include
-#include
-
-namespace apache { namespace thrift {
-
-/**
- * A processor is a generic object that acts upon two streams of data, one
- * an input and the other an output. The definition of this object is loose,
- * though the typical case is for some sort of server that either generates
- * responses to an input stream or forwards data from one pipe onto another.
- *
- */
-class TProcessor {
- public:
- virtual ~TProcessor() {}
-
- virtual bool process(boost::shared_ptr in,
- boost::shared_ptr out) = 0;
-
- bool process(boost::shared_ptr io) {
- return process(io, io);
- }
-
- protected:
- TProcessor() {}
-};
-
-}} // apache::thrift
-
-#endif // #ifndef _THRIFT_PROCESSOR_H_
diff --git service/include/thrift/TReflectionLocal.h service/include/thrift/TReflectionLocal.h
deleted file mode 100644
index e83e475..0000000
--- service/include/thrift/TReflectionLocal.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _THRIFT_TREFLECTIONLOCAL_H_
-#define _THRIFT_TREFLECTIONLOCAL_H_ 1
-
-#include
-#include
-#include
-
-/**
- * Local Reflection is a blanket term referring to the the structure
- * and generation of this particular representation of Thrift types.
- * (It is called local because it cannot be serialized by Thrift).
- *
- */
-
-namespace apache { namespace thrift { namespace reflection { namespace local {
-
-using apache::thrift::protocol::TType;
-
-// We include this many bytes of the structure's fingerprint when serializing
-// a top-level structure. Long enough to make collisions unlikely, short
-// enough to not significantly affect the amount of memory used.
-const int FP_PREFIX_LEN = 4;
-
-struct FieldMeta {
- int16_t tag;
- bool is_optional;
-};
-
-struct TypeSpec {
- TType ttype;
- uint8_t fp_prefix[FP_PREFIX_LEN];
-
- // Use an anonymous union here so we can fit two TypeSpecs in one cache line.
- union {
- struct {
- // Use parallel arrays here for denser packing (of the arrays).
- FieldMeta* metas;
- TypeSpec** specs;
- } tstruct;
- struct {
- TypeSpec *subtype1;
- TypeSpec *subtype2;
- } tcontainer;
- };
-
- // Static initialization of unions isn't really possible,
- // so take the plunge and use constructors.
- // Hopefully they'll be evaluated at compile time.
-
- TypeSpec(TType ttype) : ttype(ttype) {
- std::memset(fp_prefix, 0, FP_PREFIX_LEN);
- }
-
- TypeSpec(TType ttype,
- const uint8_t* fingerprint,
- FieldMeta* metas,
- TypeSpec** specs) :
- ttype(ttype)
- {
- std::memcpy(fp_prefix, fingerprint, FP_PREFIX_LEN);
- tstruct.metas = metas;
- tstruct.specs = specs;
- }
-
- TypeSpec(TType ttype, TypeSpec* subtype1, TypeSpec* subtype2) :
- ttype(ttype)
- {
- std::memset(fp_prefix, 0, FP_PREFIX_LEN);
- tcontainer.subtype1 = subtype1;
- tcontainer.subtype2 = subtype2;
- }
-
-};
-
-}}}} // apache::thrift::reflection::local
-
-#endif // #ifndef _THRIFT_TREFLECTIONLOCAL_H_
diff --git service/include/thrift/Thrift.h service/include/thrift/Thrift.h
deleted file mode 100644
index 27a6476..0000000
--- service/include/thrift/Thrift.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _THRIFT_THRIFT_H_
-#define _THRIFT_THRIFT_H_ 1
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include
-
-#include
-#include
-#ifdef HAVE_INTTYPES_H
-#include
-#endif
-#include
-#include