You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2014/09/11 17:58:13 UTC
svn commit: r1624324 - in /hive/trunk/metastore: if/ src/gen/thrift/gen-cpp/
src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/
src/gen/thrift/gen-py/hive_metastore/ src/gen/thrift/gen-rb/
Author: gates
Date: Thu Sep 11 15:58:13 2014
New Revision: 1624324
URL: http://svn.apache.org/r1624324
Log:
VE-7470 Wrong Thrift declaration for ShowCompactResponseElement (Damien Carol via Alan Gates)
Modified:
hive/trunk/metastore/if/hive_metastore.thrift
hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java
hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
Modified: hive/trunk/metastore/if/hive_metastore.thrift
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/if/hive_metastore.thrift?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/if/hive_metastore.thrift (original)
+++ hive/trunk/metastore/if/hive_metastore.thrift Thu Sep 11 15:58:13 2014
@@ -630,12 +630,12 @@ struct ShowCompactRequest {
struct ShowCompactResponseElement {
1: required string dbname,
2: required string tablename,
- 3: required string partitionname,
+ 3: optional string partitionname,
4: required CompactionType type,
5: required string state,
- 6: required string workerid,
- 7: required i64 start,
- 8: required string runAs,
+ 6: optional string workerid,
+ 7: optional i64 start,
+ 8: optional string runAs,
}
struct ShowCompactResponse {
Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp Thu Sep 11 15:58:13 2014
@@ -9027,8 +9027,8 @@ void swap(ShowCompactRequest &a, ShowCom
(void) b;
}
-const char* ShowCompactResponseElement::ascii_fingerprint = "42464F3A97707F984FDE462104223A69";
-const uint8_t ShowCompactResponseElement::binary_fingerprint[16] = {0x42,0x46,0x4F,0x3A,0x97,0x70,0x7F,0x98,0x4F,0xDE,0x46,0x21,0x04,0x22,0x3A,0x69};
+const char* ShowCompactResponseElement::ascii_fingerprint = "2F338C265DC4FD82DD13F4966FE43F13";
+const uint8_t ShowCompactResponseElement::binary_fingerprint[16] = {0x2F,0x33,0x8C,0x26,0x5D,0xC4,0xFD,0x82,0xDD,0x13,0xF4,0x96,0x6F,0xE4,0x3F,0x13};
uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -9043,12 +9043,8 @@ uint32_t ShowCompactResponseElement::rea
bool isset_dbname = false;
bool isset_tablename = false;
- bool isset_partitionname = false;
bool isset_type = false;
bool isset_state = false;
- bool isset_workerid = false;
- bool isset_start = false;
- bool isset_runAs = false;
while (true)
{
@@ -9077,7 +9073,7 @@ uint32_t ShowCompactResponseElement::rea
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->partitionname);
- isset_partitionname = true;
+ this->__isset.partitionname = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -9103,7 +9099,7 @@ uint32_t ShowCompactResponseElement::rea
case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->workerid);
- isset_workerid = true;
+ this->__isset.workerid = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -9111,7 +9107,7 @@ uint32_t ShowCompactResponseElement::rea
case 7:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->start);
- isset_start = true;
+ this->__isset.start = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -9119,7 +9115,7 @@ uint32_t ShowCompactResponseElement::rea
case 8:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->runAs);
- isset_runAs = true;
+ this->__isset.runAs = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -9137,18 +9133,10 @@ uint32_t ShowCompactResponseElement::rea
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tablename)
throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_partitionname)
- throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_type)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_state)
throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_workerid)
- throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_start)
- throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_runAs)
- throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
@@ -9164,10 +9152,11 @@ uint32_t ShowCompactResponseElement::wri
xfer += oprot->writeString(this->tablename);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3);
- xfer += oprot->writeString(this->partitionname);
- xfer += oprot->writeFieldEnd();
-
+ if (this->__isset.partitionname) {
+ xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->partitionname);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32((int32_t)this->type);
xfer += oprot->writeFieldEnd();
@@ -9176,18 +9165,21 @@ uint32_t ShowCompactResponseElement::wri
xfer += oprot->writeString(this->state);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6);
- xfer += oprot->writeString(this->workerid);
- xfer += oprot->writeFieldEnd();
-
- xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7);
- xfer += oprot->writeI64(this->start);
- xfer += oprot->writeFieldEnd();
-
- xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8);
- xfer += oprot->writeString(this->runAs);
- xfer += oprot->writeFieldEnd();
-
+ if (this->__isset.workerid) {
+ xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6);
+ xfer += oprot->writeString(this->workerid);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.start) {
+ xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7);
+ xfer += oprot->writeI64(this->start);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.runAs) {
+ xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8);
+ xfer += oprot->writeString(this->runAs);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -9203,10 +9195,11 @@ void swap(ShowCompactResponseElement &a,
swap(a.workerid, b.workerid);
swap(a.start, b.start);
swap(a.runAs, b.runAs);
+ swap(a.__isset, b.__isset);
}
-const char* ShowCompactResponse::ascii_fingerprint = "3CCBC4D398CA25527272FE78625DE88A";
-const uint8_t ShowCompactResponse::binary_fingerprint[16] = {0x3C,0xCB,0xC4,0xD3,0x98,0xCA,0x25,0x52,0x72,0x72,0xFE,0x78,0x62,0x5D,0xE8,0x8A};
+const char* ShowCompactResponse::ascii_fingerprint = "915B7B8DB8966D65769C0F98707BBAE3";
+const uint8_t ShowCompactResponse::binary_fingerprint[16] = {0x91,0x5B,0x7B,0x8D,0xB8,0x96,0x6D,0x65,0x76,0x9C,0x0F,0x98,0x70,0x7B,0xBA,0xE3};
uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h Thu Sep 11 15:58:13 2014
@@ -4934,12 +4934,19 @@ class ShowCompactRequest {
void swap(ShowCompactRequest &a, ShowCompactRequest &b);
+typedef struct _ShowCompactResponseElement__isset {
+ _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false) {}
+ bool partitionname;
+ bool workerid;
+ bool start;
+ bool runAs;
+} _ShowCompactResponseElement__isset;
class ShowCompactResponseElement {
public:
- static const char* ascii_fingerprint; // = "42464F3A97707F984FDE462104223A69";
- static const uint8_t binary_fingerprint[16]; // = {0x42,0x46,0x4F,0x3A,0x97,0x70,0x7F,0x98,0x4F,0xDE,0x46,0x21,0x04,0x22,0x3A,0x69};
+ static const char* ascii_fingerprint; // = "2F338C265DC4FD82DD13F4966FE43F13";
+ static const uint8_t binary_fingerprint[16]; // = {0x2F,0x33,0x8C,0x26,0x5D,0xC4,0xFD,0x82,0xDD,0x13,0xF4,0x96,0x6F,0xE4,0x3F,0x13};
ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs() {
}
@@ -4955,6 +4962,8 @@ class ShowCompactResponseElement {
int64_t start;
std::string runAs;
+ _ShowCompactResponseElement__isset __isset;
+
void __set_dbname(const std::string& val) {
dbname = val;
}
@@ -4965,6 +4974,7 @@ class ShowCompactResponseElement {
void __set_partitionname(const std::string& val) {
partitionname = val;
+ __isset.partitionname = true;
}
void __set_type(const CompactionType::type val) {
@@ -4977,14 +4987,17 @@ class ShowCompactResponseElement {
void __set_workerid(const std::string& val) {
workerid = val;
+ __isset.workerid = true;
}
void __set_start(const int64_t val) {
start = val;
+ __isset.start = true;
}
void __set_runAs(const std::string& val) {
runAs = val;
+ __isset.runAs = true;
}
bool operator == (const ShowCompactResponseElement & rhs) const
@@ -4993,17 +5006,25 @@ class ShowCompactResponseElement {
return false;
if (!(tablename == rhs.tablename))
return false;
- if (!(partitionname == rhs.partitionname))
+ if (__isset.partitionname != rhs.__isset.partitionname)
+ return false;
+ else if (__isset.partitionname && !(partitionname == rhs.partitionname))
return false;
if (!(type == rhs.type))
return false;
if (!(state == rhs.state))
return false;
- if (!(workerid == rhs.workerid))
+ if (__isset.workerid != rhs.__isset.workerid)
+ return false;
+ else if (__isset.workerid && !(workerid == rhs.workerid))
+ return false;
+ if (__isset.start != rhs.__isset.start)
+ return false;
+ else if (__isset.start && !(start == rhs.start))
return false;
- if (!(start == rhs.start))
+ if (__isset.runAs != rhs.__isset.runAs)
return false;
- if (!(runAs == rhs.runAs))
+ else if (__isset.runAs && !(runAs == rhs.runAs))
return false;
return true;
}
@@ -5024,8 +5045,8 @@ void swap(ShowCompactResponseElement &a,
class ShowCompactResponse {
public:
- static const char* ascii_fingerprint; // = "3CCBC4D398CA25527272FE78625DE88A";
- static const uint8_t binary_fingerprint[16]; // = {0x3C,0xCB,0xC4,0xD3,0x98,0xCA,0x25,0x52,0x72,0x72,0xFE,0x78,0x62,0x5D,0xE8,0x8A};
+ static const char* ascii_fingerprint; // = "915B7B8DB8966D65769C0F98707BBAE3";
+ static const uint8_t binary_fingerprint[16]; // = {0x91,0x5B,0x7B,0x8D,0xB8,0x96,0x6D,0x65,0x76,0x9C,0x0F,0x98,0x70,0x7B,0xBA,0xE3};
ShowCompactResponse() {
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java Thu Sep 11 15:58:13 2014
@@ -135,9 +135,9 @@ public class FieldSchema implements org.
String comment)
{
this();
- this.name = org.apache.hive.common.util.HiveStringUtils.intern(name);
- this.type = org.apache.hive.common.util.HiveStringUtils.intern(type);
- this.comment = org.apache.hive.common.util.HiveStringUtils.intern(comment);
+ this.name = name;
+ this.type = type;
+ this.comment = comment;
}
/**
@@ -145,13 +145,13 @@ public class FieldSchema implements org.
*/
public FieldSchema(FieldSchema other) {
if (other.isSetName()) {
- this.name = org.apache.hive.common.util.HiveStringUtils.intern(other.name);
+ this.name = other.name;
}
if (other.isSetType()) {
- this.type = org.apache.hive.common.util.HiveStringUtils.intern(other.type);
+ this.type = other.type;
}
if (other.isSetComment()) {
- this.comment = org.apache.hive.common.util.HiveStringUtils.intern(other.comment);
+ this.comment = other.comment;
}
}
@@ -171,7 +171,7 @@ public class FieldSchema implements org.
}
public void setName(String name) {
- this.name = org.apache.hive.common.util.HiveStringUtils.intern(name);
+ this.name = name;
}
public void unsetName() {
@@ -194,7 +194,7 @@ public class FieldSchema implements org.
}
public void setType(String type) {
- this.type = org.apache.hive.common.util.HiveStringUtils.intern(type);
+ this.type = type;
}
public void unsetType() {
@@ -217,7 +217,7 @@ public class FieldSchema implements org.
}
public void setComment(String comment) {
- this.comment = org.apache.hive.common.util.HiveStringUtils.intern(comment);
+ this.comment = comment;
}
public void unsetComment() {
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java Thu Sep 11 15:58:13 2014
@@ -182,14 +182,14 @@ public class Partition implements org.ap
{
this();
this.values = values;
- this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(dbName);
- this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(tableName);
+ this.dbName = dbName;
+ this.tableName = tableName;
this.createTime = createTime;
setCreateTimeIsSet(true);
this.lastAccessTime = lastAccessTime;
setLastAccessTimeIsSet(true);
this.sd = sd;
- this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters);
+ this.parameters = parameters;
}
/**
@@ -205,10 +205,10 @@ public class Partition implements org.ap
this.values = __this__values;
}
if (other.isSetDbName()) {
- this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(other.dbName);
+ this.dbName = other.dbName;
}
if (other.isSetTableName()) {
- this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(other.tableName);
+ this.tableName = other.tableName;
}
this.createTime = other.createTime;
this.lastAccessTime = other.lastAccessTime;
@@ -222,9 +222,9 @@ public class Partition implements org.ap
String other_element_key = other_element.getKey();
String other_element_value = other_element.getValue();
- String __this__parameters_copy_key = org.apache.hive.common.util.HiveStringUtils.intern(other_element_key);
+ String __this__parameters_copy_key = other_element_key;
- String __this__parameters_copy_value = org.apache.hive.common.util.HiveStringUtils.intern(other_element_value);
+ String __this__parameters_copy_value = other_element_value;
__this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value);
}
@@ -296,7 +296,7 @@ public class Partition implements org.ap
}
public void setDbName(String dbName) {
- this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(dbName);
+ this.dbName = dbName;
}
public void unsetDbName() {
@@ -319,7 +319,7 @@ public class Partition implements org.ap
}
public void setTableName(String tableName) {
- this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(tableName);
+ this.tableName = tableName;
}
public void unsetTableName() {
@@ -420,7 +420,7 @@ public class Partition implements org.ap
}
public void setParameters(Map<String,String> parameters) {
- this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters);
+ this.parameters = parameters;
}
public void unsetParameters() {
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java Thu Sep 11 15:58:13 2014
@@ -137,9 +137,9 @@ public class SerDeInfo implements org.ap
Map<String,String> parameters)
{
this();
- this.name = org.apache.hive.common.util.HiveStringUtils.intern(name);
- this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(serializationLib);
- this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters);
+ this.name = name;
+ this.serializationLib = serializationLib;
+ this.parameters = parameters;
}
/**
@@ -147,10 +147,10 @@ public class SerDeInfo implements org.ap
*/
public SerDeInfo(SerDeInfo other) {
if (other.isSetName()) {
- this.name = org.apache.hive.common.util.HiveStringUtils.intern(other.name);
+ this.name = other.name;
}
if (other.isSetSerializationLib()) {
- this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(other.serializationLib);
+ this.serializationLib = other.serializationLib;
}
if (other.isSetParameters()) {
Map<String,String> __this__parameters = new HashMap<String,String>();
@@ -159,9 +159,9 @@ public class SerDeInfo implements org.ap
String other_element_key = other_element.getKey();
String other_element_value = other_element.getValue();
- String __this__parameters_copy_key = org.apache.hive.common.util.HiveStringUtils.intern(other_element_key);
+ String __this__parameters_copy_key = other_element_key;
- String __this__parameters_copy_value = org.apache.hive.common.util.HiveStringUtils.intern(other_element_value);
+ String __this__parameters_copy_value = other_element_value;
__this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value);
}
@@ -185,7 +185,7 @@ public class SerDeInfo implements org.ap
}
public void setName(String name) {
- this.name = org.apache.hive.common.util.HiveStringUtils.intern(name);
+ this.name = name;
}
public void unsetName() {
@@ -208,7 +208,7 @@ public class SerDeInfo implements org.ap
}
public void setSerializationLib(String serializationLib) {
- this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(serializationLib);
+ this.serializationLib = serializationLib;
}
public void unsetSerializationLib() {
@@ -242,7 +242,7 @@ public class SerDeInfo implements org.ap
}
public void setParameters(Map<String,String> parameters) {
- this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters);
+ this.parameters = parameters;
}
public void unsetParameters() {
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java Thu Sep 11 15:58:13 2014
@@ -51,12 +51,12 @@ public class ShowCompactResponseElement
private String dbname; // required
private String tablename; // required
- private String partitionname; // required
+ private String partitionname; // optional
private CompactionType type; // required
private String state; // required
- private String workerid; // required
- private long start; // required
- private String runAs; // required
+ private String workerid; // optional
+ private long start; // optional
+ private String runAs; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -144,6 +144,7 @@ public class ShowCompactResponseElement
// isset id assignments
private static final int __START_ISSET_ID = 0;
private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -151,17 +152,17 @@ public class ShowCompactResponseElement
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionType.class)));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.WORKERID, new org.apache.thrift.meta_data.FieldMetaData("workerid", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.WORKERID, new org.apache.thrift.meta_data.FieldMetaData("workerid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.RUN_AS, new org.apache.thrift.meta_data.FieldMetaData("runAs", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.RUN_AS, new org.apache.thrift.meta_data.FieldMetaData("runAs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactResponseElement.class, metaDataMap);
@@ -173,23 +174,14 @@ public class ShowCompactResponseElement
public ShowCompactResponseElement(
String dbname,
String tablename,
- String partitionname,
CompactionType type,
- String state,
- String workerid,
- long start,
- String runAs)
+ String state)
{
this();
this.dbname = dbname;
this.tablename = tablename;
- this.partitionname = partitionname;
this.type = type;
this.state = state;
- this.workerid = workerid;
- this.start = start;
- setStartIsSet(true);
- this.runAs = runAs;
}
/**
@@ -622,8 +614,8 @@ public class ShowCompactResponseElement
return false;
}
- boolean this_present_start = true;
- boolean that_present_start = true;
+ boolean this_present_start = true && this.isSetStart();
+ boolean that_present_start = true && that.isSetStart();
if (this_present_start || that_present_start) {
if (!(this_present_start && that_present_start))
return false;
@@ -677,7 +669,7 @@ public class ShowCompactResponseElement
if (present_workerid)
builder.append(workerid);
- boolean present_start = true;
+ boolean present_start = true && (isSetStart());
builder.append(present_start);
if (present_start)
builder.append(start);
@@ -813,14 +805,16 @@ public class ShowCompactResponseElement
sb.append(this.tablename);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("partitionname:");
- if (this.partitionname == null) {
- sb.append("null");
- } else {
- sb.append(this.partitionname);
+ if (isSetPartitionname()) {
+ if (!first) sb.append(", ");
+ sb.append("partitionname:");
+ if (this.partitionname == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.partitionname);
+ }
+ first = false;
}
- first = false;
if (!first) sb.append(", ");
sb.append("type:");
if (this.type == null) {
@@ -837,26 +831,32 @@ public class ShowCompactResponseElement
sb.append(this.state);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("workerid:");
- if (this.workerid == null) {
- sb.append("null");
- } else {
- sb.append(this.workerid);
+ if (isSetWorkerid()) {
+ if (!first) sb.append(", ");
+ sb.append("workerid:");
+ if (this.workerid == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workerid);
+ }
+ first = false;
}
- first = false;
- if (!first) sb.append(", ");
- sb.append("start:");
- sb.append(this.start);
- first = false;
- if (!first) sb.append(", ");
- sb.append("runAs:");
- if (this.runAs == null) {
- sb.append("null");
- } else {
- sb.append(this.runAs);
+ if (isSetStart()) {
+ if (!first) sb.append(", ");
+ sb.append("start:");
+ sb.append(this.start);
+ first = false;
+ }
+ if (isSetRunAs()) {
+ if (!first) sb.append(", ");
+ sb.append("runAs:");
+ if (this.runAs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.runAs);
+ }
+ first = false;
}
- first = false;
sb.append(")");
return sb.toString();
}
@@ -871,10 +871,6 @@ public class ShowCompactResponseElement
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString());
}
- if (!isSetPartitionname()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitionname' is unset! Struct:" + toString());
- }
-
if (!isSetType()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString());
}
@@ -883,18 +879,6 @@ public class ShowCompactResponseElement
throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString());
}
- if (!isSetWorkerid()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'workerid' is unset! Struct:" + toString());
- }
-
- if (!isSetStart()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'start' is unset! Struct:" + toString());
- }
-
- if (!isSetRunAs()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'runAs' is unset! Struct:" + toString());
- }
-
// check for sub-struct validity
}
@@ -1022,9 +1006,11 @@ public class ShowCompactResponseElement
oprot.writeFieldEnd();
}
if (struct.partitionname != null) {
- oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC);
- oprot.writeString(struct.partitionname);
- oprot.writeFieldEnd();
+ if (struct.isSetPartitionname()) {
+ oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC);
+ oprot.writeString(struct.partitionname);
+ oprot.writeFieldEnd();
+ }
}
if (struct.type != null) {
oprot.writeFieldBegin(TYPE_FIELD_DESC);
@@ -1037,17 +1023,23 @@ public class ShowCompactResponseElement
oprot.writeFieldEnd();
}
if (struct.workerid != null) {
- oprot.writeFieldBegin(WORKERID_FIELD_DESC);
- oprot.writeString(struct.workerid);
+ if (struct.isSetWorkerid()) {
+ oprot.writeFieldBegin(WORKERID_FIELD_DESC);
+ oprot.writeString(struct.workerid);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetStart()) {
+ oprot.writeFieldBegin(START_FIELD_DESC);
+ oprot.writeI64(struct.start);
oprot.writeFieldEnd();
}
- oprot.writeFieldBegin(START_FIELD_DESC);
- oprot.writeI64(struct.start);
- oprot.writeFieldEnd();
if (struct.runAs != null) {
- oprot.writeFieldBegin(RUN_AS_FIELD_DESC);
- oprot.writeString(struct.runAs);
- oprot.writeFieldEnd();
+ if (struct.isSetRunAs()) {
+ oprot.writeFieldBegin(RUN_AS_FIELD_DESC);
+ oprot.writeString(struct.runAs);
+ oprot.writeFieldEnd();
+ }
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -1068,12 +1060,34 @@ public class ShowCompactResponseElement
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeString(struct.dbname);
oprot.writeString(struct.tablename);
- oprot.writeString(struct.partitionname);
oprot.writeI32(struct.type.getValue());
oprot.writeString(struct.state);
- oprot.writeString(struct.workerid);
- oprot.writeI64(struct.start);
- oprot.writeString(struct.runAs);
+ BitSet optionals = new BitSet();
+ if (struct.isSetPartitionname()) {
+ optionals.set(0);
+ }
+ if (struct.isSetWorkerid()) {
+ optionals.set(1);
+ }
+ if (struct.isSetStart()) {
+ optionals.set(2);
+ }
+ if (struct.isSetRunAs()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetPartitionname()) {
+ oprot.writeString(struct.partitionname);
+ }
+ if (struct.isSetWorkerid()) {
+ oprot.writeString(struct.workerid);
+ }
+ if (struct.isSetStart()) {
+ oprot.writeI64(struct.start);
+ }
+ if (struct.isSetRunAs()) {
+ oprot.writeString(struct.runAs);
+ }
}
@Override
@@ -1083,18 +1097,27 @@ public class ShowCompactResponseElement
struct.setDbnameIsSet(true);
struct.tablename = iprot.readString();
struct.setTablenameIsSet(true);
- struct.partitionname = iprot.readString();
- struct.setPartitionnameIsSet(true);
struct.type = CompactionType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
struct.state = iprot.readString();
struct.setStateIsSet(true);
- struct.workerid = iprot.readString();
- struct.setWorkeridIsSet(true);
- struct.start = iprot.readI64();
- struct.setStartIsSet(true);
- struct.runAs = iprot.readString();
- struct.setRunAsIsSet(true);
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.partitionname = iprot.readString();
+ struct.setPartitionnameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.workerid = iprot.readString();
+ struct.setWorkeridIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.start = iprot.readI64();
+ struct.setStartIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.runAs = iprot.readString();
+ struct.setRunAsIsSet(true);
+ }
}
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java Thu Sep 11 15:58:13 2014
@@ -216,17 +216,17 @@ public class StorageDescriptor implement
{
this();
this.cols = cols;
- this.location = org.apache.hive.common.util.HiveStringUtils.intern(location);
- this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(inputFormat);
- this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(outputFormat);
+ this.location = location;
+ this.inputFormat = inputFormat;
+ this.outputFormat = outputFormat;
this.compressed = compressed;
setCompressedIsSet(true);
this.numBuckets = numBuckets;
setNumBucketsIsSet(true);
this.serdeInfo = serdeInfo;
- this.bucketCols = org.apache.hive.common.util.HiveStringUtils.intern(bucketCols);
+ this.bucketCols = bucketCols;
this.sortCols = sortCols;
- this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters);
+ this.parameters = parameters;
}
/**
@@ -242,13 +242,13 @@ public class StorageDescriptor implement
this.cols = __this__cols;
}
if (other.isSetLocation()) {
- this.location = org.apache.hive.common.util.HiveStringUtils.intern(other.location);
+ this.location = other.location;
}
if (other.isSetInputFormat()) {
- this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(other.inputFormat);
+ this.inputFormat = other.inputFormat;
}
if (other.isSetOutputFormat()) {
- this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(other.outputFormat);
+ this.outputFormat = other.outputFormat;
}
this.compressed = other.compressed;
this.numBuckets = other.numBuckets;
@@ -276,9 +276,9 @@ public class StorageDescriptor implement
String other_element_key = other_element.getKey();
String other_element_value = other_element.getValue();
- String __this__parameters_copy_key = org.apache.hive.common.util.HiveStringUtils.intern(other_element_key);
+ String __this__parameters_copy_key = other_element_key;
- String __this__parameters_copy_value = org.apache.hive.common.util.HiveStringUtils.intern(other_element_value);
+ String __this__parameters_copy_value = other_element_value;
__this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value);
}
@@ -356,7 +356,7 @@ public class StorageDescriptor implement
}
public void setLocation(String location) {
- this.location = org.apache.hive.common.util.HiveStringUtils.intern(location);
+ this.location = location;
}
public void unsetLocation() {
@@ -379,7 +379,7 @@ public class StorageDescriptor implement
}
public void setInputFormat(String inputFormat) {
- this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(inputFormat);
+ this.inputFormat = inputFormat;
}
public void unsetInputFormat() {
@@ -402,7 +402,7 @@ public class StorageDescriptor implement
}
public void setOutputFormat(String outputFormat) {
- this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(outputFormat);
+ this.outputFormat = outputFormat;
}
public void unsetOutputFormat() {
@@ -507,7 +507,7 @@ public class StorageDescriptor implement
}
public void setBucketCols(List<String> bucketCols) {
- this.bucketCols = org.apache.hive.common.util.HiveStringUtils.intern(bucketCols);
+ this.bucketCols = bucketCols;
}
public void unsetBucketCols() {
@@ -579,7 +579,7 @@ public class StorageDescriptor implement
}
public void setParameters(Map<String,String> parameters) {
- this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters);
+ this.parameters = parameters;
}
public void unsetParameters() {
Modified: hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py Thu Sep 11 15:58:13 2014
@@ -8054,18 +8054,10 @@ class ShowCompactResponseElement:
raise TProtocol.TProtocolException(message='Required field dbname is unset!')
if self.tablename is None:
raise TProtocol.TProtocolException(message='Required field tablename is unset!')
- if self.partitionname is None:
- raise TProtocol.TProtocolException(message='Required field partitionname is unset!')
if self.type is None:
raise TProtocol.TProtocolException(message='Required field type is unset!')
if self.state is None:
raise TProtocol.TProtocolException(message='Required field state is unset!')
- if self.workerid is None:
- raise TProtocol.TProtocolException(message='Required field workerid is unset!')
- if self.start is None:
- raise TProtocol.TProtocolException(message='Required field start is unset!')
- if self.runAs is None:
- raise TProtocol.TProtocolException(message='Required field runAs is unset!')
return
Modified: hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb?rev=1624324&r1=1624323&r2=1624324&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb Thu Sep 11 15:58:13 2014
@@ -1946,12 +1946,12 @@ class ShowCompactResponseElement
FIELDS = {
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
- PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname'},
+ PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true},
TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType},
STATE => {:type => ::Thrift::Types::STRING, :name => 'state'},
- WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid'},
- START => {:type => ::Thrift::Types::I64, :name => 'start'},
- RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs'}
+ WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid', :optional => true},
+ START => {:type => ::Thrift::Types::I64, :name => 'start', :optional => true},
+ RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs', :optional => true}
}
def struct_fields; FIELDS; end
@@ -1959,12 +1959,8 @@ class ShowCompactResponseElement
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionname is unset!') unless @partitionname
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field workerid is unset!') unless @workerid
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start is unset!') unless @start
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field runAs is unset!') unless @runAs
unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
end