You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by am...@apache.org on 2011/09/05 11:08:20 UTC
svn commit: r1165216 [16/19] - in /hive/branches/branch-0.8: ./ cli/
eclipse-templates/ ivy/ jdbc/ lib/ metastore/
metastore/src/gen/thrift/gen-cpp/
metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen/thrift/ge...
Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java (original)
+++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
@@ -20,25 +20,19 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
-public class IntString implements TBase<IntString, IntString._Fields>, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("IntString");
-
- private static final TField MYINT_FIELD_DESC = new TField("myint", TType.I32, (short)1);
- private static final TField MY_STRING_FIELD_DESC = new TField("myString", TType.STRING, (short)2);
- private static final TField UNDERSCORE_INT_FIELD_DESC = new TField("underscore_int", TType.I32, (short)3);
-
- private int myint;
- private String myString;
- private int underscore_int;
+public class IntString implements org.apache.thrift.TBase<IntString, IntString._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IntString");
+
+ private static final org.apache.thrift.protocol.TField MYINT_FIELD_DESC = new org.apache.thrift.protocol.TField("myint", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MY_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("myString", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField UNDERSCORE_INT_FIELD_DESC = new org.apache.thrift.protocol.TField("underscore_int", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private int myint; // required
+ private String myString; // required
+ private int underscore_int; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements TFieldIdEnum {
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MYINT((short)1, "myint"),
MY_STRING((short)2, "myString"),
UNDERSCORE_INT((short)3, "underscore_int");
@@ -106,17 +100,17 @@ public class IntString implements TBase<
private static final int __UNDERSCORE_INT_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
- public static final Map<_Fields, FieldMetaData> metaDataMap;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.MYINT, new FieldMetaData("myint", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.I32)));
- tmpMap.put(_Fields.MY_STRING, new FieldMetaData("myString", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- tmpMap.put(_Fields.UNDERSCORE_INT, new FieldMetaData("underscore_int", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.I32)));
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.MYINT, new org.apache.thrift.meta_data.FieldMetaData("myint", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MY_STRING, new org.apache.thrift.meta_data.FieldMetaData("myString", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UNDERSCORE_INT, new org.apache.thrift.meta_data.FieldMetaData("underscore_int", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(IntString.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IntString.class, metaDataMap);
}
public IntString() {
@@ -174,7 +168,7 @@ public class IntString implements TBase<
__isset_bit_vector.clear(__MYINT_ISSET_ID);
}
- /** Returns true if field myint is set (has been asigned a value) and false otherwise */
+ /** Returns true if field myint is set (has been assigned a value) and false otherwise */
public boolean isSetMyint() {
return __isset_bit_vector.get(__MYINT_ISSET_ID);
}
@@ -195,7 +189,7 @@ public class IntString implements TBase<
this.myString = null;
}
- /** Returns true if field myString is set (has been asigned a value) and false otherwise */
+ /** Returns true if field myString is set (has been assigned a value) and false otherwise */
public boolean isSetMyString() {
return this.myString != null;
}
@@ -219,7 +213,7 @@ public class IntString implements TBase<
__isset_bit_vector.clear(__UNDERSCORE_INT_ISSET_ID);
}
- /** Returns true if field underscore_int is set (has been asigned a value) and false otherwise */
+ /** Returns true if field underscore_int is set (has been assigned a value) and false otherwise */
public boolean isSetUnderscore_int() {
return __isset_bit_vector.get(__UNDERSCORE_INT_ISSET_ID);
}
@@ -260,19 +254,19 @@ public class IntString implements TBase<
public Object getFieldValue(_Fields field) {
switch (field) {
case MYINT:
- return new Integer(getMyint());
+ return Integer.valueOf(getMyint());
case MY_STRING:
return getMyString();
case UNDERSCORE_INT:
- return new Integer(getUnderscore_int());
+ return Integer.valueOf(getUnderscore_int());
}
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@@ -350,7 +344,7 @@ public class IntString implements TBase<
return lastComparison;
}
if (isSetMyint()) {
- lastComparison = TBaseHelper.compareTo(this.myint, typedOther.myint);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myint, typedOther.myint);
if (lastComparison != 0) {
return lastComparison;
}
@@ -360,7 +354,7 @@ public class IntString implements TBase<
return lastComparison;
}
if (isSetMyString()) {
- lastComparison = TBaseHelper.compareTo(this.myString, typedOther.myString);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myString, typedOther.myString);
if (lastComparison != 0) {
return lastComparison;
}
@@ -370,7 +364,7 @@ public class IntString implements TBase<
return lastComparison;
}
if (isSetUnderscore_int()) {
- lastComparison = TBaseHelper.compareTo(this.underscore_int, typedOther.underscore_int);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.underscore_int, typedOther.underscore_int);
if (lastComparison != 0) {
return lastComparison;
}
@@ -382,41 +376,41 @@ public class IntString implements TBase<
return _Fields.findByThriftId(fieldId);
}
- public void read(TProtocol iprot) throws TException {
- TField field;
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
- if (field.type == TType.STOP) {
+ if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // MYINT
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.myint = iprot.readI32();
setMyintIsSet(true);
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // MY_STRING
- if (field.type == TType.STRING) {
+ if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.myString = iprot.readString();
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // UNDERSCORE_INT
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.underscore_int = iprot.readI32();
setUnderscore_intIsSet(true);
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@@ -424,7 +418,7 @@ public class IntString implements TBase<
validate();
}
- public void write(TProtocol oprot) throws TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -467,9 +461,27 @@ public class IntString implements TBase<
return sb.toString();
}
- public void validate() throws TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
}
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bit_vector = new BitSet(1);
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
}
Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_constants.php
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_constants.php?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_constants.php (original)
+++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_constants.php Mon Sep 5 09:08:16 2011
@@ -1,6 +1,6 @@
<?php
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_types.php
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_types.php?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_types.php (original)
+++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-php/serde/serde_types.php Mon Sep 5 09:08:16 2011
@@ -1,6 +1,6 @@
<?php
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py (original)
+++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
#
-# Autogenerated by Thrift
+# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py (original)
+++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
#
-# Autogenerated by Thrift
+# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_constants.rb
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_constants.rb?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_constants.rb (original)
+++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_constants.rb Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
#
-# Autogenerated by Thrift
+# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_types.rb
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_types.rb?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_types.rb (original)
+++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-rb/serde_types.rb Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
#
-# Autogenerated by Thrift
+# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Modified: hive/branches/branch-0.8/service/ivy.xml
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/ivy.xml?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/ivy.xml (original)
+++ hive/branches/branch-0.8/service/ivy.xml Mon Sep 5 09:08:16 2011
@@ -23,4 +23,10 @@
http://wiki.apache.org/hadoop/Hive
</description>
</info>
+ <dependencies>
+ <dependency org="org.apache.thrift" name="libthrift" rev="${libthrift.version}"
+ transitive="false"/>
+ <dependency org="org.apache.thrift" name="libfb303" rev="${libfb303.version}"
+ transitive="false"/>
+ </dependencies>
</ivy-module>
Modified: hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.cpp
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.cpp?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.cpp (original)
+++ hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.cpp Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
@@ -460,7 +460,7 @@ uint32_t ThriftHive_fetchN_result::write
if (this->__isset.success) {
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size());
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
std::vector<std::string> ::const_iterator _iter6;
for (_iter6 = this->success.begin(); _iter6 != this->success.end(); ++_iter6)
{
@@ -656,7 +656,7 @@ uint32_t ThriftHive_fetchAll_result::wri
if (this->__isset.success) {
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
{
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size());
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
std::vector<std::string> ::const_iterator _iter17;
for (_iter17 = this->success.begin(); _iter17 != this->success.end(); ++_iter17)
{
@@ -1530,8 +1530,8 @@ void ThriftHiveClient::send_execute(cons
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_execute()
@@ -1553,13 +1553,11 @@ void ThriftHiveClient::recv_execute()
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("execute") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_execute_presult result;
result.read(iprot_);
@@ -1587,8 +1585,8 @@ void ThriftHiveClient::send_fetchOne()
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_fetchOne(std::string& _return)
@@ -1610,13 +1608,11 @@ void ThriftHiveClient::recv_fetchOne(std
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("fetchOne") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_fetchOne_presult result;
result.success = &_return;
@@ -1650,8 +1646,8 @@ void ThriftHiveClient::send_fetchN(const
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_fetchN(std::vector<std::string> & _return)
@@ -1673,13 +1669,11 @@ void ThriftHiveClient::recv_fetchN(std::
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("fetchN") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_fetchN_presult result;
result.success = &_return;
@@ -1712,8 +1706,8 @@ void ThriftHiveClient::send_fetchAll()
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_fetchAll(std::vector<std::string> & _return)
@@ -1735,13 +1729,11 @@ void ThriftHiveClient::recv_fetchAll(std
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("fetchAll") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_fetchAll_presult result;
result.success = &_return;
@@ -1774,8 +1766,8 @@ void ThriftHiveClient::send_getSchema()
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_getSchema(Apache::Hadoop::Hive::Schema& _return)
@@ -1797,13 +1789,11 @@ void ThriftHiveClient::recv_getSchema(Ap
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("getSchema") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_getSchema_presult result;
result.success = &_return;
@@ -1836,8 +1826,8 @@ void ThriftHiveClient::send_getThriftSch
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _return)
@@ -1859,13 +1849,11 @@ void ThriftHiveClient::recv_getThriftSch
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("getThriftSchema") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_getThriftSchema_presult result;
result.success = &_return;
@@ -1898,8 +1886,8 @@ void ThriftHiveClient::send_getClusterSt
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_getClusterStatus(HiveClusterStatus& _return)
@@ -1921,13 +1909,11 @@ void ThriftHiveClient::recv_getClusterSt
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("getClusterStatus") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_getClusterStatus_presult result;
result.success = &_return;
@@ -1960,8 +1946,8 @@ void ThriftHiveClient::send_getQueryPlan
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return)
@@ -1983,13 +1969,11 @@ void ThriftHiveClient::recv_getQueryPlan
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("getQueryPlan") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_getQueryPlan_presult result;
result.success = &_return;
@@ -2022,8 +2006,8 @@ void ThriftHiveClient::send_clean()
args.write(oprot_);
oprot_->writeMessageEnd();
- oprot_->getTransport()->flush();
oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
}
void ThriftHiveClient::recv_clean()
@@ -2045,13 +2029,11 @@ void ThriftHiveClient::recv_clean()
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
if (fname.compare("clean") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
ThriftHive_clean_presult result;
result.read(iprot_);
@@ -2061,7 +2043,7 @@ void ThriftHiveClient::recv_clean()
return;
}
-bool ThriftHiveProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot) {
+bool ThriftHiveProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) {
::apache::thrift::protocol::TProtocol* iprot = piprot.get();
::apache::thrift::protocol::TProtocol* oprot = poprot.get();
@@ -2079,30 +2061,44 @@ bool ThriftHiveProcessor::process(boost:
oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
- return true;
+ oprot->getTransport()->flush();
+ return false;
}
- return process_fn(iprot, oprot, fname, seqid);
+ return process_fn(iprot, oprot, fname, seqid, callContext);
}
-bool ThriftHiveProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) {
- std::map<std::string, void (ThriftHiveProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*)>::iterator pfn;
+bool ThriftHiveProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) {
+ std::map<std::string, void (ThriftHiveProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)>::iterator pfn;
pfn = processMap_.find(fname);
if (pfn == processMap_.end()) {
- return Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::process_fn(iprot, oprot, fname, seqid);
+ return Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::process_fn(iprot, oprot, fname, seqid, callContext);
}
- (this->*(pfn->second))(seqid, iprot, oprot);
+ (this->*(pfn->second))(seqid, iprot, oprot, callContext);
return true;
}
-void ThriftHiveProcessor::process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.execute", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.execute");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.execute");
+ }
+
ThriftHive_execute_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.execute", bytes);
+ }
ThriftHive_execute_result result;
try {
@@ -2111,28 +2107,54 @@ void ThriftHiveProcessor::process_execut
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.execute");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.execute");
+ }
+
oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.execute", bytes);
+ }
}
-void ThriftHiveProcessor::process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.fetchOne", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchOne");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.fetchOne");
+ }
+
ThriftHive_fetchOne_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.fetchOne", bytes);
+ }
ThriftHive_fetchOne_result result;
try {
@@ -2142,28 +2164,54 @@ void ThriftHiveProcessor::process_fetchO
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.fetchOne");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.fetchOne");
+ }
+
oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.fetchOne", bytes);
+ }
}
-void ThriftHiveProcessor::process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.fetchN", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchN");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.fetchN");
+ }
+
ThriftHive_fetchN_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.fetchN", bytes);
+ }
ThriftHive_fetchN_result result;
try {
@@ -2173,28 +2221,54 @@ void ThriftHiveProcessor::process_fetchN
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.fetchN");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.fetchN");
+ }
+
oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.fetchN", bytes);
+ }
}
-void ThriftHiveProcessor::process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.fetchAll", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchAll");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.fetchAll");
+ }
+
ThriftHive_fetchAll_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.fetchAll", bytes);
+ }
ThriftHive_fetchAll_result result;
try {
@@ -2204,28 +2278,54 @@ void ThriftHiveProcessor::process_fetchA
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.fetchAll");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.fetchAll");
+ }
+
oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.fetchAll", bytes);
+ }
}
-void ThriftHiveProcessor::process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.getSchema", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getSchema");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.getSchema");
+ }
+
ThriftHive_getSchema_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.getSchema", bytes);
+ }
ThriftHive_getSchema_result result;
try {
@@ -2235,28 +2335,54 @@ void ThriftHiveProcessor::process_getSch
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.getSchema");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.getSchema");
+ }
+
oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.getSchema", bytes);
+ }
}
-void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.getThriftSchema", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getThriftSchema");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.getThriftSchema");
+ }
+
ThriftHive_getThriftSchema_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.getThriftSchema", bytes);
+ }
ThriftHive_getThriftSchema_result result;
try {
@@ -2266,28 +2392,54 @@ void ThriftHiveProcessor::process_getThr
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.getThriftSchema");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.getThriftSchema");
+ }
+
oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.getThriftSchema", bytes);
+ }
}
-void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.getClusterStatus", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getClusterStatus");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.getClusterStatus");
+ }
+
ThriftHive_getClusterStatus_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.getClusterStatus", bytes);
+ }
ThriftHive_getClusterStatus_result result;
try {
@@ -2297,28 +2449,54 @@ void ThriftHiveProcessor::process_getClu
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.getClusterStatus");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.getClusterStatus");
+ }
+
oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.getClusterStatus", bytes);
+ }
}
-void ThriftHiveProcessor::process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.getQueryPlan", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getQueryPlan");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.getQueryPlan");
+ }
+
ThriftHive_getQueryPlan_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.getQueryPlan", bytes);
+ }
ThriftHive_getQueryPlan_result result;
try {
@@ -2328,47 +2506,85 @@ void ThriftHiveProcessor::process_getQue
result.ex = ex;
result.__isset.ex = true;
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.getQueryPlan");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.getQueryPlan");
+ }
+
oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.getQueryPlan", bytes);
+ }
}
-void ThriftHiveProcessor::process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+void ThriftHiveProcessor::process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("ThriftHive.clean", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.clean");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "ThriftHive.clean");
+ }
+
ThriftHive_clean_args args;
args.read(iprot);
iprot->readMessageEnd();
- iprot->getTransport()->readEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "ThriftHive.clean", bytes);
+ }
ThriftHive_clean_result result;
try {
iface_->clean();
} catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "ThriftHive.clean");
+ }
+
::apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("clean", ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
- oprot->getTransport()->flush();
oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
return;
}
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "ThriftHive.clean");
+ }
+
oprot->writeMessageBegin("clean", ::apache::thrift::protocol::T_REPLY, seqid);
result.write(oprot);
oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
- oprot->getTransport()->writeEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "ThriftHive.clean", bytes);
+ }
}
}}} // namespace
Modified: hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.h
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.h?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.h (original)
+++ hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/ThriftHive.h Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
@@ -75,6 +75,10 @@ class ThriftHive_execute_args {
_ThriftHive_execute_args__isset __isset;
+ void __set_query(const std::string& val) {
+ query = val;
+ }
+
bool operator == (const ThriftHive_execute_args & rhs) const
{
if (!(query == rhs.query))
@@ -122,6 +126,10 @@ class ThriftHive_execute_result {
_ThriftHive_execute_result__isset __isset;
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_execute_result & rhs) const
{
if (!(ex == rhs.ex))
@@ -214,6 +222,14 @@ class ThriftHive_fetchOne_result {
_ThriftHive_fetchOne_result__isset __isset;
+ void __set_success(const std::string& val) {
+ success = val;
+ }
+
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_fetchOne_result & rhs) const
{
if (!(success == rhs.success))
@@ -271,6 +287,10 @@ class ThriftHive_fetchN_args {
_ThriftHive_fetchN_args__isset __isset;
+ void __set_numRows(const int32_t val) {
+ numRows = val;
+ }
+
bool operator == (const ThriftHive_fetchN_args & rhs) const
{
if (!(numRows == rhs.numRows))
@@ -320,6 +340,14 @@ class ThriftHive_fetchN_result {
_ThriftHive_fetchN_result__isset __isset;
+ void __set_success(const std::vector<std::string> & val) {
+ success = val;
+ }
+
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_fetchN_result & rhs) const
{
if (!(success == rhs.success))
@@ -416,6 +444,14 @@ class ThriftHive_fetchAll_result {
_ThriftHive_fetchAll_result__isset __isset;
+ void __set_success(const std::vector<std::string> & val) {
+ success = val;
+ }
+
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_fetchAll_result & rhs) const
{
if (!(success == rhs.success))
@@ -512,6 +548,14 @@ class ThriftHive_getSchema_result {
_ThriftHive_getSchema_result__isset __isset;
+ void __set_success(const Apache::Hadoop::Hive::Schema& val) {
+ success = val;
+ }
+
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_getSchema_result & rhs) const
{
if (!(success == rhs.success))
@@ -608,6 +652,14 @@ class ThriftHive_getThriftSchema_result
_ThriftHive_getThriftSchema_result__isset __isset;
+ void __set_success(const Apache::Hadoop::Hive::Schema& val) {
+ success = val;
+ }
+
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_getThriftSchema_result & rhs) const
{
if (!(success == rhs.success))
@@ -704,6 +756,14 @@ class ThriftHive_getClusterStatus_result
_ThriftHive_getClusterStatus_result__isset __isset;
+ void __set_success(const HiveClusterStatus& val) {
+ success = val;
+ }
+
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_getClusterStatus_result & rhs) const
{
if (!(success == rhs.success))
@@ -800,6 +860,14 @@ class ThriftHive_getQueryPlan_result {
_ThriftHive_getQueryPlan_result__isset __isset;
+ void __set_success(const Apache::Hadoop::Hive::QueryPlan& val) {
+ success = val;
+ }
+
+ void __set_ex(const HiveServerException& val) {
+ ex = val;
+ }
+
bool operator == (const ThriftHive_getQueryPlan_result & rhs) const
{
if (!(success == rhs.success))
@@ -958,18 +1026,18 @@ class ThriftHiveClient : virtual public
class ThriftHiveProcessor : virtual public ::apache::thrift::TProcessor, public Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor {
protected:
boost::shared_ptr<ThriftHiveIf> iface_;
- virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);
+ virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext);
private:
- std::map<std::string, void (ThriftHiveProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*)> processMap_;
- void process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
- void process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ std::map<std::string, void (ThriftHiveProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*)> processMap_;
+ void process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
public:
ThriftHiveProcessor(boost::shared_ptr<ThriftHiveIf> iface) :
Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface),
@@ -985,7 +1053,7 @@ class ThriftHiveProcessor : virtual publ
processMap_["clean"] = &ThriftHiveProcessor::process_clean;
}
- virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot);
+ virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext);
virtual ~ThriftHiveProcessor() {}
};
@@ -1007,15 +1075,15 @@ class ThriftHiveMultiface : virtual publ
}
public:
void execute(const std::string& query) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
ifaces_[i]->execute(query);
}
}
void fetchOne(std::string& _return) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
ifaces_[i]->fetchOne(_return);
return;
@@ -1026,8 +1094,8 @@ class ThriftHiveMultiface : virtual publ
}
void fetchN(std::vector<std::string> & _return, const int32_t numRows) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
ifaces_[i]->fetchN(_return, numRows);
return;
@@ -1038,8 +1106,8 @@ class ThriftHiveMultiface : virtual publ
}
void fetchAll(std::vector<std::string> & _return) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
ifaces_[i]->fetchAll(_return);
return;
@@ -1050,8 +1118,8 @@ class ThriftHiveMultiface : virtual publ
}
void getSchema(Apache::Hadoop::Hive::Schema& _return) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
ifaces_[i]->getSchema(_return);
return;
@@ -1062,8 +1130,8 @@ class ThriftHiveMultiface : virtual publ
}
void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
ifaces_[i]->getThriftSchema(_return);
return;
@@ -1074,8 +1142,8 @@ class ThriftHiveMultiface : virtual publ
}
void getClusterStatus(HiveClusterStatus& _return) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
ifaces_[i]->getClusterStatus(_return);
return;
@@ -1086,8 +1154,8 @@ class ThriftHiveMultiface : virtual publ
}
void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
ifaces_[i]->getQueryPlan(_return);
return;
@@ -1098,8 +1166,8 @@ class ThriftHiveMultiface : virtual publ
}
void clean() {
- uint32_t sz = ifaces_.size();
- for (uint32_t i = 0; i < sz; ++i) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
ifaces_[i]->clean();
}
}
Modified: hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp (original)
+++ hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
Modified: hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.h
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.h?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.h (original)
+++ hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_constants.h Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
Modified: hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.cpp
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.cpp?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.cpp (original)
+++ hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.cpp Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
@@ -7,6 +7,16 @@
namespace Apache { namespace Hadoop { namespace Hive {
+int _kJobTrackerStateValues[] = {
+ JobTrackerState::INITIALIZING,
+ JobTrackerState::RUNNING
+};
+const char* _kJobTrackerStateNames[] = {
+ "INITIALIZING",
+ "RUNNING"
+};
+const std::map<int, const char*> _JobTrackerState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kJobTrackerStateValues, _kJobTrackerStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
const char* HiveClusterStatus::ascii_fingerprint = "D514EDCFFC86F64A2E924DCD16D4FAD8";
const uint8_t HiveClusterStatus::binary_fingerprint[16] = {0xD5,0x14,0xED,0xCF,0xFC,0x86,0xF6,0x4A,0x2E,0x92,0x4D,0xCD,0x16,0xD4,0xFA,0xD8};
Modified: hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.h
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.h?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.h (original)
+++ hive/branches/branch-0.8/service/src/gen/thrift/gen-cpp/hive_service_types.h Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
@@ -25,6 +25,8 @@ struct JobTrackerState {
};
};
+extern const std::map<int, const char*> _JobTrackerState_VALUES_TO_NAMES;
+
typedef struct _HiveClusterStatus__isset {
_HiveClusterStatus__isset() : taskTrackers(false), mapTasks(false), reduceTasks(false), maxMapTasks(false), maxReduceTasks(false), state(false) {}
bool taskTrackers;
@@ -55,6 +57,30 @@ class HiveClusterStatus {
_HiveClusterStatus__isset __isset;
+ void __set_taskTrackers(const int32_t val) {
+ taskTrackers = val;
+ }
+
+ void __set_mapTasks(const int32_t val) {
+ mapTasks = val;
+ }
+
+ void __set_reduceTasks(const int32_t val) {
+ reduceTasks = val;
+ }
+
+ void __set_maxMapTasks(const int32_t val) {
+ maxMapTasks = val;
+ }
+
+ void __set_maxReduceTasks(const int32_t val) {
+ maxReduceTasks = val;
+ }
+
+ void __set_state(const JobTrackerState::type val) {
+ state = val;
+ }
+
bool operator == (const HiveClusterStatus & rhs) const
{
if (!(taskTrackers == rhs.taskTrackers))
@@ -106,6 +132,18 @@ class HiveServerException : public ::apa
_HiveServerException__isset __isset;
+ void __set_message(const std::string& val) {
+ message = val;
+ }
+
+ void __set_errorCode(const int32_t val) {
+ errorCode = val;
+ }
+
+ void __set_SQLState(const std::string& val) {
+ SQLState = val;
+ }
+
bool operator == (const HiveServerException & rhs) const
{
if (!(message == rhs.message))
Modified: hive/branches/branch-0.8/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java?rev=1165216&r1=1165215&r2=1165216&view=diff
==============================================================================
--- hive/branches/branch-0.8/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java (original)
+++ hive/branches/branch-0.8/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java Mon Sep 5 09:08:16 2011
@@ -1,5 +1,5 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
@@ -20,31 +20,25 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.thrift.*;
-import org.apache.thrift.async.*;
-import org.apache.thrift.meta_data.*;
-import org.apache.thrift.transport.*;
-import org.apache.thrift.protocol.*;
-
-public class HiveClusterStatus implements TBase<HiveClusterStatus, HiveClusterStatus._Fields>, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("HiveClusterStatus");
-
- private static final TField TASK_TRACKERS_FIELD_DESC = new TField("taskTrackers", TType.I32, (short)1);
- private static final TField MAP_TASKS_FIELD_DESC = new TField("mapTasks", TType.I32, (short)2);
- private static final TField REDUCE_TASKS_FIELD_DESC = new TField("reduceTasks", TType.I32, (short)3);
- private static final TField MAX_MAP_TASKS_FIELD_DESC = new TField("maxMapTasks", TType.I32, (short)4);
- private static final TField MAX_REDUCE_TASKS_FIELD_DESC = new TField("maxReduceTasks", TType.I32, (short)5);
- private static final TField STATE_FIELD_DESC = new TField("state", TType.I32, (short)6);
-
- private int taskTrackers;
- private int mapTasks;
- private int reduceTasks;
- private int maxMapTasks;
- private int maxReduceTasks;
- private JobTrackerState state;
+public class HiveClusterStatus implements org.apache.thrift.TBase<HiveClusterStatus, HiveClusterStatus._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveClusterStatus");
+
+ private static final org.apache.thrift.protocol.TField TASK_TRACKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskTrackers", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("mapTasks", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("reduceTasks", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField MAX_MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMapTasks", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField MAX_REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxReduceTasks", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)6);
+
+ private int taskTrackers; // required
+ private int mapTasks; // required
+ private int reduceTasks; // required
+ private int maxMapTasks; // required
+ private int maxReduceTasks; // required
+ private JobTrackerState state; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements TFieldIdEnum {
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TASK_TRACKERS((short)1, "taskTrackers"),
MAP_TASKS((short)2, "mapTasks"),
REDUCE_TASKS((short)3, "reduceTasks"),
@@ -128,23 +122,23 @@ public class HiveClusterStatus implement
private static final int __MAXREDUCETASKS_ISSET_ID = 4;
private BitSet __isset_bit_vector = new BitSet(5);
- public static final Map<_Fields, FieldMetaData> metaDataMap;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TASK_TRACKERS, new FieldMetaData("taskTrackers", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.I32)));
- tmpMap.put(_Fields.MAP_TASKS, new FieldMetaData("mapTasks", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.I32)));
- tmpMap.put(_Fields.REDUCE_TASKS, new FieldMetaData("reduceTasks", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.I32)));
- tmpMap.put(_Fields.MAX_MAP_TASKS, new FieldMetaData("maxMapTasks", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.I32)));
- tmpMap.put(_Fields.MAX_REDUCE_TASKS, new FieldMetaData("maxReduceTasks", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.I32)));
- tmpMap.put(_Fields.STATE, new FieldMetaData("state", TFieldRequirementType.DEFAULT,
- new EnumMetaData(TType.ENUM, JobTrackerState.class)));
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TASK_TRACKERS, new org.apache.thrift.meta_data.FieldMetaData("taskTrackers", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("mapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("reduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MAX_MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxMapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MAX_REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxReduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobTrackerState.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(HiveClusterStatus.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HiveClusterStatus.class, metaDataMap);
}
public HiveClusterStatus() {
@@ -220,7 +214,7 @@ public class HiveClusterStatus implement
__isset_bit_vector.clear(__TASKTRACKERS_ISSET_ID);
}
- /** Returns true if field taskTrackers is set (has been asigned a value) and false otherwise */
+ /** Returns true if field taskTrackers is set (has been assigned a value) and false otherwise */
public boolean isSetTaskTrackers() {
return __isset_bit_vector.get(__TASKTRACKERS_ISSET_ID);
}
@@ -242,7 +236,7 @@ public class HiveClusterStatus implement
__isset_bit_vector.clear(__MAPTASKS_ISSET_ID);
}
- /** Returns true if field mapTasks is set (has been asigned a value) and false otherwise */
+ /** Returns true if field mapTasks is set (has been assigned a value) and false otherwise */
public boolean isSetMapTasks() {
return __isset_bit_vector.get(__MAPTASKS_ISSET_ID);
}
@@ -264,7 +258,7 @@ public class HiveClusterStatus implement
__isset_bit_vector.clear(__REDUCETASKS_ISSET_ID);
}
- /** Returns true if field reduceTasks is set (has been asigned a value) and false otherwise */
+ /** Returns true if field reduceTasks is set (has been assigned a value) and false otherwise */
public boolean isSetReduceTasks() {
return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID);
}
@@ -286,7 +280,7 @@ public class HiveClusterStatus implement
__isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID);
}
- /** Returns true if field maxMapTasks is set (has been asigned a value) and false otherwise */
+ /** Returns true if field maxMapTasks is set (has been assigned a value) and false otherwise */
public boolean isSetMaxMapTasks() {
return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID);
}
@@ -308,7 +302,7 @@ public class HiveClusterStatus implement
__isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID);
}
- /** Returns true if field maxReduceTasks is set (has been asigned a value) and false otherwise */
+ /** Returns true if field maxReduceTasks is set (has been assigned a value) and false otherwise */
public boolean isSetMaxReduceTasks() {
return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID);
}
@@ -337,7 +331,7 @@ public class HiveClusterStatus implement
this.state = null;
}
- /** Returns true if field state is set (has been asigned a value) and false otherwise */
+ /** Returns true if field state is set (has been assigned a value) and false otherwise */
public boolean isSetState() {
return this.state != null;
}
@@ -404,19 +398,19 @@ public class HiveClusterStatus implement
public Object getFieldValue(_Fields field) {
switch (field) {
case TASK_TRACKERS:
- return new Integer(getTaskTrackers());
+ return Integer.valueOf(getTaskTrackers());
case MAP_TASKS:
- return new Integer(getMapTasks());
+ return Integer.valueOf(getMapTasks());
case REDUCE_TASKS:
- return new Integer(getReduceTasks());
+ return Integer.valueOf(getReduceTasks());
case MAX_MAP_TASKS:
- return new Integer(getMaxMapTasks());
+ return Integer.valueOf(getMaxMapTasks());
case MAX_REDUCE_TASKS:
- return new Integer(getMaxReduceTasks());
+ return Integer.valueOf(getMaxReduceTasks());
case STATE:
return getState();
@@ -425,7 +419,7 @@ public class HiveClusterStatus implement
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@@ -536,7 +530,7 @@ public class HiveClusterStatus implement
return lastComparison;
}
if (isSetTaskTrackers()) {
- lastComparison = TBaseHelper.compareTo(this.taskTrackers, typedOther.taskTrackers);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskTrackers, typedOther.taskTrackers);
if (lastComparison != 0) {
return lastComparison;
}
@@ -546,7 +540,7 @@ public class HiveClusterStatus implement
return lastComparison;
}
if (isSetMapTasks()) {
- lastComparison = TBaseHelper.compareTo(this.mapTasks, typedOther.mapTasks);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mapTasks, typedOther.mapTasks);
if (lastComparison != 0) {
return lastComparison;
}
@@ -556,7 +550,7 @@ public class HiveClusterStatus implement
return lastComparison;
}
if (isSetReduceTasks()) {
- lastComparison = TBaseHelper.compareTo(this.reduceTasks, typedOther.reduceTasks);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reduceTasks, typedOther.reduceTasks);
if (lastComparison != 0) {
return lastComparison;
}
@@ -566,7 +560,7 @@ public class HiveClusterStatus implement
return lastComparison;
}
if (isSetMaxMapTasks()) {
- lastComparison = TBaseHelper.compareTo(this.maxMapTasks, typedOther.maxMapTasks);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMapTasks, typedOther.maxMapTasks);
if (lastComparison != 0) {
return lastComparison;
}
@@ -576,7 +570,7 @@ public class HiveClusterStatus implement
return lastComparison;
}
if (isSetMaxReduceTasks()) {
- lastComparison = TBaseHelper.compareTo(this.maxReduceTasks, typedOther.maxReduceTasks);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxReduceTasks, typedOther.maxReduceTasks);
if (lastComparison != 0) {
return lastComparison;
}
@@ -586,7 +580,7 @@ public class HiveClusterStatus implement
return lastComparison;
}
if (isSetState()) {
- lastComparison = TBaseHelper.compareTo(this.state, typedOther.state);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
if (lastComparison != 0) {
return lastComparison;
}
@@ -598,65 +592,65 @@ public class HiveClusterStatus implement
return _Fields.findByThriftId(fieldId);
}
- public void read(TProtocol iprot) throws TException {
- TField field;
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
- if (field.type == TType.STOP) {
+ if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // TASK_TRACKERS
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.taskTrackers = iprot.readI32();
setTaskTrackersIsSet(true);
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // MAP_TASKS
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.mapTasks = iprot.readI32();
setMapTasksIsSet(true);
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // REDUCE_TASKS
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.reduceTasks = iprot.readI32();
setReduceTasksIsSet(true);
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // MAX_MAP_TASKS
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.maxMapTasks = iprot.readI32();
setMaxMapTasksIsSet(true);
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 5: // MAX_REDUCE_TASKS
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.maxReduceTasks = iprot.readI32();
setMaxReduceTasksIsSet(true);
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 6: // STATE
- if (field.type == TType.I32) {
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
this.state = JobTrackerState.findByValue(iprot.readI32());
} else {
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
- TProtocolUtil.skip(iprot, field.type);
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@@ -664,7 +658,7 @@ public class HiveClusterStatus implement
validate();
}
- public void write(TProtocol oprot) throws TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -728,9 +722,27 @@ public class HiveClusterStatus implement
return sb.toString();
}
- public void validate() throws TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
}
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bit_vector = new BitSet(1);
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
}