You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2010/09/16 19:09:43 UTC
svn commit: r997851 [3/12] - in /hadoop/hive/branches/branch-0.6: ./
eclipse-templates/ metastore/if/ metastore/src/gen-cpp/
metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen-php/ metastore/src/gen-php/hive_metastore/ m...
Modified: hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore.h
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore.h?rev=997851&r1=997850&r2=997851&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore.h (original)
+++ hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore.h Thu Sep 16 17:09:41 2010
@@ -15,10 +15,11 @@ namespace Apache { namespace Hadoop { na
class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf {
public:
virtual ~ThriftHiveMetastoreIf() {}
- virtual bool create_database(const std::string& name, const std::string& description) = 0;
+ virtual void create_database(const Database& database) = 0;
virtual void get_database(Database& _return, const std::string& name) = 0;
- virtual bool drop_database(const std::string& name) = 0;
- virtual void get_databases(std::vector<std::string> & _return) = 0;
+ virtual void drop_database(const std::string& name, const bool deleteData) = 0;
+ virtual void get_databases(std::vector<std::string> & _return, const std::string& pattern) = 0;
+ virtual void get_all_databases(std::vector<std::string> & _return) = 0;
virtual void get_type(Type& _return, const std::string& name) = 0;
virtual bool create_type(const Type& type) = 0;
virtual bool drop_type(const std::string& type) = 0;
@@ -28,6 +29,7 @@ class ThriftHiveMetastoreIf : virtual pu
virtual void create_table(const Table& tbl) = 0;
virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0;
virtual void get_tables(std::vector<std::string> & _return, const std::string& db_name, const std::string& pattern) = 0;
+ virtual void get_all_tables(std::vector<std::string> & _return, const std::string& db_name) = 0;
virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0;
virtual void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) = 0;
virtual void add_partition(Partition& _return, const Partition& new_part) = 0;
@@ -50,18 +52,19 @@ class ThriftHiveMetastoreIf : virtual pu
class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull {
public:
virtual ~ThriftHiveMetastoreNull() {}
- bool create_database(const std::string& /* name */, const std::string& /* description */) {
- bool _return = false;
- return _return;
+ void create_database(const Database& /* database */) {
+ return;
}
void get_database(Database& /* _return */, const std::string& /* name */) {
return;
}
- bool drop_database(const std::string& /* name */) {
- bool _return = false;
- return _return;
+ void drop_database(const std::string& /* name */, const bool /* deleteData */) {
+ return;
+ }
+ void get_databases(std::vector<std::string> & /* _return */, const std::string& /* pattern */) {
+ return;
}
- void get_databases(std::vector<std::string> & /* _return */) {
+ void get_all_databases(std::vector<std::string> & /* _return */) {
return;
}
void get_type(Type& /* _return */, const std::string& /* name */) {
@@ -93,6 +96,9 @@ class ThriftHiveMetastoreNull : virtual
void get_tables(std::vector<std::string> & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */) {
return;
}
+ void get_all_tables(std::vector<std::string> & /* _return */, const std::string& /* db_name */) {
+ return;
+ }
void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) {
return;
}
@@ -151,25 +157,21 @@ class ThriftHiveMetastoreNull : virtual
class ThriftHiveMetastore_create_database_args {
public:
- ThriftHiveMetastore_create_database_args() : name(""), description("") {
+ ThriftHiveMetastore_create_database_args() {
}
virtual ~ThriftHiveMetastore_create_database_args() throw() {}
- std::string name;
- std::string description;
+ Database database;
struct __isset {
- __isset() : name(false), description(false) {}
- bool name;
- bool description;
+ __isset() : database(false) {}
+ bool database;
} __isset;
bool operator == (const ThriftHiveMetastore_create_database_args & rhs) const
{
- if (!(name == rhs.name))
- return false;
- if (!(description == rhs.description))
+ if (!(database == rhs.database))
return false;
return true;
}
@@ -190,8 +192,7 @@ class ThriftHiveMetastore_create_databas
virtual ~ThriftHiveMetastore_create_database_pargs() throw() {}
- const std::string* name;
- const std::string* description;
+ const Database* database;
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
@@ -200,30 +201,30 @@ class ThriftHiveMetastore_create_databas
class ThriftHiveMetastore_create_database_result {
public:
- ThriftHiveMetastore_create_database_result() : success(0) {
+ ThriftHiveMetastore_create_database_result() {
}
virtual ~ThriftHiveMetastore_create_database_result() throw() {}
- bool success;
AlreadyExistsException o1;
- MetaException o2;
+ InvalidObjectException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o1(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
bool o1;
bool o2;
+ bool o3;
} __isset;
bool operator == (const ThriftHiveMetastore_create_database_result & rhs) const
{
- if (!(success == rhs.success))
- return false;
if (!(o1 == rhs.o1))
return false;
if (!(o2 == rhs.o2))
return false;
+ if (!(o3 == rhs.o3))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_create_database_result &rhs) const {
@@ -243,15 +244,15 @@ class ThriftHiveMetastore_create_databas
virtual ~ThriftHiveMetastore_create_database_presult() throw() {}
- bool* success;
AlreadyExistsException o1;
- MetaException o2;
+ InvalidObjectException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o1(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
bool o1;
bool o2;
+ bool o3;
} __isset;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
@@ -366,22 +367,26 @@ class ThriftHiveMetastore_get_database_p
class ThriftHiveMetastore_drop_database_args {
public:
- ThriftHiveMetastore_drop_database_args() : name("") {
+ ThriftHiveMetastore_drop_database_args() : name(""), deleteData(0) {
}
virtual ~ThriftHiveMetastore_drop_database_args() throw() {}
std::string name;
+ bool deleteData;
struct __isset {
- __isset() : name(false) {}
+ __isset() : name(false), deleteData(false) {}
bool name;
+ bool deleteData;
} __isset;
bool operator == (const ThriftHiveMetastore_drop_database_args & rhs) const
{
if (!(name == rhs.name))
return false;
+ if (!(deleteData == rhs.deleteData))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_drop_database_args &rhs) const {
@@ -402,6 +407,7 @@ class ThriftHiveMetastore_drop_database_
virtual ~ThriftHiveMetastore_drop_database_pargs() throw() {}
const std::string* name;
+ const bool* deleteData;
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
@@ -410,26 +416,30 @@ class ThriftHiveMetastore_drop_database_
class ThriftHiveMetastore_drop_database_result {
public:
- ThriftHiveMetastore_drop_database_result() : success(0) {
+ ThriftHiveMetastore_drop_database_result() {
}
virtual ~ThriftHiveMetastore_drop_database_result() throw() {}
- bool success;
- MetaException o2;
+ NoSuchObjectException o1;
+ InvalidOperationException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
+ bool o1;
bool o2;
+ bool o3;
} __isset;
bool operator == (const ThriftHiveMetastore_drop_database_result & rhs) const
{
- if (!(success == rhs.success))
+ if (!(o1 == rhs.o1))
return false;
if (!(o2 == rhs.o2))
return false;
+ if (!(o3 == rhs.o3))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_drop_database_result &rhs) const {
@@ -449,13 +459,15 @@ class ThriftHiveMetastore_drop_database_
virtual ~ThriftHiveMetastore_drop_database_presult() throw() {}
- bool* success;
- MetaException o2;
+ NoSuchObjectException o1;
+ InvalidOperationException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
+ bool o1;
bool o2;
+ bool o3;
} __isset;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
@@ -465,14 +477,22 @@ class ThriftHiveMetastore_drop_database_
class ThriftHiveMetastore_get_databases_args {
public:
- ThriftHiveMetastore_get_databases_args() {
+ ThriftHiveMetastore_get_databases_args() : pattern("") {
}
virtual ~ThriftHiveMetastore_get_databases_args() throw() {}
+ std::string pattern;
- bool operator == (const ThriftHiveMetastore_get_databases_args & /* rhs */) const
+ struct __isset {
+ __isset() : pattern(false) {}
+ bool pattern;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_databases_args & rhs) const
{
+ if (!(pattern == rhs.pattern))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_get_databases_args &rhs) const {
@@ -492,6 +512,7 @@ class ThriftHiveMetastore_get_databases_
virtual ~ThriftHiveMetastore_get_databases_pargs() throw() {}
+ const std::string* pattern;
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
@@ -552,6 +573,96 @@ class ThriftHiveMetastore_get_databases_
};
+class ThriftHiveMetastore_get_all_databases_args {
+ public:
+
+ ThriftHiveMetastore_get_all_databases_args() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_databases_args() throw() {}
+
+
+ bool operator == (const ThriftHiveMetastore_get_all_databases_args & /* rhs */) const
+ {
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_databases_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_databases_args & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_databases_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_databases_pargs() throw() {}
+
+
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_databases_result {
+ public:
+
+ ThriftHiveMetastore_get_all_databases_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_databases_result() throw() {}
+
+ std::vector<std::string> success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_all_databases_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_databases_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_databases_result & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_databases_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_databases_presult() throw() {}
+
+ std::vector<std::string> * success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+
+};
+
class ThriftHiveMetastore_get_type_args {
public:
@@ -605,11 +716,13 @@ class ThriftHiveMetastore_get_type_resul
virtual ~ThriftHiveMetastore_get_type_result() throw() {}
Type success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -617,6 +730,8 @@ class ThriftHiveMetastore_get_type_resul
{
if (!(success == rhs.success))
return false;
+ if (!(o1 == rhs.o1))
+ return false;
if (!(o2 == rhs.o2))
return false;
return true;
@@ -639,11 +754,13 @@ class ThriftHiveMetastore_get_type_presu
virtual ~ThriftHiveMetastore_get_type_presult() throw() {}
Type* success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -815,11 +932,13 @@ class ThriftHiveMetastore_drop_type_resu
virtual ~ThriftHiveMetastore_drop_type_result() throw() {}
bool success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -827,6 +946,8 @@ class ThriftHiveMetastore_drop_type_resu
{
if (!(success == rhs.success))
return false;
+ if (!(o1 == rhs.o1))
+ return false;
if (!(o2 == rhs.o2))
return false;
return true;
@@ -849,11 +970,13 @@ class ThriftHiveMetastore_drop_type_pres
virtual ~ThriftHiveMetastore_drop_type_presult() throw() {}
bool* success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -1516,6 +1639,105 @@ class ThriftHiveMetastore_get_tables_pre
};
+class ThriftHiveMetastore_get_all_tables_args {
+ public:
+
+ ThriftHiveMetastore_get_all_tables_args() : db_name("") {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_tables_args() throw() {}
+
+ std::string db_name;
+
+ struct __isset {
+ __isset() : db_name(false) {}
+ bool db_name;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_all_tables_args & rhs) const
+ {
+ if (!(db_name == rhs.db_name))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_tables_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_tables_args & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_tables_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_tables_pargs() throw() {}
+
+ const std::string* db_name;
+
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_tables_result {
+ public:
+
+ ThriftHiveMetastore_get_all_tables_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_tables_result() throw() {}
+
+ std::vector<std::string> success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_all_tables_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_tables_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_tables_result & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_tables_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_tables_presult() throw() {}
+
+ std::vector<std::string> * success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+
+};
+
class ThriftHiveMetastore_get_table_args {
public:
@@ -3433,18 +3655,21 @@ class ThriftHiveMetastoreClient : virtua
boost::shared_ptr<apache::thrift::protocol::TProtocol> getOutputProtocol() {
return poprot_;
}
- bool create_database(const std::string& name, const std::string& description);
- void send_create_database(const std::string& name, const std::string& description);
- bool recv_create_database();
+ void create_database(const Database& database);
+ void send_create_database(const Database& database);
+ void recv_create_database();
void get_database(Database& _return, const std::string& name);
void send_get_database(const std::string& name);
void recv_get_database(Database& _return);
- bool drop_database(const std::string& name);
- void send_drop_database(const std::string& name);
- bool recv_drop_database();
- void get_databases(std::vector<std::string> & _return);
- void send_get_databases();
+ void drop_database(const std::string& name, const bool deleteData);
+ void send_drop_database(const std::string& name, const bool deleteData);
+ void recv_drop_database();
+ void get_databases(std::vector<std::string> & _return, const std::string& pattern);
+ void send_get_databases(const std::string& pattern);
void recv_get_databases(std::vector<std::string> & _return);
+ void get_all_databases(std::vector<std::string> & _return);
+ void send_get_all_databases();
+ void recv_get_all_databases(std::vector<std::string> & _return);
void get_type(Type& _return, const std::string& name);
void send_get_type(const std::string& name);
void recv_get_type(Type& _return);
@@ -3472,6 +3697,9 @@ class ThriftHiveMetastoreClient : virtua
void get_tables(std::vector<std::string> & _return, const std::string& db_name, const std::string& pattern);
void send_get_tables(const std::string& db_name, const std::string& pattern);
void recv_get_tables(std::vector<std::string> & _return);
+ void get_all_tables(std::vector<std::string> & _return, const std::string& db_name);
+ void send_get_all_tables(const std::string& db_name);
+ void recv_get_all_tables(std::vector<std::string> & _return);
void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name);
void send_get_table(const std::string& dbname, const std::string& tbl_name);
void recv_get_table(Table& _return);
@@ -3535,6 +3763,7 @@ class ThriftHiveMetastoreProcessor : vir
void process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
+ void process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
@@ -3544,6 +3773,7 @@ class ThriftHiveMetastoreProcessor : vir
void process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
+ void process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
@@ -3569,6 +3799,7 @@ class ThriftHiveMetastoreProcessor : vir
processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database;
processMap_["drop_database"] = &ThriftHiveMetastoreProcessor::process_drop_database;
processMap_["get_databases"] = &ThriftHiveMetastoreProcessor::process_get_databases;
+ processMap_["get_all_databases"] = &ThriftHiveMetastoreProcessor::process_get_all_databases;
processMap_["get_type"] = &ThriftHiveMetastoreProcessor::process_get_type;
processMap_["create_type"] = &ThriftHiveMetastoreProcessor::process_create_type;
processMap_["drop_type"] = &ThriftHiveMetastoreProcessor::process_drop_type;
@@ -3578,6 +3809,7 @@ class ThriftHiveMetastoreProcessor : vir
processMap_["create_table"] = &ThriftHiveMetastoreProcessor::process_create_table;
processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table;
processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables;
+ processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables;
processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table;
processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table;
processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition;
@@ -3618,14 +3850,10 @@ class ThriftHiveMetastoreMultiface : vir
ifaces_.push_back(iface);
}
public:
- bool create_database(const std::string& name, const std::string& description) {
+ void create_database(const Database& database) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
- if (i == sz - 1) {
- return ifaces_[i]->create_database(name, description);
- } else {
- ifaces_[i]->create_database(name, description);
- }
+ ifaces_[i]->create_database(database);
}
}
@@ -3641,25 +3869,33 @@ class ThriftHiveMetastoreMultiface : vir
}
}
- bool drop_database(const std::string& name) {
+ void drop_database(const std::string& name, const bool deleteData) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ ifaces_[i]->drop_database(name, deleteData);
+ }
+ }
+
+ void get_databases(std::vector<std::string> & _return, const std::string& pattern) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
- return ifaces_[i]->drop_database(name);
+ ifaces_[i]->get_databases(_return, pattern);
+ return;
} else {
- ifaces_[i]->drop_database(name);
+ ifaces_[i]->get_databases(_return, pattern);
}
}
}
- void get_databases(std::vector<std::string> & _return) {
+ void get_all_databases(std::vector<std::string> & _return) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
- ifaces_[i]->get_databases(_return);
+ ifaces_[i]->get_all_databases(_return);
return;
} else {
- ifaces_[i]->get_databases(_return);
+ ifaces_[i]->get_all_databases(_return);
}
}
}
@@ -3760,6 +3996,18 @@ class ThriftHiveMetastoreMultiface : vir
}
}
+ void get_all_tables(std::vector<std::string> & _return, const std::string& db_name) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->get_all_tables(_return, db_name);
+ return;
+ } else {
+ ifaces_[i]->get_all_tables(_return, db_name);
+ }
+ }
+ }
+
void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
Modified: hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp?rev=997851&r1=997850&r2=997851&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (original)
+++ hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp Thu Sep 16 17:09:41 2010
@@ -22,7 +22,7 @@ class ThriftHiveMetastoreHandler : virtu
// Your initialization goes here
}
- bool create_database(const std::string& name, const std::string& description) {
+ void create_database(const Database& database) {
// Your implementation goes here
printf("create_database\n");
}
@@ -32,16 +32,21 @@ class ThriftHiveMetastoreHandler : virtu
printf("get_database\n");
}
- bool drop_database(const std::string& name) {
+ void drop_database(const std::string& name, const bool deleteData) {
// Your implementation goes here
printf("drop_database\n");
}
- void get_databases(std::vector<std::string> & _return) {
+ void get_databases(std::vector<std::string> & _return, const std::string& pattern) {
// Your implementation goes here
printf("get_databases\n");
}
+ void get_all_databases(std::vector<std::string> & _return) {
+ // Your implementation goes here
+ printf("get_all_databases\n");
+ }
+
void get_type(Type& _return, const std::string& name) {
// Your implementation goes here
printf("get_type\n");
@@ -87,6 +92,11 @@ class ThriftHiveMetastoreHandler : virtu
printf("get_tables\n");
}
+ void get_all_tables(std::vector<std::string> & _return, const std::string& db_name) {
+ // Your implementation goes here
+ printf("get_all_tables\n");
+ }
+
void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) {
// Your implementation goes here
printf("get_table\n");
Modified: hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.cpp
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.cpp?rev=997851&r1=997850&r2=997851&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.cpp (original)
+++ hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.cpp Thu Sep 16 17:09:41 2010
@@ -261,8 +261,8 @@ uint32_t Type::write(apache::thrift::pro
return xfer;
}
-const char* Database::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972";
-const uint8_t Database::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+const char* Database::ascii_fingerprint = "AB879940BD15B6B25691265F7384B271";
+const uint8_t Database::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71};
uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) {
@@ -300,6 +300,14 @@ uint32_t Database::read(apache::thrift::
xfer += iprot->skip(ftype);
}
break;
+ case 3:
+ if (ftype == apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->locationUri);
+ this->__isset.locationUri = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -321,6 +329,9 @@ uint32_t Database::write(apache::thrift:
xfer += oprot->writeFieldBegin("description", apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->description);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("locationUri", apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->locationUri);
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
Modified: hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.h
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.h?rev=997851&r1=997850&r2=997851&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.h (original)
+++ hadoop/hive/branches/branch-0.6/metastore/src/gen-cpp/hive_metastore_types.h Thu Sep 16 17:09:41 2010
@@ -153,21 +153,23 @@ class Type {
class Database {
public:
- static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972";
- static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+ static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271";
+ static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71};
- Database() : name(""), description("") {
+ Database() : name(""), description(""), locationUri("") {
}
virtual ~Database() throw() {}
std::string name;
std::string description;
+ std::string locationUri;
struct __isset {
- __isset() : name(false), description(false) {}
+ __isset() : name(false), description(false), locationUri(false) {}
bool name;
bool description;
+ bool locationUri;
} __isset;
bool operator == (const Database & rhs) const
@@ -176,6 +178,8 @@ class Database {
return false;
if (!(description == rhs.description))
return false;
+ if (!(locationUri == rhs.locationUri))
+ return false;
return true;
}
bool operator != (const Database &rhs) const {
Modified: hadoop/hive/branches/branch-0.6/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java?rev=997851&r1=997850&r2=997851&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (original)
+++ hadoop/hive/branches/branch-0.6/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java Thu Sep 16 17:09:41 2010
@@ -22,11 +22,14 @@ public class Database implements TBase,
private static final TStruct STRUCT_DESC = new TStruct("Database");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2);
+ private static final TField LOCATION_URI_FIELD_DESC = new TField("locationUri", TType.STRING, (short)3);
private String name;
public static final int NAME = 1;
private String description;
public static final int DESCRIPTION = 2;
+ private String locationUri;
+ public static final int LOCATIONURI = 3;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
@@ -37,6 +40,8 @@ public class Database implements TBase,
new FieldValueMetaData(TType.STRING)));
put(DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
+ put(LOCATIONURI, new FieldMetaData("locationUri", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
}});
static {
@@ -48,11 +53,13 @@ public class Database implements TBase,
public Database(
String name,
- String description)
+ String description,
+ String locationUri)
{
this();
this.name = name;
this.description = description;
+ this.locationUri = locationUri;
}
/**
@@ -65,6 +72,9 @@ public class Database implements TBase,
if (other.isSetDescription()) {
this.description = other.description;
}
+ if (other.isSetLocationUri()) {
+ this.locationUri = other.locationUri;
+ }
}
@Override
@@ -106,6 +116,23 @@ public class Database implements TBase,
return this.description != null;
}
+ public String getLocationUri() {
+ return this.locationUri;
+ }
+
+ public void setLocationUri(String locationUri) {
+ this.locationUri = locationUri;
+ }
+
+ public void unsetLocationUri() {
+ this.locationUri = null;
+ }
+
+ // Returns true if field locationUri is set (has been asigned a value) and false otherwise
+ public boolean isSetLocationUri() {
+ return this.locationUri != null;
+ }
+
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case NAME:
@@ -124,6 +151,14 @@ public class Database implements TBase,
}
break;
+ case LOCATIONURI:
+ if (value == null) {
+ unsetLocationUri();
+ } else {
+ setLocationUri((String)value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -137,6 +172,9 @@ public class Database implements TBase,
case DESCRIPTION:
return getDescription();
+ case LOCATIONURI:
+ return getLocationUri();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -149,6 +187,8 @@ public class Database implements TBase,
return isSetName();
case DESCRIPTION:
return isSetDescription();
+ case LOCATIONURI:
+ return isSetLocationUri();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -185,6 +225,15 @@ public class Database implements TBase,
return false;
}
+ boolean this_present_locationUri = true && this.isSetLocationUri();
+ boolean that_present_locationUri = true && that.isSetLocationUri();
+ if (this_present_locationUri || that_present_locationUri) {
+ if (!(this_present_locationUri && that_present_locationUri))
+ return false;
+ if (!this.locationUri.equals(that.locationUri))
+ return false;
+ }
+
return true;
}
@@ -218,6 +267,13 @@ public class Database implements TBase,
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case LOCATIONURI:
+ if (field.type == TType.STRING) {
+ this.locationUri = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -243,6 +299,11 @@ public class Database implements TBase,
oprot.writeString(this.description);
oprot.writeFieldEnd();
}
+ if (this.locationUri != null) {
+ oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC);
+ oprot.writeString(this.locationUri);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -267,6 +328,14 @@ public class Database implements TBase,
sb.append(this.description);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("locationUri:");
+ if (this.locationUri == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.locationUri);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}