THRIFT-270: change cpp namespaces from facebook::thrift to apache::thrift

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739644 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc
index 2bb24c4..4cb3538 100644
--- a/compiler/cpp/src/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/generate/t_cpp_generator.cc
@@ -618,7 +618,7 @@
                                                  bool write) {
   string extends = "";
   if (is_exception) {
-    extends = " : public facebook::thrift::TException";
+    extends = " : public apache::thrift::TException";
   }
 
   // Open struct def
@@ -687,7 +687,7 @@
   // Pointer to this structure's reflection local typespec.
   if (gen_dense_) {
     indent(out) <<
-      "static facebook::thrift::reflection::local::TypeSpec* local_reflection;" <<
+      "static apache::thrift::reflection::local::TypeSpec* local_reflection;" <<
       endl << endl;
   }
 
@@ -784,11 +784,11 @@
   }
   if (read) {
     out <<
-      indent() << "uint32_t read(facebook::thrift::protocol::TProtocol* iprot);" << endl;
+      indent() << "uint32_t read(apache::thrift::protocol::TProtocol* iprot);" << endl;
   }
   if (write) {
     out <<
-      indent() << "uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;" << endl;
+      indent() << "uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;" << endl;
   }
   out << endl;
 
@@ -879,7 +879,7 @@
     // For definitions of structures, do the arrays of metas and field specs also.
     if (is_definition) {
       out <<
-        indent() << "facebook::thrift::reflection::local::FieldMeta" << endl <<
+        indent() << "apache::thrift::reflection::local::FieldMeta" << endl <<
         indent() << local_reflection_name("metas", ttype) <<"[] = {" << endl;
       indent_up();
       for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
@@ -892,7 +892,7 @@
       indent_down();
 
       out <<
-        indent() << "facebook::thrift::reflection::local::TypeSpec*" << endl <<
+        indent() << "apache::thrift::reflection::local::TypeSpec*" << endl <<
         indent() << local_reflection_name("specs", ttype) <<"[] = {" << endl;
       indent_up();
       for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
@@ -909,7 +909,7 @@
   out <<
     indent() << "// " << ttype->get_fingerprint_material() << endl <<
     indent() << (is_definition ? "" : "extern ") <<
-      "facebook::thrift::reflection::local::TypeSpec" << endl <<
+      "apache::thrift::reflection::local::TypeSpec" << endl <<
       local_reflection_name("typespec", ttype) <<
       (is_definition ? "(" : ";") << endl;
 
@@ -921,7 +921,7 @@
   indent_up();
 
   if (ttype->is_void()) {
-    indent(out) << "facebook::thrift::protocol::T_STOP";
+    indent(out) << "apache::thrift::protocol::T_STOP";
   } else {
     indent(out) << type_to_enum(ttype);
   }
@@ -960,7 +960,7 @@
     return;
   }
   indent(out) <<
-    "facebook::thrift::reflection::local::TypeSpec* " <<
+    "apache::thrift::reflection::local::TypeSpec* " <<
       ttype->get_name() << "::local_reflection = " << endl <<
     indent() << "  &" << local_reflection_name("typespec", ttype) << ";" <<
     endl << endl;
@@ -976,7 +976,7 @@
                                              t_struct* tstruct,
                                              bool pointers) {
   indent(out) <<
-    "uint32_t " << tstruct->get_name() << "::read(facebook::thrift::protocol::TProtocol* iprot) {" << endl;
+    "uint32_t " << tstruct->get_name() << "::read(apache::thrift::protocol::TProtocol* iprot) {" << endl;
   indent_up();
 
   const vector<t_field*>& fields = tstruct->get_members();
@@ -987,12 +987,12 @@
     endl <<
     indent() << "uint32_t xfer = 0;" << endl <<
     indent() << "std::string fname;" << endl <<
-    indent() << "facebook::thrift::protocol::TType ftype;" << endl <<
+    indent() << "apache::thrift::protocol::TType ftype;" << endl <<
     indent() << "int16_t fid;" << endl <<
     endl <<
     indent() << "xfer += iprot->readStructBegin(fname);" << endl <<
     endl <<
-    indent() << "using facebook::thrift::protocol::TProtocolException;" << endl <<
+    indent() << "using apache::thrift::protocol::TProtocolException;" << endl <<
     endl;
 
   // Required variables aren't in __isset, so we need tmp vars to check them.
@@ -1014,7 +1014,7 @@
 
     // Check for field STOP marker
     out <<
-      indent() << "if (ftype == facebook::thrift::protocol::T_STOP) {" << endl <<
+      indent() << "if (ftype == apache::thrift::protocol::T_STOP) {" << endl <<
       indent() << "  break;" << endl <<
       indent() << "}" << endl;
 
@@ -1115,7 +1115,7 @@
   vector<t_field*>::const_iterator f_iter;
 
   indent(out) <<
-    "uint32_t " << tstruct->get_name() << "::write(facebook::thrift::protocol::TProtocol* oprot) const {" << endl;
+    "uint32_t " << tstruct->get_name() << "::write(apache::thrift::protocol::TProtocol* oprot) const {" << endl;
   indent_up();
 
   out <<
@@ -1177,7 +1177,7 @@
   vector<t_field*>::const_iterator f_iter;
 
   indent(out) <<
-    "uint32_t " << tstruct->get_name() << "::write(facebook::thrift::protocol::TProtocol* oprot) const {" << endl;
+    "uint32_t " << tstruct->get_name() << "::write(apache::thrift::protocol::TProtocol* oprot) const {" << endl;
   indent_up();
 
   out <<
@@ -1360,12 +1360,12 @@
   if (gen_reflection_limited_) {
     f_header_ <<
       indent() << "static void getStaticLimitedReflection" <<
-      "(facebook::thrift::reflection::limited::Service & _return);" << endl;
+      "(apache::thrift::reflection::limited::Service & _return);" << endl;
     // TODO(dreiss): Uncomment and test this if we decide we need
     // a virtual function with this effect.
     //f_header_ <<
     //  indent() << "virtual void getVirtualLimitedReflection" <<
-    //  "(facebook::thrift::reflection::limited::Service & _return) ";
+    //  "(apache::thrift::reflection::limited::Service & _return) ";
     //scope_up(f_header_);
     //f_header_ <<
     //  indent() << "getStaticLimitedReflection(_return);" << endl;
@@ -1575,7 +1575,7 @@
 
   indent_up();
   f_header_ <<
-    indent() << service_name_ << "Client(boost::shared_ptr<facebook::thrift::protocol::TProtocol> prot) :" << endl;
+    indent() << service_name_ << "Client(boost::shared_ptr<apache::thrift::protocol::TProtocol> prot) :" << endl;
   if (extends.empty()) {
     f_header_ <<
       indent() << "  piprot_(prot)," << endl <<
@@ -1589,7 +1589,7 @@
   }
 
   f_header_ <<
-    indent() << service_name_ << "Client(boost::shared_ptr<facebook::thrift::protocol::TProtocol> iprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> oprot) :" << endl;
+    indent() << service_name_ << "Client(boost::shared_ptr<apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> oprot) :" << endl;
   if (extends.empty()) {
     f_header_ <<
       indent() << "  piprot_(iprot)," << endl <<
@@ -1604,12 +1604,12 @@
 
   // Generate getters for the protocols.
   f_header_ <<
-    indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> getInputProtocol() {" << endl <<
+    indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> getInputProtocol() {" << endl <<
     indent() << "  return piprot_;" << endl <<
     indent() << "}" << endl;
 
   f_header_ <<
-    indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> getOutputProtocol() {" << endl <<
+    indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> getOutputProtocol() {" << endl <<
     indent() << "  return poprot_;" << endl <<
     indent() << "}" << endl;
 
@@ -1636,10 +1636,10 @@
       " protected:" << endl;
     indent_up();
     f_header_ <<
-      indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot_;"  << endl <<
-      indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot_;"  << endl <<
-      indent() << "facebook::thrift::protocol::TProtocol* iprot_;"  << endl <<
-      indent() << "facebook::thrift::protocol::TProtocol* oprot_;"  << endl;
+      indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot_;"  << endl <<
+      indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot_;"  << endl <<
+      indent() << "apache::thrift::protocol::TProtocol* iprot_;"  << endl <<
+      indent() << "apache::thrift::protocol::TProtocol* oprot_;"  << endl;
     indent_down();
   }
 
@@ -1710,7 +1710,7 @@
     // Serialize the request
     f_service_ <<
       indent() << "int32_t cseqid = 0;" << endl <<
-      indent() << "oprot_->writeMessageBegin(\"" << (*f_iter)->get_name() << "\", facebook::thrift::protocol::T_CALL, cseqid);" << endl <<
+      indent() << "oprot_->writeMessageBegin(\"" << (*f_iter)->get_name() << "\", apache::thrift::protocol::T_CALL, cseqid);" << endl <<
       endl <<
       indent() << argsname << " args;" << endl;
 
@@ -1744,27 +1744,27 @@
         endl <<
         indent() << "int32_t rseqid = 0;" << endl <<
         indent() << "std::string fname;" << endl <<
-        indent() << "facebook::thrift::protocol::TMessageType mtype;" << endl <<
+        indent() << "apache::thrift::protocol::TMessageType mtype;" << endl <<
         endl <<
         indent() << "iprot_->readMessageBegin(fname, mtype, rseqid);" << endl <<
-        indent() << "if (mtype == facebook::thrift::protocol::T_EXCEPTION) {" << endl <<
-        indent() << "  facebook::thrift::TApplicationException x;" << endl <<
+        indent() << "if (mtype == apache::thrift::protocol::T_EXCEPTION) {" << endl <<
+        indent() << "  apache::thrift::TApplicationException x;" << endl <<
         indent() << "  x.read(iprot_);" << endl <<
         indent() << "  iprot_->readMessageEnd();" << endl <<
         indent() << "  iprot_->getTransport()->readEnd();" << endl <<
         indent() << "  throw x;" << endl <<
         indent() << "}" << endl <<
-        indent() << "if (mtype != facebook::thrift::protocol::T_REPLY) {" << endl <<
-        indent() << "  iprot_->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+        indent() << "if (mtype != apache::thrift::protocol::T_REPLY) {" << endl <<
+        indent() << "  iprot_->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
         indent() << "  iprot_->readMessageEnd();" << endl <<
         indent() << "  iprot_->getTransport()->readEnd();" << endl <<
-        indent() << "  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
+        indent() << "  throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
         indent() << "}" << endl <<
         indent() << "if (fname.compare(\"" << (*f_iter)->get_name() << "\") != 0) {" << endl <<
-        indent() << "  iprot_->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+        indent() << "  iprot_->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
         indent() << "  iprot_->readMessageEnd();" << endl <<
         indent() << "  iprot_->getTransport()->readEnd();" << endl <<
-        indent() << "  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);" << endl <<
+        indent() << "  throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME);" << endl <<
         indent() << "}" << endl;
 
       if (!(*f_iter)->get_returntype()->is_void() &&
@@ -1820,7 +1820,7 @@
           "return;" << endl;
       } else {
         f_service_ <<
-          indent() << "throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, \"" << (*f_iter)->get_name() << " failed: unknown result\");" << endl;
+          indent() << "throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, \"" << (*f_iter)->get_name() << " failed: unknown result\");" << endl;
       }
 
       // Close function
@@ -1850,7 +1850,7 @@
   // Generate the header portion
   f_header_ <<
     "class " << service_name_ << "Processor : " <<
-    "virtual public facebook::thrift::TProcessor" <<
+    "virtual public apache::thrift::TProcessor" <<
     extends_processor << " {" << endl;
 
   // Protected data members
@@ -1860,7 +1860,7 @@
   f_header_ <<
     indent() << "boost::shared_ptr<" << service_name_ << "If> iface_;" << endl;
   f_header_ <<
-    indent() << "virtual bool process_fn(facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);" << endl;
+    indent() << "virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);" << endl;
   indent_down();
 
   // Process function declarations
@@ -1868,10 +1868,10 @@
     " private:" << endl;
   indent_up();
   f_header_ <<
-    indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*)> processMap_;" << endl;
+    indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)> processMap_;" << endl;
   for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
     indent(f_header_) <<
-      "void process_" << (*f_iter)->get_name() << "(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);" << endl;
+      "void process_" << (*f_iter)->get_name() << "(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);" << endl;
   }
   indent_down();
 
@@ -1906,7 +1906,7 @@
     declare_map <<
     indent() << "}" << endl <<
     endl <<
-    indent() << "virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot);" << endl <<
+    indent() << "virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot);" << endl <<
     indent() << "virtual ~" << service_name_ << "Processor() {}" << endl;
   indent_down();
   f_header_ <<
@@ -1914,25 +1914,25 @@
 
   // Generate the server implementation
   f_service_ <<
-    "bool " << service_name_ << "Processor::process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot) {" << endl;
+    "bool " << service_name_ << "Processor::process(boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot) {" << endl;
   indent_up();
 
   f_service_ <<
     endl <<
-    indent() << "facebook::thrift::protocol::TProtocol* iprot = piprot.get();" << endl <<
-    indent() << "facebook::thrift::protocol::TProtocol* oprot = poprot.get();" << endl <<
+    indent() << "apache::thrift::protocol::TProtocol* iprot = piprot.get();" << endl <<
+    indent() << "apache::thrift::protocol::TProtocol* oprot = poprot.get();" << endl <<
     indent() << "std::string fname;" << endl <<
-    indent() << "facebook::thrift::protocol::TMessageType mtype;" << endl <<
+    indent() << "apache::thrift::protocol::TMessageType mtype;" << endl <<
     indent() << "int32_t seqid;" << endl <<
     endl <<
     indent() << "iprot->readMessageBegin(fname, mtype, seqid);" << endl <<
     endl <<
-    indent() << "if (mtype != facebook::thrift::protocol::T_CALL) {" << endl <<
-    indent() << "  iprot->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+    indent() << "if (mtype != apache::thrift::protocol::T_CALL) {" << endl <<
+    indent() << "  iprot->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
     indent() << "  iprot->readMessageEnd();" << endl <<
     indent() << "  iprot->getTransport()->readEnd();" << endl <<
-    indent() << "  facebook::thrift::TApplicationException x(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
-    indent() << "  oprot->writeMessageBegin(fname, facebook::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
+    indent() << "  apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
+    indent() << "  oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
     indent() << "  x.write(oprot);" << endl <<
     indent() << "  oprot->writeMessageEnd();" << endl <<
     indent() << "  oprot->getTransport()->flush();" << endl <<
@@ -1949,21 +1949,21 @@
     endl;
 
   f_service_ <<
-    "bool " << service_name_ << "Processor::process_fn(facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) {" << endl;
+    "bool " << service_name_ << "Processor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) {" << endl;
   indent_up();
 
   // HOT: member function pointer map
   f_service_ <<
-    indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*)>::iterator pfn;" << endl <<
+    indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)>::iterator pfn;" << endl <<
     indent() << "pfn = processMap_.find(fname);" << endl <<
     indent() << "if (pfn == processMap_.end()) {" << endl;
   if (extends.empty()) {
     f_service_ <<
-      indent() << "  iprot->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+      indent() << "  iprot->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
       indent() << "  iprot->readMessageEnd();" << endl <<
       indent() << "  iprot->getTransport()->readEnd();" << endl <<
-      indent() << "  facebook::thrift::TApplicationException x(facebook::thrift::TApplicationException::UNKNOWN_METHOD, \"Invalid method name: '\"+fname+\"'\");" << endl <<
-      indent() << "  oprot->writeMessageBegin(fname, facebook::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
+      indent() << "  apache::thrift::TApplicationException x(apache::thrift::TApplicationException::UNKNOWN_METHOD, \"Invalid method name: '\"+fname+\"'\");" << endl <<
+      indent() << "  oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
       indent() << "  x.write(oprot);" << endl <<
       indent() << "  oprot->writeMessageEnd();" << endl <<
       indent() << "  oprot->getTransport()->flush();" << endl <<
@@ -2034,7 +2034,7 @@
   f_service_ <<
     "void " << tservice->get_name() << "Processor::" <<
     "process_" << tfunction->get_name() <<
-    "(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)" << endl;
+    "(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot)" << endl;
   scope_up(f_service_);
 
   string argsname = tservice->get_name() + "_" + tfunction->get_name() + "_args";
@@ -2120,8 +2120,8 @@
   if (!tfunction->is_async()) {
     indent_up();
     f_service_ <<
-      indent() << "facebook::thrift::TApplicationException x(e.what());" << endl <<
-      indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", facebook::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
+      indent() << "apache::thrift::TApplicationException x(e.what());" << endl <<
+      indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
       indent() << "x.write(oprot);" << endl <<
       indent() << "oprot->writeMessageEnd();" << endl <<
       indent() << "oprot->getTransport()->flush();" << endl <<
@@ -2144,7 +2144,7 @@
   // Serialize the result into a struct
   f_service_ <<
     endl <<
-    indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", facebook::thrift::protocol::T_REPLY, seqid);" << endl <<
+    indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", apache::thrift::protocol::T_REPLY, seqid);" << endl <<
     indent() << "result.write(oprot);" << endl <<
     indent() << "oprot->writeMessageEnd();" << endl <<
     indent() << "oprot->getTransport()->flush();" << endl <<
@@ -2268,10 +2268,10 @@
   // Open function
   f_service_ <<
     indent() << "void " << tservice->get_name() << "If::getStaticLimitedReflection" <<
-    "(facebook::thrift::reflection::limited::Service & _return) ";
+    "(apache::thrift::reflection::limited::Service & _return) ";
   scope_up(f_service_);
 
-  f_service_ << indent() << "using namespace facebook::thrift::reflection::limited;" << endl;
+  f_service_ << indent() << "using namespace apache::thrift::reflection::limited;" << endl;
 
   f_service_ << indent() << "_return.name = \"" << tservice->get_name() << "\";" << endl;
   f_service_ << indent() << "_return.fully_reflected = true;" << endl;
@@ -2340,10 +2340,10 @@
     "#include <transport/TServerSocket.h>" << endl <<
     "#include <transport/TBufferTransports.h>" << endl <<
     endl <<
-    "using namespace facebook::thrift;" << endl <<
-    "using namespace facebook::thrift::protocol;" << endl <<
-    "using namespace facebook::thrift::transport;" << endl <<
-    "using namespace facebook::thrift::server;" << endl <<
+    "using namespace apache::thrift;" << endl <<
+    "using namespace apache::thrift::protocol;" << endl <<
+    "using namespace apache::thrift::transport;" << endl <<
+    "using namespace apache::thrift::server;" << endl <<
     endl <<
     "using boost::shared_ptr;" << endl <<
     endl;
@@ -2507,18 +2507,18 @@
   // Declare variables, read header
   if (ttype->is_map()) {
     out <<
-      indent() << "facebook::thrift::protocol::TType " << ktype << ";" << endl <<
-      indent() << "facebook::thrift::protocol::TType " << vtype << ";" << endl <<
+      indent() << "apache::thrift::protocol::TType " << ktype << ";" << endl <<
+      indent() << "apache::thrift::protocol::TType " << vtype << ";" << endl <<
       indent() << "iprot->readMapBegin(" <<
                    ktype << ", " << vtype << ", " << size << ");" << endl;
   } else if (ttype->is_set()) {
     out <<
-      indent() << "facebook::thrift::protocol::TType " << etype << ";" << endl <<
+      indent() << "apache::thrift::protocol::TType " << etype << ";" << endl <<
       indent() << "iprot->readSetBegin(" <<
                    etype << ", " << size << ");" << endl;
   } else if (ttype->is_list()) {
     out <<
-      indent() << "facebook::thrift::protocol::TType " << etype << ";" << endl <<
+      indent() << "apache::thrift::protocol::TType " << etype << ";" << endl <<
       indent() << "iprot->readListBegin(" <<
       etype << ", " << size << ");" << endl;
     if (!use_push) {
@@ -3084,32 +3084,32 @@
     case t_base_type::TYPE_VOID:
       throw "NO T_VOID CONSTRUCT";
     case t_base_type::TYPE_STRING:
-      return "facebook::thrift::protocol::T_STRING";
+      return "apache::thrift::protocol::T_STRING";
     case t_base_type::TYPE_BOOL:
-      return "facebook::thrift::protocol::T_BOOL";
+      return "apache::thrift::protocol::T_BOOL";
     case t_base_type::TYPE_BYTE:
-      return "facebook::thrift::protocol::T_BYTE";
+      return "apache::thrift::protocol::T_BYTE";
     case t_base_type::TYPE_I16:
-      return "facebook::thrift::protocol::T_I16";
+      return "apache::thrift::protocol::T_I16";
     case t_base_type::TYPE_I32:
-      return "facebook::thrift::protocol::T_I32";
+      return "apache::thrift::protocol::T_I32";
     case t_base_type::TYPE_I64:
-      return "facebook::thrift::protocol::T_I64";
+      return "apache::thrift::protocol::T_I64";
     case t_base_type::TYPE_DOUBLE:
-      return "facebook::thrift::protocol::T_DOUBLE";
+      return "apache::thrift::protocol::T_DOUBLE";
     }
   } else if (type->is_enum()) {
-    return "facebook::thrift::protocol::T_I32";
+    return "apache::thrift::protocol::T_I32";
   } else if (type->is_struct()) {
-    return "facebook::thrift::protocol::T_STRUCT";
+    return "apache::thrift::protocol::T_STRUCT";
   } else if (type->is_xception()) {
-    return "facebook::thrift::protocol::T_STRUCT";
+    return "apache::thrift::protocol::T_STRUCT";
   } else if (type->is_map()) {
-    return "facebook::thrift::protocol::T_MAP";
+    return "apache::thrift::protocol::T_MAP";
   } else if (type->is_set()) {
-    return "facebook::thrift::protocol::T_SET";
+    return "apache::thrift::protocol::T_SET";
   } else if (type->is_list()) {
-    return "facebook::thrift::protocol::T_LIST";
+    return "apache::thrift::protocol::T_LIST";
   }
 
   throw "INVALID TYPE IN type_to_enum: " + type->get_name();
diff --git a/lib/cpp/src/TProcessor.h b/lib/cpp/src/TProcessor.h
index cba4a84..3c4b171 100644
--- a/lib/cpp/src/TProcessor.h
+++ b/lib/cpp/src/TProcessor.h
@@ -11,7 +11,7 @@
 #include <protocol/TProtocol.h>
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
 
 /**
  * A processor is a generic object that acts upon two streams of data, one
@@ -28,7 +28,7 @@
   virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
                        boost::shared_ptr<protocol::TProtocol> out) = 0;
 
-  bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> io) {
+  bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> io) {
     return process(io, io);
   }
 
@@ -36,6 +36,6 @@
   TProcessor() {}
 };
 
-}} // facebook::thrift
+}} // apache::thrift
 
 #endif // #ifndef _THRIFT_PROCESSOR_H_
diff --git a/lib/cpp/src/TReflectionLocal.h b/lib/cpp/src/TReflectionLocal.h
index 8e39117..3644140 100644
--- a/lib/cpp/src/TReflectionLocal.h
+++ b/lib/cpp/src/TReflectionLocal.h
@@ -19,9 +19,9 @@
  * @author David Reiss <dreiss@facebook.com>
  */
 
-namespace facebook { namespace thrift { namespace reflection { namespace local {
+namespace apache { namespace thrift { namespace reflection { namespace local {
 
-using facebook::thrift::protocol::TType;
+using apache::thrift::protocol::TType;
 
 // We include this many bytes of the structure's fingerprint when serializing
 // a top-level structure.  Long enough to make collisions unlikely, short
@@ -79,6 +79,6 @@
 
 };
 
-}}}} // facebook::thrift::reflection::local
+}}}} // apache::thrift::reflection::local
 
 #endif // #ifndef _THRIFT_TREFLECTIONLOCAL_H_
diff --git a/lib/cpp/src/Thrift.cpp b/lib/cpp/src/Thrift.cpp
index fb6bcbc..bbf9710 100644
--- a/lib/cpp/src/Thrift.cpp
+++ b/lib/cpp/src/Thrift.cpp
@@ -11,7 +11,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
 
 TOutput GlobalOutput;
 
@@ -77,29 +77,29 @@
 #endif  // HAVE_STRERROR_R
 }
 
-uint32_t TApplicationException::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t TApplicationException::read(apache::thrift::protocol::TProtocol* iprot) {
   uint32_t xfer = 0;
   std::string fname;
-  facebook::thrift::protocol::TType ftype;
+  apache::thrift::protocol::TType ftype;
   int16_t fid;
 
   xfer += iprot->readStructBegin(fname);
 
   while (true) {
     xfer += iprot->readFieldBegin(fname, ftype, fid);
-    if (ftype == facebook::thrift::protocol::T_STOP) {
+    if (ftype == apache::thrift::protocol::T_STOP) {
       break;
     }
     switch (fid) {
     case 1:
-      if (ftype == facebook::thrift::protocol::T_STRING) {
+      if (ftype == apache::thrift::protocol::T_STRING) {
         xfer += iprot->readString(message_);
       } else {
         xfer += iprot->skip(ftype);
       }
       break;
     case 2:
-      if (ftype == facebook::thrift::protocol::T_I32) {
+      if (ftype == apache::thrift::protocol::T_I32) {
         int32_t type;
         xfer += iprot->readI32(type);
         type_ = (TApplicationExceptionType)type;
@@ -118,13 +118,13 @@
   return xfer;
 }
 
-uint32_t TApplicationException::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t TApplicationException::write(apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("TApplicationException");
-  xfer += oprot->writeFieldBegin("message", facebook::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(message_);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("type", facebook::thrift::protocol::T_I32, 2);
+  xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_I32, 2);
   xfer += oprot->writeI32(type_);
   xfer += oprot->writeFieldEnd();
   xfer += oprot->writeFieldStop();
@@ -132,4 +132,4 @@
   return xfer;
 }
 
-}} // facebook::thrift
+}} // apache::thrift
diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h
index eb5000e..624687b 100644
--- a/lib/cpp/src/Thrift.h
+++ b/lib/cpp/src/Thrift.h
@@ -24,7 +24,7 @@
 
 #include "TLogging.h"
 
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
 
 class TOutput {
  public:
@@ -171,6 +171,6 @@
 }}
 
 
-}} // facebook::thrift
+}} // apache::thrift
 
 #endif // #ifndef _THRIFT_THRIFT_H_
diff --git a/lib/cpp/src/concurrency/Exception.h b/lib/cpp/src/concurrency/Exception.h
index 00e2649..cdc8538 100644
--- a/lib/cpp/src/concurrency/Exception.h
+++ b/lib/cpp/src/concurrency/Exception.h
@@ -10,31 +10,31 @@
 #include <exception>
 #include <Thrift.h>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
-class NoSuchTaskException : public facebook::thrift::TException {};
+class NoSuchTaskException : public apache::thrift::TException {};
 
-class UncancellableTaskException : public facebook::thrift::TException {};
+class UncancellableTaskException : public apache::thrift::TException {};
 
-class InvalidArgumentException : public facebook::thrift::TException {};
+class InvalidArgumentException : public apache::thrift::TException {};
 
-class IllegalStateException : public facebook::thrift::TException {};
+class IllegalStateException : public apache::thrift::TException {};
 
-class TimedOutException : public facebook::thrift::TException {
+class TimedOutException : public apache::thrift::TException {
 public:
   TimedOutException():TException("TimedOutException"){};
   TimedOutException(const std::string& message ) :
     TException(message) {}
 };
 
-class TooManyPendingTasksException : public facebook::thrift::TException {
+class TooManyPendingTasksException : public apache::thrift::TException {
 public:
   TooManyPendingTasksException():TException("TooManyPendingTasksException"){};
   TooManyPendingTasksException(const std::string& message ) :
     TException(message) {}
 };
 
-class SystemResourceException : public facebook::thrift::TException {
+class SystemResourceException : public apache::thrift::TException {
 public:
     SystemResourceException() {}
 
@@ -42,6 +42,6 @@
         TException(message) {}
 };
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_
diff --git a/lib/cpp/src/concurrency/FunctionRunner.h b/lib/cpp/src/concurrency/FunctionRunner.h
index 94ab837..6379c1c 100644
--- a/lib/cpp/src/concurrency/FunctionRunner.h
+++ b/lib/cpp/src/concurrency/FunctionRunner.h
@@ -10,7 +10,7 @@
 #include <tr1/functional>
 #include "thrift/lib/cpp/concurrency/Thread.h"
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * Convenient implementation of Runnable that will execute arbitrary callbacks.
@@ -60,6 +60,6 @@
   VoidFunc func_;
 };
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H
diff --git a/lib/cpp/src/concurrency/Monitor.cpp b/lib/cpp/src/concurrency/Monitor.cpp
index 932ae68..81855dc 100644
--- a/lib/cpp/src/concurrency/Monitor.cpp
+++ b/lib/cpp/src/concurrency/Monitor.cpp
@@ -15,7 +15,7 @@
 
 #include <pthread.h>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * Monitor implementation using the POSIX pthread library
@@ -122,4 +122,4 @@
 
 void Monitor::notifyAll() const { impl_->notifyAll(); }
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Monitor.h b/lib/cpp/src/concurrency/Monitor.h
index 1eb36eb..fe7bf11 100644
--- a/lib/cpp/src/concurrency/Monitor.h
+++ b/lib/cpp/src/concurrency/Monitor.h
@@ -9,7 +9,7 @@
 
 #include "Exception.h"
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * A monitor is a combination mutex and condition-event.  Waiting and
@@ -67,6 +67,6 @@
 };
 
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_MONITOR_H_
diff --git a/lib/cpp/src/concurrency/Mutex.cpp b/lib/cpp/src/concurrency/Mutex.cpp
index b160b67..af68db6 100644
--- a/lib/cpp/src/concurrency/Mutex.cpp
+++ b/lib/cpp/src/concurrency/Mutex.cpp
@@ -11,7 +11,7 @@
 
 using boost::shared_ptr;
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * Implementation of Mutex class using POSIX mutex
@@ -145,5 +145,5 @@
 
 void ReadWriteMutex::release() const { impl_->release(); }
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h
index 3b8631b..92eb0db 100644
--- a/lib/cpp/src/concurrency/Mutex.h
+++ b/lib/cpp/src/concurrency/Mutex.h
@@ -9,7 +9,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * A simple mutex class
@@ -95,6 +95,6 @@
 #define RWGuard(m) incorrect_use_of_RWGuard(m)
 
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_
diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.cpp b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
index 001d6ad..9655a86 100644
--- a/lib/cpp/src/concurrency/PosixThreadFactory.cpp
+++ b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
@@ -18,7 +18,7 @@
 
 #include <boost/weak_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 using boost::shared_ptr;
 using boost::weak_ptr;
@@ -293,4 +293,4 @@
 
 Thread::id_t PosixThreadFactory::getCurrentThreadId() const { return impl_->getCurrentThreadId(); }
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.h b/lib/cpp/src/concurrency/PosixThreadFactory.h
index 0f12fc9..66df4b3 100644
--- a/lib/cpp/src/concurrency/PosixThreadFactory.h
+++ b/lib/cpp/src/concurrency/PosixThreadFactory.h
@@ -11,7 +11,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * A thread factory to create posix threads
@@ -113,6 +113,6 @@
   boost::shared_ptr<Impl> impl_;
 };
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_
diff --git a/lib/cpp/src/concurrency/Thread.h b/lib/cpp/src/concurrency/Thread.h
index 39ee816..0ce5e17 100644
--- a/lib/cpp/src/concurrency/Thread.h
+++ b/lib/cpp/src/concurrency/Thread.h
@@ -10,7 +10,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/weak_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 class Thread;
 
@@ -49,7 +49,7 @@
  * is difficult to abstract across platforms and is left for platform-specific
  * ThreadFactory implemtations to deal with
  *
- * @see facebook::thrift::concurrency::ThreadFactory)
+ * @see apache::thrift::concurrency::ThreadFactory)
  */
 class Thread {
 
@@ -107,6 +107,6 @@
   virtual Thread::id_t getCurrentThreadId() const = 0;
 };
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_THREAD_H_
diff --git a/lib/cpp/src/concurrency/ThreadManager.cpp b/lib/cpp/src/concurrency/ThreadManager.cpp
index 34acc4c..11c19a8 100644
--- a/lib/cpp/src/concurrency/ThreadManager.cpp
+++ b/lib/cpp/src/concurrency/ThreadManager.cpp
@@ -18,7 +18,7 @@
 #include <iostream>
 #endif //defined(DEBUG)
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
@@ -477,5 +477,5 @@
   return shared_ptr<ThreadManager>(new SimpleThreadManager(count, pendingTaskCountMax));
 }
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
diff --git a/lib/cpp/src/concurrency/ThreadManager.h b/lib/cpp/src/concurrency/ThreadManager.h
index 7bca5d0..b973b08 100644
--- a/lib/cpp/src/concurrency/ThreadManager.h
+++ b/lib/cpp/src/concurrency/ThreadManager.h
@@ -11,7 +11,7 @@
 #include <sys/types.h>
 #include "Thread.h"
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * Thread Pool Manager and related classes
@@ -152,6 +152,6 @@
   class Impl;
 };
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_
diff --git a/lib/cpp/src/concurrency/TimerManager.cpp b/lib/cpp/src/concurrency/TimerManager.cpp
index e3b7a89..c9555fb 100644
--- a/lib/cpp/src/concurrency/TimerManager.cpp
+++ b/lib/cpp/src/concurrency/TimerManager.cpp
@@ -12,7 +12,7 @@
 #include <iostream>
 #include <set>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 using boost::shared_ptr;
 
@@ -268,5 +268,5 @@
 
 const TimerManager::STATE TimerManager::state() const { return state_; }
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
diff --git a/lib/cpp/src/concurrency/TimerManager.h b/lib/cpp/src/concurrency/TimerManager.h
index 6d2eae9..3729646 100644
--- a/lib/cpp/src/concurrency/TimerManager.h
+++ b/lib/cpp/src/concurrency/TimerManager.h
@@ -15,7 +15,7 @@
 #include <map>
 #include <time.h>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * Timer Manager
@@ -103,6 +103,6 @@
   boost::shared_ptr<Thread> dispatcherThread_;
 };
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_
diff --git a/lib/cpp/src/concurrency/Util.cpp b/lib/cpp/src/concurrency/Util.cpp
index eeee0e5..c220238 100644
--- a/lib/cpp/src/concurrency/Util.cpp
+++ b/lib/cpp/src/concurrency/Util.cpp
@@ -16,7 +16,7 @@
 #include <sys/time.h>
 #endif // defined(HAVE_CLOCK_GETTIME)
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 const int64_t Util::currentTime() {
   int64_t result;
@@ -39,4 +39,4 @@
 }
 
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Util.h b/lib/cpp/src/concurrency/Util.h
index 483d14a..fa5b7f4 100644
--- a/lib/cpp/src/concurrency/Util.h
+++ b/lib/cpp/src/concurrency/Util.h
@@ -13,7 +13,7 @@
 #include <time.h>
 #include <sys/time.h>
 
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
 
 /**
  * Utility methods
@@ -83,6 +83,6 @@
   static const int64_t currentTime();
 };
 
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_UTIL_H_
diff --git a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
index 0dcf0bb..440f69b 100644
--- a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
@@ -14,10 +14,10 @@
 #include <iostream>
 #include <set>
 
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
 
 using boost::shared_ptr;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
 
 /**
  * ThreadManagerTests class
@@ -341,5 +341,5 @@
 
 const double ThreadFactoryTests::ERROR = .20;
 
-}}}} // facebook::thrift::concurrency::test
+}}}} // apache::thrift::concurrency::test
 
diff --git a/lib/cpp/src/concurrency/test/ThreadManagerTests.h b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
index 261ad5e..feb3e47 100644
--- a/lib/cpp/src/concurrency/test/ThreadManagerTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
@@ -16,9 +16,9 @@
 #include <set>
 #include <stdint.h>
 
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
 
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
 
 /**
  * ThreadManagerTests class
@@ -348,7 +348,7 @@
 
 const double ThreadManagerTests::ERROR = .20;
 
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency
 
-using namespace facebook::thrift::concurrency::test;
+using namespace apache::thrift::concurrency::test;
 
diff --git a/lib/cpp/src/concurrency/test/TimerManagerTests.h b/lib/cpp/src/concurrency/test/TimerManagerTests.h
index 13e3ef8..9e4e757 100644
--- a/lib/cpp/src/concurrency/test/TimerManagerTests.h
+++ b/lib/cpp/src/concurrency/test/TimerManagerTests.h
@@ -12,9 +12,9 @@
 #include <assert.h>
 #include <iostream>
 
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
 
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
 
 /**
  * ThreadManagerTests class
@@ -126,5 +126,5 @@
 
 const double TimerManagerTests::ERROR = .20;
 
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency
 
diff --git a/lib/cpp/src/processor/PeekProcessor.cpp b/lib/cpp/src/processor/PeekProcessor.cpp
index d864805..4cbaca0 100644
--- a/lib/cpp/src/processor/PeekProcessor.cpp
+++ b/lib/cpp/src/processor/PeekProcessor.cpp
@@ -1,10 +1,10 @@
 #include "PeekProcessor.h"
 
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift;
 
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
 
 PeekProcessor::PeekProcessor() {
   memoryBuffer_.reset(new TMemoryBuffer());
diff --git a/lib/cpp/src/processor/PeekProcessor.h b/lib/cpp/src/processor/PeekProcessor.h
index 697be27..6404b71 100644
--- a/lib/cpp/src/processor/PeekProcessor.h
+++ b/lib/cpp/src/processor/PeekProcessor.h
@@ -14,7 +14,7 @@
 #include <transport/TBufferTransports.h>
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
 
 /*
  * Class for peeking at the raw data that is being processed by another processor
@@ -22,7 +22,7 @@
  *
  * @author James Wang <jwang@facebook.com>
  */
-class PeekProcessor : public facebook::thrift::TProcessor {
+class PeekProcessor : public apache::thrift::TProcessor {
 
  public:
   PeekProcessor();
@@ -32,34 +32,34 @@
   //             protocolFactory  - the protocol factory used to wrap the memory buffer
   //             transportFactory - this TPipedTransportFactory is used to wrap the source transport
   //                                via a call to getPipedTransport
-  void initialize(boost::shared_ptr<facebook::thrift::TProcessor> actualProcessor,
-                  boost::shared_ptr<facebook::thrift::protocol::TProtocolFactory> protocolFactory,
-                  boost::shared_ptr<facebook::thrift::transport::TPipedTransportFactory> transportFactory);
+  void initialize(boost::shared_ptr<apache::thrift::TProcessor> actualProcessor,
+                  boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> protocolFactory,
+                  boost::shared_ptr<apache::thrift::transport::TPipedTransportFactory> transportFactory);
 
-  boost::shared_ptr<facebook::thrift::transport::TTransport> getPipedTransport(boost::shared_ptr<facebook::thrift::transport::TTransport> in);
+  boost::shared_ptr<apache::thrift::transport::TTransport> getPipedTransport(boost::shared_ptr<apache::thrift::transport::TTransport> in);
 
-  void setTargetTransport(boost::shared_ptr<facebook::thrift::transport::TTransport> targetTransport);
+  void setTargetTransport(boost::shared_ptr<apache::thrift::transport::TTransport> targetTransport);
 
-  virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> in,
-                       boost::shared_ptr<facebook::thrift::protocol::TProtocol> out);
+  virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> in,
+                       boost::shared_ptr<apache::thrift::protocol::TProtocol> out);
 
   // The following three functions can be overloaded by child classes to
   // achieve desired peeking behavior
   virtual void peekName(const std::string& fname);
   virtual void peekBuffer(uint8_t* buffer, uint32_t size);
-  virtual void peek(boost::shared_ptr<facebook::thrift::protocol::TProtocol> in,
-                    facebook::thrift::protocol::TType ftype,
+  virtual void peek(boost::shared_ptr<apache::thrift::protocol::TProtocol> in,
+                    apache::thrift::protocol::TType ftype,
                     int16_t fid);
   virtual void peekEnd();
 
  private:
-  boost::shared_ptr<facebook::thrift::TProcessor> actualProcessor_;
-  boost::shared_ptr<facebook::thrift::protocol::TProtocol> pipedProtocol_;
-  boost::shared_ptr<facebook::thrift::transport::TPipedTransportFactory> transportFactory_;
-  boost::shared_ptr<facebook::thrift::transport::TMemoryBuffer> memoryBuffer_;
-  boost::shared_ptr<facebook::thrift::transport::TTransport> targetTransport_;
+  boost::shared_ptr<apache::thrift::TProcessor> actualProcessor_;
+  boost::shared_ptr<apache::thrift::protocol::TProtocol> pipedProtocol_;
+  boost::shared_ptr<apache::thrift::transport::TPipedTransportFactory> transportFactory_;
+  boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> memoryBuffer_;
+  boost::shared_ptr<apache::thrift::transport::TTransport> targetTransport_;
 };
 
-}}} // facebook::thrift::processor
+}}} // apache::thrift::processor
 
 #endif
diff --git a/lib/cpp/src/processor/StatsProcessor.h b/lib/cpp/src/processor/StatsProcessor.h
index 140a1d4..2cccab1 100644
--- a/lib/cpp/src/processor/StatsProcessor.h
+++ b/lib/cpp/src/processor/StatsProcessor.h
@@ -12,14 +12,14 @@
 #include <protocol/TProtocol.h>
 #include <TProcessor.h>
 
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
 
 /*
  * Class for keeping track of function call statistics and printing them if desired
  *
  * @author James Wang <jwang@facebook.com>
  */
-class StatsProcessor : public facebook::thrift::TProcessor {
+class StatsProcessor : public apache::thrift::TProcessor {
 public:
   StatsProcessor(bool print, bool frequency)
     : print_(print),
@@ -27,20 +27,20 @@
   {}
   virtual ~StatsProcessor() {};
 
-  virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot) {
+  virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot) {
 
     piprot_ = piprot;
 
     std::string fname;
-    facebook::thrift::protocol::TMessageType mtype;
+    apache::thrift::protocol::TMessageType mtype;
     int32_t seqid;
 
     piprot_->readMessageBegin(fname, mtype, seqid);
-    if (mtype != facebook::thrift::protocol::T_CALL) {
+    if (mtype != apache::thrift::protocol::T_CALL) {
       if (print_) {
         printf("Unknown message type\n");
       }
-      throw facebook::thrift::TException("Unexpected message type");
+      throw apache::thrift::TException("Unexpected message type");
     }
     if (print_) {
       printf("%s (", fname.c_str());
@@ -53,12 +53,12 @@
       }
     }
 
-    facebook::thrift::protocol::TType ftype;
+    apache::thrift::protocol::TType ftype;
     int16_t fid;
 
     while (true) {
       piprot_->readFieldBegin(fname, ftype, fid);
-      if (ftype == facebook::thrift::protocol::T_STOP) {
+      if (ftype == apache::thrift::protocol::T_STOP) {
         break;
       }
 
@@ -79,9 +79,9 @@
   }
 
 protected:
-  void printAndPassToBuffer(facebook::thrift::protocol::TType ftype) {
+  void printAndPassToBuffer(apache::thrift::protocol::TType ftype) {
     switch (ftype) {
-      case facebook::thrift::protocol::T_BOOL:
+      case apache::thrift::protocol::T_BOOL:
         {
           bool boolv;
           piprot_->readBool(boolv);
@@ -90,7 +90,7 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_BYTE:
+      case apache::thrift::protocol::T_BYTE:
         {
           int8_t bytev;
           piprot_->readByte(bytev);
@@ -99,7 +99,7 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_I16:
+      case apache::thrift::protocol::T_I16:
         {
           int16_t i16;
           piprot_->readI16(i16);
@@ -108,7 +108,7 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_I32:
+      case apache::thrift::protocol::T_I32:
         {
           int32_t i32;
           piprot_->readI32(i32);
@@ -117,7 +117,7 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_I64:
+      case apache::thrift::protocol::T_I64:
         {
           int64_t i64;
           piprot_->readI64(i64);
@@ -126,7 +126,7 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_DOUBLE:
+      case apache::thrift::protocol::T_DOUBLE:
         {
           double dub;
           piprot_->readDouble(dub);
@@ -135,7 +135,7 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_STRING:
+      case apache::thrift::protocol::T_STRING:
         {
           std::string str;
           piprot_->readString(str);
@@ -144,18 +144,18 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_STRUCT:
+      case apache::thrift::protocol::T_STRUCT:
         {
           std::string name;
           int16_t fid;
-          facebook::thrift::protocol::TType ftype;
+          apache::thrift::protocol::TType ftype;
           piprot_->readStructBegin(name);
           if (print_) {
             printf("<");
           }
           while (true) {
             piprot_->readFieldBegin(name, ftype, fid);
-            if (ftype == facebook::thrift::protocol::T_STOP) {
+            if (ftype == apache::thrift::protocol::T_STOP) {
               break;
             }
             printAndPassToBuffer(ftype);
@@ -170,10 +170,10 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_MAP:
+      case apache::thrift::protocol::T_MAP:
         {
-          facebook::thrift::protocol::TType keyType;
-          facebook::thrift::protocol::TType valType;
+          apache::thrift::protocol::TType keyType;
+          apache::thrift::protocol::TType valType;
           uint32_t i, size;
           piprot_->readMapBegin(keyType, valType, size);
           if (print_) {
@@ -195,9 +195,9 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_SET:
+      case apache::thrift::protocol::T_SET:
         {
-          facebook::thrift::protocol::TType elemType;
+          apache::thrift::protocol::TType elemType;
           uint32_t i, size;
           piprot_->readSetBegin(elemType, size);
           if (print_) {
@@ -215,9 +215,9 @@
           }
         }
         break;
-      case facebook::thrift::protocol::T_LIST:
+      case apache::thrift::protocol::T_LIST:
         {
-          facebook::thrift::protocol::TType elemType;
+          apache::thrift::protocol::TType elemType;
           uint32_t i, size;
           piprot_->readListBegin(elemType, size);
           if (print_) {
@@ -240,13 +240,13 @@
     }
   }
 
-  boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot_;
+  boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot_;
   std::map<std::string, int64_t> frequency_map_;
 
   bool print_;
   bool frequency_;
 };
 
-}}} // facebook::thrift::processor
+}}} // apache::thrift::processor
 
 #endif
diff --git a/lib/cpp/src/protocol/TBase64Utils.cpp b/lib/cpp/src/protocol/TBase64Utils.cpp
index beb659f..b294eec 100644
--- a/lib/cpp/src/protocol/TBase64Utils.cpp
+++ b/lib/cpp/src/protocol/TBase64Utils.cpp
@@ -10,7 +10,7 @@
 
 using std::string;
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 
 static const uint8_t *kBase64EncodeTable = (const uint8_t *)
@@ -63,4 +63,4 @@
 }
 
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TBase64Utils.h b/lib/cpp/src/protocol/TBase64Utils.h
index ec3daf3..f81476d 100644
--- a/lib/cpp/src/protocol/TBase64Utils.h
+++ b/lib/cpp/src/protocol/TBase64Utils.h
@@ -9,7 +9,7 @@
 
 #include <string>
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 // in must be at least len bytes
 // len must be 1, 2, or 3
@@ -23,6 +23,6 @@
 // no '=' padding should be included in the input
 void base64_decode(uint8_t *buf, uint32_t len);
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 #endif // #define _THRIFT_PROTOCOL_TBASE64UTILS_H_
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.cpp b/lib/cpp/src/protocol/TBinaryProtocol.cpp
index 2962180..2da5c11 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.cpp
+++ b/lib/cpp/src/protocol/TBinaryProtocol.cpp
@@ -51,7 +51,7 @@
 }
 
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 uint32_t TBinaryProtocol::writeMessageBegin(const std::string& name,
                                             const TMessageType messageType,
@@ -419,4 +419,4 @@
   return (uint32_t)size;
 }
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/protocol/TBinaryProtocol.h
index a6a8983..b38b493 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.h
+++ b/lib/cpp/src/protocol/TBinaryProtocol.h
@@ -11,7 +11,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 /**
  * The default binary protocol for thrift. Writes all data in a very basic
@@ -237,6 +237,6 @@
 
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 #endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TDebugProtocol.cpp b/lib/cpp/src/protocol/TDebugProtocol.cpp
index 92e9d36..05291ef 100644
--- a/lib/cpp/src/protocol/TDebugProtocol.cpp
+++ b/lib/cpp/src/protocol/TDebugProtocol.cpp
@@ -25,7 +25,7 @@
 }
 
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 string TDebugProtocol::fieldTypeName(TType type) {
   switch (type) {
@@ -330,4 +330,4 @@
   return TDebugProtocol::writeString(str);
 }
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TDebugProtocol.h b/lib/cpp/src/protocol/TDebugProtocol.h
index dbad1e3..fa4b807 100644
--- a/lib/cpp/src/protocol/TDebugProtocol.h
+++ b/lib/cpp/src/protocol/TDebugProtocol.h
@@ -12,7 +12,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 /*
 
@@ -153,18 +153,18 @@
 
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 
 // TODO(dreiss): Move (part of) ThriftDebugString into a .cpp file and remove this.
 #include <transport/TBufferTransports.h>
 
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
 
 template<typename ThriftStruct>
 std::string ThriftDebugString(const ThriftStruct& ts) {
-  using namespace facebook::thrift::transport;
-  using namespace facebook::thrift::protocol;
+  using namespace apache::thrift::transport;
+  using namespace apache::thrift::protocol;
   TMemoryBuffer* buffer = new TMemoryBuffer;
   boost::shared_ptr<TTransport> trans(buffer);
   TDebugProtocol protocol(trans);
@@ -181,8 +181,8 @@
 #if 0
 template<typename Object>
 std::string DebugString(const std::vector<Object>& vec) {
-  using namespace facebook::thrift::transport;
-  using namespace facebook::thrift::protocol;
+  using namespace apache::thrift::transport;
+  using namespace apache::thrift::protocol;
   TMemoryBuffer* buffer = new TMemoryBuffer;
   boost::shared_ptr<TTransport> trans(buffer);
   TDebugProtocol protocol(trans);
@@ -205,7 +205,7 @@
 }
 #endif // 0
 
-}} // facebook::thrift
+}} // apache::thrift
 
 
 #endif // #ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TDenseProtocol.cpp b/lib/cpp/src/protocol/TDenseProtocol.cpp
index d1602a0..70059b3 100644
--- a/lib/cpp/src/protocol/TDenseProtocol.cpp
+++ b/lib/cpp/src/protocol/TDenseProtocol.cpp
@@ -104,10 +104,10 @@
 #define UNLIKELY(val) (val)
 #endif
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 const int TDenseProtocol::FP_PREFIX_LEN =
-  facebook::thrift::reflection::local::FP_PREFIX_LEN;
+  apache::thrift::reflection::local::FP_PREFIX_LEN;
 
 // Top TypeSpec.  TypeSpec of the structure being encoded.
 #define TTS  (ts_stack_.back())  // type = TypeSpec*
@@ -746,4 +746,4 @@
   return xfer + readStringBody(str, size);
 }
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TDenseProtocol.h b/lib/cpp/src/protocol/TDenseProtocol.h
index 5dd5a8c..4692132 100644
--- a/lib/cpp/src/protocol/TDenseProtocol.h
+++ b/lib/cpp/src/protocol/TDenseProtocol.h
@@ -9,7 +9,7 @@
 
 #include "TBinaryProtocol.h"
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 /**
  * !!!WARNING!!!
@@ -51,7 +51,7 @@
   static const int32_t VERSION_2 = 0x80020000;
 
  public:
-  typedef facebook::thrift::reflection::local::TypeSpec TypeSpec;
+  typedef apache::thrift::reflection::local::TypeSpec TypeSpec;
   static const int FP_PREFIX_LEN;
 
   /**
@@ -236,6 +236,6 @@
   bool standalone_;
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 #endif // #ifndef _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TJSONProtocol.cpp b/lib/cpp/src/protocol/TJSONProtocol.cpp
index ca3a51f..01fe471 100644
--- a/lib/cpp/src/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/protocol/TJSONProtocol.cpp
@@ -11,9 +11,9 @@
 #include "TBase64Utils.h"
 #include <transport/TTransportException.h>
 
-using namespace facebook::thrift::transport;
+using namespace apache::thrift::transport;
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 
 // Static data
@@ -874,7 +874,7 @@
   // Check if we hit the end of the list
   uint8_t ch = reader_.peek();
   if (ch == kJSONObjectEnd) {
-    fieldType = facebook::thrift::protocol::T_STOP;
+    fieldType = apache::thrift::protocol::T_STOP;
   }
   else {
     uint64_t tmpVal = 0;
@@ -982,4 +982,4 @@
   return readJSONBase64(str);
 }
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TJSONProtocol.h b/lib/cpp/src/protocol/TJSONProtocol.h
index cbf4ef8..4287adf 100644
--- a/lib/cpp/src/protocol/TJSONProtocol.h
+++ b/lib/cpp/src/protocol/TJSONProtocol.h
@@ -11,7 +11,7 @@
 
 #include <stack>
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 // Forward declaration
 class TJSONContext;
@@ -299,18 +299,18 @@
   }
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 
 // TODO(dreiss): Move part of ThriftJSONString into a .cpp file and remove this.
 #include <transport/TBufferTransports.h>
 
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
 
 template<typename ThriftStruct>
   std::string ThriftJSONString(const ThriftStruct& ts) {
-  using namespace facebook::thrift::transport;
-  using namespace facebook::thrift::protocol;
+  using namespace apache::thrift::transport;
+  using namespace apache::thrift::protocol;
   TMemoryBuffer* buffer = new TMemoryBuffer;
   boost::shared_ptr<TTransport> trans(buffer);
   TJSONProtocol protocol(trans);
@@ -323,6 +323,6 @@
   return std::string((char*)buf, (unsigned int)size);
 }
 
-}} // facebook::thrift
+}} // apache::thrift
 
 #endif // #define _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ 1
diff --git a/lib/cpp/src/protocol/TOneWayProtocol.h b/lib/cpp/src/protocol/TOneWayProtocol.h
index dda113f..ad5f8fa 100644
--- a/lib/cpp/src/protocol/TOneWayProtocol.h
+++ b/lib/cpp/src/protocol/TOneWayProtocol.h
@@ -9,7 +9,7 @@
 
 #include "TProtocol.h"
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 /**
  * Abstract class for implementing a protocol that can only be written,
@@ -288,6 +288,6 @@
   std::string subclass_;
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 #endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TProtocol.h b/lib/cpp/src/protocol/TProtocol.h
index 1e9ce99..e4cfe0f 100644
--- a/lib/cpp/src/protocol/TProtocol.h
+++ b/lib/cpp/src/protocol/TProtocol.h
@@ -17,9 +17,9 @@
 #include <string>
 #include <map>
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
-using facebook::thrift::transport::TTransport;
+using apache::thrift::transport::TTransport;
 
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
@@ -352,6 +352,6 @@
   virtual boost::shared_ptr<TProtocol> getProtocol(boost::shared_ptr<TTransport> trans) = 0;
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 #endif // #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1
diff --git a/lib/cpp/src/protocol/TProtocolException.h b/lib/cpp/src/protocol/TProtocolException.h
index b3146d5..be0767b 100644
--- a/lib/cpp/src/protocol/TProtocolException.h
+++ b/lib/cpp/src/protocol/TProtocolException.h
@@ -9,7 +9,7 @@
 
 #include <string>
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
 /**
  * Class to encapsulate all the possible types of protocol errors that may
@@ -20,7 +20,7 @@
  *
  * @author Mark Slee <mcslee@facebook.com>
  */
-class TProtocolException : public facebook::thrift::TException {
+class TProtocolException : public apache::thrift::TException {
  public:
 
   /**
@@ -36,19 +36,19 @@
   };
 
   TProtocolException() :
-    facebook::thrift::TException(),
+    apache::thrift::TException(),
     type_(UNKNOWN) {}
 
   TProtocolException(TProtocolExceptionType type) :
-    facebook::thrift::TException(),
+    apache::thrift::TException(),
     type_(type) {}
 
   TProtocolException(const std::string& message) :
-    facebook::thrift::TException(message),
+    apache::thrift::TException(message),
     type_(UNKNOWN) {}
 
   TProtocolException(TProtocolExceptionType type, const std::string& message) :
-    facebook::thrift::TException(message),
+    apache::thrift::TException(message),
     type_(type) {}
 
   virtual ~TProtocolException() throw() {}
@@ -87,6 +87,6 @@
 
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 #endif // #ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_
diff --git a/lib/cpp/src/protocol/TProtocolTap.h b/lib/cpp/src/protocol/TProtocolTap.h
index 162f783..07f000d 100644
--- a/lib/cpp/src/protocol/TProtocolTap.h
+++ b/lib/cpp/src/protocol/TProtocolTap.h
@@ -9,9 +9,9 @@
 
 #include <protocol/TOneWayProtocol.h>
 
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
 
-using facebook::thrift::transport::TTransport;
+using apache::thrift::transport::TTransport;
 
 /**
  * Puts a wiretap on a protocol object.  Any reads to this class are passed
@@ -170,6 +170,6 @@
   boost::shared_ptr<TProtocol> sink_;
 };
 
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
 
 #endif // #define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1
diff --git a/lib/cpp/src/reflection_limited_types.cpp b/lib/cpp/src/reflection_limited_types.cpp
index 2f53e9e..8bd4248 100644
--- a/lib/cpp/src/reflection_limited_types.cpp
+++ b/lib/cpp/src/reflection_limited_types.cpp
@@ -5,33 +5,33 @@
  */
 #include "reflection_limited_types.h"
 
-namespace facebook { namespace thrift { namespace reflection { namespace limited {
+namespace apache { namespace thrift { namespace reflection { namespace limited {
 
 const char* SimpleType::ascii_fingerprint = "19B5240589E680301A7E32DF3971EFBE";
 const uint8_t SimpleType::binary_fingerprint[16] = {0x19,0xB5,0x24,0x05,0x89,0xE6,0x80,0x30,0x1A,0x7E,0x32,0xDF,0x39,0x71,0xEF,0xBE};
 
-uint32_t SimpleType::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t SimpleType::read(apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
-  facebook::thrift::protocol::TType ftype;
+  apache::thrift::protocol::TType ftype;
   int16_t fid;
 
   xfer += iprot->readStructBegin(fname);
 
-  using facebook::thrift::protocol::TProtocolException;
+  using apache::thrift::protocol::TProtocolException;
 
 
   while (true)
   {
     xfer += iprot->readFieldBegin(fname, ftype, fid);
-    if (ftype == facebook::thrift::protocol::T_STOP) {
+    if (ftype == apache::thrift::protocol::T_STOP) {
       break;
     }
     switch (fid)
     {
       case 1:
-        if (ftype == facebook::thrift::protocol::T_I32) {
+        if (ftype == apache::thrift::protocol::T_I32) {
           int32_t ecast0;
           xfer += iprot->readI32(ecast0);
           this->ttype = (TTypeTag)ecast0;
@@ -41,7 +41,7 @@
         }
         break;
       case 2:
-        if (ftype == facebook::thrift::protocol::T_STRING) {
+        if (ftype == apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->name);
           this->__isset.name = true;
         } else {
@@ -60,13 +60,13 @@
   return xfer;
 }
 
-uint32_t SimpleType::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t SimpleType::write(apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("SimpleType");
-  xfer += oprot->writeFieldBegin("ttype", facebook::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeFieldBegin("ttype", apache::thrift::protocol::T_I32, 1);
   xfer += oprot->writeI32((int32_t)this->ttype);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->name);
   xfer += oprot->writeFieldEnd();
   xfer += oprot->writeFieldStop();
@@ -77,28 +77,28 @@
 const char* ContainerType::ascii_fingerprint = "654FA6EFFF8242F4C2A604B970686634";
 const uint8_t ContainerType::binary_fingerprint[16] = {0x65,0x4F,0xA6,0xEF,0xFF,0x82,0x42,0xF4,0xC2,0xA6,0x04,0xB9,0x70,0x68,0x66,0x34};
 
-uint32_t ContainerType::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t ContainerType::read(apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
-  facebook::thrift::protocol::TType ftype;
+  apache::thrift::protocol::TType ftype;
   int16_t fid;
 
   xfer += iprot->readStructBegin(fname);
 
-  using facebook::thrift::protocol::TProtocolException;
+  using apache::thrift::protocol::TProtocolException;
 
 
   while (true)
   {
     xfer += iprot->readFieldBegin(fname, ftype, fid);
-    if (ftype == facebook::thrift::protocol::T_STOP) {
+    if (ftype == apache::thrift::protocol::T_STOP) {
       break;
     }
     switch (fid)
     {
       case 1:
-        if (ftype == facebook::thrift::protocol::T_I32) {
+        if (ftype == apache::thrift::protocol::T_I32) {
           int32_t ecast1;
           xfer += iprot->readI32(ecast1);
           this->ttype = (TTypeTag)ecast1;
@@ -108,7 +108,7 @@
         }
         break;
       case 2:
-        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+        if (ftype == apache::thrift::protocol::T_STRUCT) {
           xfer += this->subtype1.read(iprot);
           this->__isset.subtype1 = true;
         } else {
@@ -116,7 +116,7 @@
         }
         break;
       case 3:
-        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+        if (ftype == apache::thrift::protocol::T_STRUCT) {
           xfer += this->subtype2.read(iprot);
           this->__isset.subtype2 = true;
         } else {
@@ -135,17 +135,17 @@
   return xfer;
 }
 
-uint32_t ContainerType::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t ContainerType::write(apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("ContainerType");
-  xfer += oprot->writeFieldBegin("ttype", facebook::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeFieldBegin("ttype", apache::thrift::protocol::T_I32, 1);
   xfer += oprot->writeI32((int32_t)this->ttype);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("subtype1", facebook::thrift::protocol::T_STRUCT, 2);
+  xfer += oprot->writeFieldBegin("subtype1", apache::thrift::protocol::T_STRUCT, 2);
   xfer += this->subtype1.write(oprot);
   xfer += oprot->writeFieldEnd();
   if (this->__isset.subtype2) {
-    xfer += oprot->writeFieldBegin("subtype2", facebook::thrift::protocol::T_STRUCT, 3);
+    xfer += oprot->writeFieldBegin("subtype2", apache::thrift::protocol::T_STRUCT, 3);
     xfer += this->subtype2.write(oprot);
     xfer += oprot->writeFieldEnd();
   }
@@ -157,28 +157,28 @@
 const char* ThriftType::ascii_fingerprint = "76BC1CC759001D7D85FEE75C4F183062";
 const uint8_t ThriftType::binary_fingerprint[16] = {0x76,0xBC,0x1C,0xC7,0x59,0x00,0x1D,0x7D,0x85,0xFE,0xE7,0x5C,0x4F,0x18,0x30,0x62};
 
-uint32_t ThriftType::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t ThriftType::read(apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
-  facebook::thrift::protocol::TType ftype;
+  apache::thrift::protocol::TType ftype;
   int16_t fid;
 
   xfer += iprot->readStructBegin(fname);
 
-  using facebook::thrift::protocol::TProtocolException;
+  using apache::thrift::protocol::TProtocolException;
 
 
   while (true)
   {
     xfer += iprot->readFieldBegin(fname, ftype, fid);
-    if (ftype == facebook::thrift::protocol::T_STOP) {
+    if (ftype == apache::thrift::protocol::T_STOP) {
       break;
     }
     switch (fid)
     {
       case 1:
-        if (ftype == facebook::thrift::protocol::T_BOOL) {
+        if (ftype == apache::thrift::protocol::T_BOOL) {
           xfer += iprot->readBool(this->is_container);
           this->__isset.is_container = true;
         } else {
@@ -186,7 +186,7 @@
         }
         break;
       case 2:
-        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+        if (ftype == apache::thrift::protocol::T_STRUCT) {
           xfer += this->simple_type.read(iprot);
           this->__isset.simple_type = true;
         } else {
@@ -194,7 +194,7 @@
         }
         break;
       case 3:
-        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+        if (ftype == apache::thrift::protocol::T_STRUCT) {
           xfer += this->container_type.read(iprot);
           this->__isset.container_type = true;
         } else {
@@ -213,19 +213,19 @@
   return xfer;
 }
 
-uint32_t ThriftType::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t ThriftType::write(apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("ThriftType");
-  xfer += oprot->writeFieldBegin("is_container", facebook::thrift::protocol::T_BOOL, 1);
+  xfer += oprot->writeFieldBegin("is_container", apache::thrift::protocol::T_BOOL, 1);
   xfer += oprot->writeBool(this->is_container);
   xfer += oprot->writeFieldEnd();
   if (this->__isset.simple_type) {
-    xfer += oprot->writeFieldBegin("simple_type", facebook::thrift::protocol::T_STRUCT, 2);
+    xfer += oprot->writeFieldBegin("simple_type", apache::thrift::protocol::T_STRUCT, 2);
     xfer += this->simple_type.write(oprot);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.container_type) {
-    xfer += oprot->writeFieldBegin("container_type", facebook::thrift::protocol::T_STRUCT, 3);
+    xfer += oprot->writeFieldBegin("container_type", apache::thrift::protocol::T_STRUCT, 3);
     xfer += this->container_type.write(oprot);
     xfer += oprot->writeFieldEnd();
   }
@@ -237,28 +237,28 @@
 const char* Argument::ascii_fingerprint = "8C45506BE0EFBB22FB19FA40DDCECB3F";
 const uint8_t Argument::binary_fingerprint[16] = {0x8C,0x45,0x50,0x6B,0xE0,0xEF,0xBB,0x22,0xFB,0x19,0xFA,0x40,0xDD,0xCE,0xCB,0x3F};
 
-uint32_t Argument::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t Argument::read(apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
-  facebook::thrift::protocol::TType ftype;
+  apache::thrift::protocol::TType ftype;
   int16_t fid;
 
   xfer += iprot->readStructBegin(fname);
 
-  using facebook::thrift::protocol::TProtocolException;
+  using apache::thrift::protocol::TProtocolException;
 
 
   while (true)
   {
     xfer += iprot->readFieldBegin(fname, ftype, fid);
-    if (ftype == facebook::thrift::protocol::T_STOP) {
+    if (ftype == apache::thrift::protocol::T_STOP) {
       break;
     }
     switch (fid)
     {
       case 1:
-        if (ftype == facebook::thrift::protocol::T_I16) {
+        if (ftype == apache::thrift::protocol::T_I16) {
           xfer += iprot->readI16(this->key);
           this->__isset.key = true;
         } else {
@@ -266,7 +266,7 @@
         }
         break;
       case 2:
-        if (ftype == facebook::thrift::protocol::T_STRING) {
+        if (ftype == apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->name);
           this->__isset.name = true;
         } else {
@@ -274,7 +274,7 @@
         }
         break;
       case 3:
-        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+        if (ftype == apache::thrift::protocol::T_STRUCT) {
           xfer += this->type.read(iprot);
           this->__isset.type = true;
         } else {
@@ -293,16 +293,16 @@
   return xfer;
 }
 
-uint32_t Argument::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t Argument::write(apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Argument");
-  xfer += oprot->writeFieldBegin("key", facebook::thrift::protocol::T_I16, 1);
+  xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_I16, 1);
   xfer += oprot->writeI16(this->key);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 2);
   xfer += oprot->writeString(this->name);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("type", facebook::thrift::protocol::T_STRUCT, 3);
+  xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_STRUCT, 3);
   xfer += this->type.write(oprot);
   xfer += oprot->writeFieldEnd();
   xfer += oprot->writeFieldStop();
@@ -313,28 +313,28 @@
 const char* Method::ascii_fingerprint = "E6573428C492D24C84A19432D39A17B0";
 const uint8_t Method::binary_fingerprint[16] = {0xE6,0x57,0x34,0x28,0xC4,0x92,0xD2,0x4C,0x84,0xA1,0x94,0x32,0xD3,0x9A,0x17,0xB0};
 
-uint32_t Method::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t Method::read(apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
-  facebook::thrift::protocol::TType ftype;
+  apache::thrift::protocol::TType ftype;
   int16_t fid;
 
   xfer += iprot->readStructBegin(fname);
 
-  using facebook::thrift::protocol::TProtocolException;
+  using apache::thrift::protocol::TProtocolException;
 
 
   while (true)
   {
     xfer += iprot->readFieldBegin(fname, ftype, fid);
-    if (ftype == facebook::thrift::protocol::T_STOP) {
+    if (ftype == apache::thrift::protocol::T_STOP) {
       break;
     }
     switch (fid)
     {
       case 1:
-        if (ftype == facebook::thrift::protocol::T_STRING) {
+        if (ftype == apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->name);
           this->__isset.name = true;
         } else {
@@ -342,7 +342,7 @@
         }
         break;
       case 2:
-        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+        if (ftype == apache::thrift::protocol::T_STRUCT) {
           xfer += this->return_type.read(iprot);
           this->__isset.return_type = true;
         } else {
@@ -350,11 +350,11 @@
         }
         break;
       case 3:
-        if (ftype == facebook::thrift::protocol::T_LIST) {
+        if (ftype == apache::thrift::protocol::T_LIST) {
           {
             this->arguments.clear();
             uint32_t _size2;
-            facebook::thrift::protocol::TType _etype5;
+            apache::thrift::protocol::TType _etype5;
             iprot->readListBegin(_etype5, _size2);
             this->arguments.resize(_size2);
             uint32_t _i6;
@@ -381,18 +381,18 @@
   return xfer;
 }
 
-uint32_t Method::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t Method::write(apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Method");
-  xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->name);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("return_type", facebook::thrift::protocol::T_STRUCT, 2);
+  xfer += oprot->writeFieldBegin("return_type", apache::thrift::protocol::T_STRUCT, 2);
   xfer += this->return_type.write(oprot);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("arguments", facebook::thrift::protocol::T_LIST, 3);
+  xfer += oprot->writeFieldBegin("arguments", apache::thrift::protocol::T_LIST, 3);
   {
-    xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRUCT, this->arguments.size());
+    xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->arguments.size());
     std::vector<Argument> ::const_iterator _iter7;
     for (_iter7 = this->arguments.begin(); _iter7 != this->arguments.end(); ++_iter7)
     {
@@ -409,28 +409,28 @@
 const char* Service::ascii_fingerprint = "4673B0777B701D9B02A7A74CEC7908A7";
 const uint8_t Service::binary_fingerprint[16] = {0x46,0x73,0xB0,0x77,0x7B,0x70,0x1D,0x9B,0x02,0xA7,0xA7,0x4C,0xEC,0x79,0x08,0xA7};
 
-uint32_t Service::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t Service::read(apache::thrift::protocol::TProtocol* iprot) {
 
   uint32_t xfer = 0;
   std::string fname;
-  facebook::thrift::protocol::TType ftype;
+  apache::thrift::protocol::TType ftype;
   int16_t fid;
 
   xfer += iprot->readStructBegin(fname);
 
-  using facebook::thrift::protocol::TProtocolException;
+  using apache::thrift::protocol::TProtocolException;
 
 
   while (true)
   {
     xfer += iprot->readFieldBegin(fname, ftype, fid);
-    if (ftype == facebook::thrift::protocol::T_STOP) {
+    if (ftype == apache::thrift::protocol::T_STOP) {
       break;
     }
     switch (fid)
     {
       case 1:
-        if (ftype == facebook::thrift::protocol::T_STRING) {
+        if (ftype == apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->name);
           this->__isset.name = true;
         } else {
@@ -438,11 +438,11 @@
         }
         break;
       case 2:
-        if (ftype == facebook::thrift::protocol::T_LIST) {
+        if (ftype == apache::thrift::protocol::T_LIST) {
           {
             this->methods.clear();
             uint32_t _size8;
-            facebook::thrift::protocol::TType _etype11;
+            apache::thrift::protocol::TType _etype11;
             iprot->readListBegin(_etype11, _size8);
             this->methods.resize(_size8);
             uint32_t _i12;
@@ -458,7 +458,7 @@
         }
         break;
       case 3:
-        if (ftype == facebook::thrift::protocol::T_BOOL) {
+        if (ftype == apache::thrift::protocol::T_BOOL) {
           xfer += iprot->readBool(this->fully_reflected);
           this->__isset.fully_reflected = true;
         } else {
@@ -477,15 +477,15 @@
   return xfer;
 }
 
-uint32_t Service::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t Service::write(apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Service");
-  xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
   xfer += oprot->writeString(this->name);
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("methods", facebook::thrift::protocol::T_LIST, 2);
+  xfer += oprot->writeFieldBegin("methods", apache::thrift::protocol::T_LIST, 2);
   {
-    xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRUCT, this->methods.size());
+    xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->methods.size());
     std::vector<Method> ::const_iterator _iter13;
     for (_iter13 = this->methods.begin(); _iter13 != this->methods.end(); ++_iter13)
     {
@@ -494,7 +494,7 @@
     xfer += oprot->writeListEnd();
   }
   xfer += oprot->writeFieldEnd();
-  xfer += oprot->writeFieldBegin("fully_reflected", facebook::thrift::protocol::T_BOOL, 3);
+  xfer += oprot->writeFieldBegin("fully_reflected", apache::thrift::protocol::T_BOOL, 3);
   xfer += oprot->writeBool(this->fully_reflected);
   xfer += oprot->writeFieldEnd();
   xfer += oprot->writeFieldStop();
diff --git a/lib/cpp/src/reflection_limited_types.h b/lib/cpp/src/reflection_limited_types.h
index 23bf83b..570397a 100644
--- a/lib/cpp/src/reflection_limited_types.h
+++ b/lib/cpp/src/reflection_limited_types.h
@@ -13,7 +13,7 @@
 
 
 
-namespace facebook { namespace thrift { namespace reflection { namespace limited {
+namespace apache { namespace thrift { namespace reflection { namespace limited {
 
 enum TTypeTag {
   T_VOID = 1,
@@ -66,8 +66,8 @@
 
   bool operator < (const SimpleType & ) const;
 
-  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
-  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+  uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
 
 };
 
@@ -111,8 +111,8 @@
 
   bool operator < (const ContainerType & ) const;
 
-  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
-  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+  uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
 
 };
 
@@ -158,8 +158,8 @@
 
   bool operator < (const ThriftType & ) const;
 
-  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
-  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+  uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
 
 };
 
@@ -201,8 +201,8 @@
 
   bool operator < (const Argument & ) const;
 
-  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
-  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+  uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
 
 };
 
@@ -244,8 +244,8 @@
 
   bool operator < (const Method & ) const;
 
-  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
-  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+  uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
 
 };
 
@@ -287,8 +287,8 @@
 
   bool operator < (const Service & ) const;
 
-  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
-  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+  uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
 
 };
 
diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index 06f11aa..8644526 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -16,11 +16,11 @@
 #include <errno.h>
 #include <assert.h>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::concurrency;
 using namespace std;
 
 class TConnection::Task: public Runnable {
@@ -685,4 +685,4 @@
   event_base_loop(eventBase_, 0);
 }
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/server/TNonblockingServer.h
index a2d6533..cf024ed 100644
--- a/lib/cpp/src/server/TNonblockingServer.h
+++ b/lib/cpp/src/server/TNonblockingServer.h
@@ -17,12 +17,12 @@
 #include <cstdlib>
 #include <event.h>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
-using facebook::thrift::transport::TMemoryBuffer;
-using facebook::thrift::protocol::TProtocol;
-using facebook::thrift::concurrency::Runnable;
-using facebook::thrift::concurrency::ThreadManager;
+using apache::thrift::transport::TMemoryBuffer;
+using apache::thrift::protocol::TProtocol;
+using apache::thrift::concurrency::Runnable;
+using apache::thrift::concurrency::ThreadManager;
 
 // Forward declaration of class
 class TConnection;
@@ -300,7 +300,7 @@
   TConnection(int socket, short eventFlags, TNonblockingServer *s) {
     readBuffer_ = (uint8_t*)std::malloc(1024);
     if (readBuffer_ == NULL) {
-      throw new facebook::thrift::TException("Out of memory.");
+      throw new apache::thrift::TException("Out of memory.");
     }
     readBufferSize_ = 1024;
 
@@ -341,6 +341,6 @@
 
 };
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
 
 #endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_
diff --git a/lib/cpp/src/server/TServer.cpp b/lib/cpp/src/server/TServer.cpp
index 6febf98..a21fab6 100644
--- a/lib/cpp/src/server/TServer.cpp
+++ b/lib/cpp/src/server/TServer.cpp
@@ -8,7 +8,7 @@
 #include <sys/resource.h>
 #include <unistd.h>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
 int increase_max_fds(int max_fds=(1<<24))  {
   struct rlimit fdmaxrl;
@@ -22,4 +22,4 @@
   return  fdmaxrl.rlim_cur;
 }
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TServer.h b/lib/cpp/src/server/TServer.h
index f05b2eb..c30b561 100644
--- a/lib/cpp/src/server/TServer.h
+++ b/lib/cpp/src/server/TServer.h
@@ -14,15 +14,15 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
-using facebook::thrift::TProcessor;
-using facebook::thrift::protocol::TBinaryProtocolFactory;
-using facebook::thrift::protocol::TProtocol;
-using facebook::thrift::protocol::TProtocolFactory;
-using facebook::thrift::transport::TServerTransport;
-using facebook::thrift::transport::TTransport;
-using facebook::thrift::transport::TTransportFactory;
+using apache::thrift::TProcessor;
+using apache::thrift::protocol::TBinaryProtocolFactory;
+using apache::thrift::protocol::TProtocol;
+using apache::thrift::protocol::TProtocolFactory;
+using apache::thrift::transport::TServerTransport;
+using apache::thrift::transport::TTransport;
+using apache::thrift::transport::TTransportFactory;
 
 /**
  * Virtual interface class that can handle events from the server core. To
@@ -196,6 +196,6 @@
  int increase_max_fds(int max_fds=(1<<24));
 
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
 
 #endif // #ifndef _THRIFT_SERVER_TSERVER_H_
diff --git a/lib/cpp/src/server/TSimpleServer.cpp b/lib/cpp/src/server/TSimpleServer.cpp
index f3011a2..08309b2 100644
--- a/lib/cpp/src/server/TSimpleServer.cpp
+++ b/lib/cpp/src/server/TSimpleServer.cpp
@@ -9,12 +9,12 @@
 #include <string>
 #include <iostream>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
 using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
 using boost::shared_ptr;
 
 /**
@@ -103,4 +103,4 @@
   }
 }
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TSimpleServer.h b/lib/cpp/src/server/TSimpleServer.h
index 1ab6f07..8bed8c2 100644
--- a/lib/cpp/src/server/TSimpleServer.h
+++ b/lib/cpp/src/server/TSimpleServer.h
@@ -10,7 +10,7 @@
 #include "server/TServer.h"
 #include "transport/TServerTransport.h"
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
 /**
  * This is the most basic simple server. It is single-threaded and runs a
@@ -53,6 +53,6 @@
 
 };
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
 
 #endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_
diff --git a/lib/cpp/src/server/TThreadPoolServer.cpp b/lib/cpp/src/server/TThreadPoolServer.cpp
index 55a73d3..4924044 100644
--- a/lib/cpp/src/server/TThreadPoolServer.cpp
+++ b/lib/cpp/src/server/TThreadPoolServer.cpp
@@ -11,14 +11,14 @@
 #include <string>
 #include <iostream>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
 using boost::shared_ptr;
 using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::concurrency;
-using namespace facebook::thrift::protocol;;
-using namespace facebook::thrift::transport;
+using namespace apache::thrift;
+using namespace apache::thrift::concurrency;
+using namespace apache::thrift::protocol;;
+using namespace apache::thrift::transport;
 
 class TThreadPoolServer::Task : public Runnable {
 
@@ -201,4 +201,4 @@
   timeout_ = value;
 }
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TThreadPoolServer.h b/lib/cpp/src/server/TThreadPoolServer.h
index f27e8f7..0cd3a4a 100644
--- a/lib/cpp/src/server/TThreadPoolServer.h
+++ b/lib/cpp/src/server/TThreadPoolServer.h
@@ -13,12 +13,12 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
-using facebook::thrift::concurrency::ThreadManager;
-using facebook::thrift::protocol::TProtocolFactory;
-using facebook::thrift::transport::TServerTransport;
-using facebook::thrift::transport::TTransportFactory;
+using apache::thrift::concurrency::ThreadManager;
+using apache::thrift::protocol::TProtocolFactory;
+using apache::thrift::transport::TServerTransport;
+using apache::thrift::transport::TTransportFactory;
 
 class TThreadPoolServer : public TServer {
  public:
@@ -61,6 +61,6 @@
 
 };
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
 
 #endif // #ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_
diff --git a/lib/cpp/src/server/TThreadedServer.cpp b/lib/cpp/src/server/TThreadedServer.cpp
index a08fd54..4840b7f 100644
--- a/lib/cpp/src/server/TThreadedServer.cpp
+++ b/lib/cpp/src/server/TThreadedServer.cpp
@@ -13,14 +13,14 @@
 #include <pthread.h>
 #include <unistd.h>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
 using boost::shared_ptr;
 using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::concurrency;
 
 class TThreadedServer::Task: public Runnable {
 
@@ -217,4 +217,4 @@
 
 }
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TThreadedServer.h b/lib/cpp/src/server/TThreadedServer.h
index 28d3549..8294f69 100644
--- a/lib/cpp/src/server/TThreadedServer.h
+++ b/lib/cpp/src/server/TThreadedServer.h
@@ -14,13 +14,13 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
 
-using facebook::thrift::TProcessor;
-using facebook::thrift::transport::TServerTransport;
-using facebook::thrift::transport::TTransportFactory;
-using facebook::thrift::concurrency::Monitor;
-using facebook::thrift::concurrency::ThreadFactory;
+using apache::thrift::TProcessor;
+using apache::thrift::transport::TServerTransport;
+using apache::thrift::transport::TTransportFactory;
+using apache::thrift::concurrency::Monitor;
+using apache::thrift::concurrency::ThreadFactory;
 
 class TThreadedServer : public TServer {
 
@@ -50,6 +50,6 @@
 
 };
 
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
 
 #endif // #ifndef _THRIFT_SERVER_TTHREADEDSERVER_H_
diff --git a/lib/cpp/src/transport/TBufferTransports.cpp b/lib/cpp/src/transport/TBufferTransports.cpp
index 1583014..8829b48 100644
--- a/lib/cpp/src/transport/TBufferTransports.cpp
+++ b/lib/cpp/src/transport/TBufferTransports.cpp
@@ -11,7 +11,7 @@
 
 using std::string;
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 
 uint32_t TBufferedTransport::readSlow(uint8_t* buf, uint32_t len) {
@@ -354,4 +354,4 @@
   return NULL;
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TBufferTransports.h b/lib/cpp/src/transport/TBufferTransports.h
index 334ad51..f0298df 100644
--- a/lib/cpp/src/transport/TBufferTransports.h
+++ b/lib/cpp/src/transport/TBufferTransports.h
@@ -20,7 +20,7 @@
 #define TDB_UNLIKELY(val) (val)
 #endif
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 
 /**
@@ -660,6 +660,6 @@
   // you add new members.
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_
diff --git a/lib/cpp/src/transport/TFDTransport.cpp b/lib/cpp/src/transport/TFDTransport.cpp
index bbdcb19..dbc7e4e 100644
--- a/lib/cpp/src/transport/TFDTransport.cpp
+++ b/lib/cpp/src/transport/TFDTransport.cpp
@@ -13,7 +13,7 @@
 
 using namespace std;
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 void TFDTransport::close() {
   if (!isOpen()) {
@@ -61,4 +61,4 @@
   }
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TFDTransport.h b/lib/cpp/src/transport/TFDTransport.h
index 7cb6140..56408ca 100644
--- a/lib/cpp/src/transport/TFDTransport.h
+++ b/lib/cpp/src/transport/TFDTransport.h
@@ -13,7 +13,7 @@
 #include "TTransport.h"
 #include "TServerSocket.h"
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 /**
  * Dead-simple wrapper around a file descriptor.
@@ -56,6 +56,6 @@
   ClosePolicy close_policy_;
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TFDTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp
index 121b4df..3bc2b91 100644
--- a/lib/cpp/src/transport/TFileTransport.cpp
+++ b/lib/cpp/src/transport/TFileTransport.cpp
@@ -28,11 +28,11 @@
 #include <iostream>
 #include <sys/stat.h>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 using boost::shared_ptr;
 using namespace std;
-using namespace facebook::thrift::protocol;
+using namespace apache::thrift::protocol;
 
 #ifndef HAVE_CLOCK_GETTIME
 
@@ -938,4 +938,4 @@
   }
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TFileTransport.h b/lib/cpp/src/transport/TFileTransport.h
index c4c921e..66f17d3 100644
--- a/lib/cpp/src/transport/TFileTransport.h
+++ b/lib/cpp/src/transport/TFileTransport.h
@@ -16,10 +16,10 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
-using facebook::thrift::TProcessor;
-using facebook::thrift::protocol::TProtocolFactory;
+using apache::thrift::TProcessor;
+using apache::thrift::protocol::TProtocolFactory;
 
 // Data pertaining to a single event
 typedef struct eventInfo {
@@ -424,6 +424,6 @@
 };
 
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // _THRIFT_TRANSPORT_TFILETRANSPORT_H_
diff --git a/lib/cpp/src/transport/THttpClient.cpp b/lib/cpp/src/transport/THttpClient.cpp
index 8c82d7f..fffb4bd 100644
--- a/lib/cpp/src/transport/THttpClient.cpp
+++ b/lib/cpp/src/transport/THttpClient.cpp
@@ -10,7 +10,7 @@
 #include "THttpClient.h"
 #include "TSocket.h"
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 using namespace std;
 
@@ -333,4 +333,4 @@
   readHeaders_ = true;
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/THttpClient.h b/lib/cpp/src/transport/THttpClient.h
index dbffe99..b0fa28e 100644
--- a/lib/cpp/src/transport/THttpClient.h
+++ b/lib/cpp/src/transport/THttpClient.h
@@ -9,7 +9,7 @@
 
 #include <transport/TBufferTransports.h>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 /**
  * HTTP client implementation of the thrift transport. This was irritating
@@ -94,6 +94,6 @@
 
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_
diff --git a/lib/cpp/src/transport/TServerSocket.cpp b/lib/cpp/src/transport/TServerSocket.cpp
index 3493fc0..69f5217 100644
--- a/lib/cpp/src/transport/TServerSocket.cpp
+++ b/lib/cpp/src/transport/TServerSocket.cpp
@@ -18,7 +18,7 @@
 #include "TServerSocket.h"
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 using namespace std;
 using boost::shared_ptr;
@@ -350,4 +350,4 @@
   intSock2_ = -1;
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TServerSocket.h b/lib/cpp/src/transport/TServerSocket.h
index b6bafa0..b406b78 100644
--- a/lib/cpp/src/transport/TServerSocket.h
+++ b/lib/cpp/src/transport/TServerSocket.h
@@ -10,7 +10,7 @@
 #include "TServerTransport.h"
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 class TSocket;
 
@@ -59,6 +59,6 @@
   int intSock2_;
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TSERVERSOCKET_H_
diff --git a/lib/cpp/src/transport/TServerTransport.h b/lib/cpp/src/transport/TServerTransport.h
index b8e6b97..612a94c 100644
--- a/lib/cpp/src/transport/TServerTransport.h
+++ b/lib/cpp/src/transport/TServerTransport.h
@@ -11,7 +11,7 @@
 #include "TTransportException.h"
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 /**
  * Server transport framework. A server needs to have some facility for
@@ -75,6 +75,6 @@
 
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TShortReadTransport.h b/lib/cpp/src/transport/TShortReadTransport.h
index 428fa9e..8b9b192 100644
--- a/lib/cpp/src/transport/TShortReadTransport.h
+++ b/lib/cpp/src/transport/TShortReadTransport.h
@@ -11,7 +11,7 @@
 
 #include <transport/TTransport.h>
 
-namespace facebook { namespace thrift { namespace transport { namespace test {
+namespace apache { namespace thrift { namespace transport { namespace test {
 
 /**
  * This class is only meant for testing.  It wraps another transport.
@@ -79,6 +79,6 @@
   double fullProb_;
 };
 
-}}}} // facebook::thrift::transport::test
+}}}} // apache::thrift::transport::test
 
 #endif // #ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TSocket.cpp b/lib/cpp/src/transport/TSocket.cpp
index 46cd2b4..04cd81e 100644
--- a/lib/cpp/src/transport/TSocket.cpp
+++ b/lib/cpp/src/transport/TSocket.cpp
@@ -22,7 +22,7 @@
 #include "TSocket.h"
 #include "TTransportException.h"
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 using namespace std;
 
@@ -556,4 +556,4 @@
   return peerPort_;
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TSocket.h b/lib/cpp/src/transport/TSocket.h
index 8d4a5a7..27baa99 100644
--- a/lib/cpp/src/transport/TSocket.h
+++ b/lib/cpp/src/transport/TSocket.h
@@ -13,7 +13,7 @@
 #include "TTransport.h"
 #include "TServerSocket.h"
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 /**
  * TCP Socket implementation of the TTransport interface.
@@ -225,7 +225,7 @@
   struct timeval recvTimeval_;
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TSOCKET_H_
 
diff --git a/lib/cpp/src/transport/TSocketPool.cpp b/lib/cpp/src/transport/TSocketPool.cpp
index d5a6501..549569f 100644
--- a/lib/cpp/src/transport/TSocketPool.cpp
+++ b/lib/cpp/src/transport/TSocketPool.cpp
@@ -9,7 +9,7 @@
 
 #include "TSocketPool.h"
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 using namespace std;
 
@@ -221,4 +221,4 @@
   }
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TSocketPool.h b/lib/cpp/src/transport/TSocketPool.h
index a455aca..b72dfb2 100644
--- a/lib/cpp/src/transport/TSocketPool.h
+++ b/lib/cpp/src/transport/TSocketPool.h
@@ -10,7 +10,7 @@
 #include <vector>
 #include "TSocket.h"
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
  /**
   * Class to hold server information for TSocketPool
@@ -174,7 +174,7 @@
    bool alwaysTryLast_;
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TSOCKETPOOL_H_
 
diff --git a/lib/cpp/src/transport/TTransport.h b/lib/cpp/src/transport/TTransport.h
index d775d4e..e2e30f8 100644
--- a/lib/cpp/src/transport/TTransport.h
+++ b/lib/cpp/src/transport/TTransport.h
@@ -12,7 +12,7 @@
 #include <transport/TTransportException.h>
 #include <string>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 /**
  * Generic interface for a method of transporting data. A TTransport may be
@@ -208,6 +208,6 @@
 
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TTransportException.cpp b/lib/cpp/src/transport/TTransportException.cpp
index e231a93..e48fe93 100644
--- a/lib/cpp/src/transport/TTransportException.cpp
+++ b/lib/cpp/src/transport/TTransportException.cpp
@@ -12,7 +12,7 @@
 using std::string;
 using boost::lexical_cast;
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
diff --git a/lib/cpp/src/transport/TTransportException.h b/lib/cpp/src/transport/TTransportException.h
index e254aac..d0c44cf 100644
--- a/lib/cpp/src/transport/TTransportException.h
+++ b/lib/cpp/src/transport/TTransportException.h
@@ -10,7 +10,7 @@
 #include <string>
 #include <Thrift.h>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 /**
  * Class to encapsulate all the possible types of transport errors that may
@@ -21,7 +21,7 @@
  *
  * @author Mark Slee <mcslee@facebook.com>
  */
-class TTransportException : public facebook::thrift::TException {
+class TTransportException : public apache::thrift::TException {
  public:
   /**
    * Error codes for the various types of exceptions.
@@ -39,25 +39,25 @@
   };
 
   TTransportException() :
-    facebook::thrift::TException(),
+    apache::thrift::TException(),
     type_(UNKNOWN) {}
 
   TTransportException(TTransportExceptionType type) :
-    facebook::thrift::TException(),
+    apache::thrift::TException(),
     type_(type) {}
 
   TTransportException(const std::string& message) :
-    facebook::thrift::TException(message),
+    apache::thrift::TException(message),
     type_(UNKNOWN) {}
 
   TTransportException(TTransportExceptionType type, const std::string& message) :
-    facebook::thrift::TException(message),
+    apache::thrift::TException(message),
     type_(type) {}
 
   TTransportException(TTransportExceptionType type,
                       const std::string& message,
                       int errno_copy) :
-    facebook::thrift::TException(message + ": " + TOutput::strerror_s(errno_copy)),
+    apache::thrift::TException(message + ": " + TOutput::strerror_s(errno_copy)),
     type_(type) {}
 
   virtual ~TTransportException() throw() {}
@@ -100,6 +100,6 @@
 
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_
diff --git a/lib/cpp/src/transport/TTransportUtils.cpp b/lib/cpp/src/transport/TTransportUtils.cpp
index d365a3c..6ce0c1a 100644
--- a/lib/cpp/src/transport/TTransportUtils.cpp
+++ b/lib/cpp/src/transport/TTransportUtils.cpp
@@ -8,7 +8,7 @@
 
 using std::string;
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 uint32_t TPipedTransport::read(uint8_t* buf, uint32_t len) {
   uint32_t need = len;
@@ -162,4 +162,4 @@
   srcTrans_->seekToEnd();
 }
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TTransportUtils.h b/lib/cpp/src/transport/TTransportUtils.h
index 61f6822..50ce859 100644
--- a/lib/cpp/src/transport/TTransportUtils.h
+++ b/lib/cpp/src/transport/TTransportUtils.h
@@ -16,7 +16,7 @@
 #include <transport/TBufferTransports.h>
 #include <transport/TFileTransport.h>
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 /**
  * The null transport is a dummy transport that doesn't actually do anything.
@@ -274,6 +274,6 @@
   }
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_
diff --git a/lib/cpp/src/transport/TZlibTransport.cpp b/lib/cpp/src/transport/TZlibTransport.cpp
index c14b039..7519d96 100644
--- a/lib/cpp/src/transport/TZlibTransport.cpp
+++ b/lib/cpp/src/transport/TZlibTransport.cpp
@@ -12,7 +12,7 @@
 
 using std::string;
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 // Don't call this outside of the constructor.
 void TZlibTransport::initZlib() {
@@ -283,4 +283,4 @@
 }
 
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TZlibTransport.h b/lib/cpp/src/transport/TZlibTransport.h
index c2c1849..482bfda 100644
--- a/lib/cpp/src/transport/TZlibTransport.h
+++ b/lib/cpp/src/transport/TZlibTransport.h
@@ -12,7 +12,7 @@
 
 struct z_stream_s;
 
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
 
 class TZlibTransportException : public TTransportException {
  public:
@@ -202,6 +202,6 @@
   struct z_stream_s* wstream_;
 };
 
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
 
 #endif // #ifndef _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_
diff --git a/test/Benchmark.cpp b/test/Benchmark.cpp
index af118ee..0f79976 100644
--- a/test/Benchmark.cpp
+++ b/test/Benchmark.cpp
@@ -32,8 +32,8 @@
 int main() {
   using namespace std;
   using namespace thrift::test::debug;
-  using namespace facebook::thrift::transport;
-  using namespace facebook::thrift::protocol;
+  using namespace apache::thrift::transport;
+  using namespace apache::thrift::protocol;
   using namespace boost;
 
   OneOfEach ooe;
@@ -79,7 +79,7 @@
       TBinaryProtocol prot(buf2);
       ooe2.read(&prot);
 
-      //cout << facebook::thrift::ThriftDebugString(ooe2) << endl << endl;
+      //cout << apache::thrift::ThriftDebugString(ooe2) << endl << endl;
     }
     cout << " Read: " << num / (1000 * timer.frame()) << " kHz" << endl;
   }
diff --git a/test/DebugProtoTest.cpp b/test/DebugProtoTest.cpp
index 98ff43c..48aaeaa 100644
--- a/test/DebugProtoTest.cpp
+++ b/test/DebugProtoTest.cpp
@@ -20,7 +20,7 @@
   ooe.some_characters  = "Debug THIS!";
   ooe.zomg_unicode     = "\xd7\n\a\t";
 
-  cout << facebook::thrift::ThriftDebugString(ooe) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(ooe) << endl << endl;
 
 
   Nesting n;
@@ -36,7 +36,7 @@
   n.my_bonk.type    = 31337;
   n.my_bonk.message = "I am a bonk... xor!";
 
-  cout << facebook::thrift::ThriftDebugString(n) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(n) << endl << endl;
 
 
   HolyMoley hm;
@@ -79,7 +79,7 @@
   stage2.back().message = "nevermore";
   hm.bonks["poe"] = stage2;
 
-  cout << facebook::thrift::ThriftDebugString(hm) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(hm) << endl << endl;
 
 
   return 0;
diff --git a/test/DenseProtoTest.cpp b/test/DenseProtoTest.cpp
index 68b5df9..d65a6c1 100644
--- a/test/DenseProtoTest.cpp
+++ b/test/DenseProtoTest.cpp
@@ -41,8 +41,8 @@
   using std::endl;
   using boost::shared_ptr;
   using namespace thrift::test::debug;
-  using namespace facebook::thrift::transport;
-  using namespace facebook::thrift::protocol;
+  using namespace apache::thrift::transport;
+  using namespace apache::thrift::protocol;
 
 
   OneOfEach ooe;
@@ -56,7 +56,7 @@
   ooe.some_characters  = "Debug THIS!";
   ooe.zomg_unicode     = "\xd7\n\a\t";
 
-  //cout << facebook::thrift::ThriftDebugString(ooe) << endl << endl;
+  //cout << apache::thrift::ThriftDebugString(ooe) << endl << endl;
 
 
   Nesting n;
@@ -72,7 +72,7 @@
   n.my_bonk.type    = 31337;
   n.my_bonk.message = "I am a bonk... xor!";
 
-  //cout << facebook::thrift::ThriftDebugString(n) << endl << endl;
+  //cout << apache::thrift::ThriftDebugString(n) << endl << endl;
 
 
   HolyMoley hm;
@@ -115,7 +115,7 @@
   stage2.back().message = "nevermore";
   hm.bonks["poe"] = stage2;
 
-  //cout << facebook::thrift::ThriftDebugString(hm) << endl << endl;
+  //cout << apache::thrift::ThriftDebugString(hm) << endl << endl;
 
   shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
   shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
diff --git a/test/JSONProtoTest.cpp b/test/JSONProtoTest.cpp
index eb7f416..30652760 100644
--- a/test/JSONProtoTest.cpp
+++ b/test/JSONProtoTest.cpp
@@ -8,8 +8,8 @@
   using std::cout;
   using std::endl;
   using namespace thrift::test::debug;
-  using facebook::thrift::transport::TMemoryBuffer;
-  using facebook::thrift::protocol::TJSONProtocol;
+  using apache::thrift::transport::TMemoryBuffer;
+  using apache::thrift::protocol::TJSONProtocol;
 
   OneOfEach ooe;
   ooe.im_true   = true;
@@ -22,7 +22,7 @@
   ooe.some_characters  = "JSON THIS! \"\1";
   ooe.zomg_unicode     = "\xd7\n\a\t";
   ooe.base64 = "\1\2\3\255";
-  cout << facebook::thrift::ThriftJSONString(ooe) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(ooe) << endl << endl;
 
 
   Nesting n;
@@ -38,7 +38,7 @@
   n.my_bonk.type    = 31337;
   n.my_bonk.message = "I am a bonk... xor!";
 
-  cout << facebook::thrift::ThriftJSONString(n) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(n) << endl << endl;
 
 
   HolyMoley hm;
@@ -81,7 +81,7 @@
   stage2.back().message = "nevermore";
   hm.bonks["poe"] = stage2;
 
-  cout << facebook::thrift::ThriftJSONString(hm) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(hm) << endl << endl;
 
   boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
   boost::shared_ptr<TJSONProtocol> proto(new TJSONProtocol(buffer));
@@ -117,7 +117,7 @@
   dub.small = 1E-305;
   dub.zero = 0.0;
   dub.negzero = -0.0;
-  cout << facebook::thrift::ThriftJSONString(dub) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(dub) << endl << endl;
 
   cout << "Testing base" << endl;
 
diff --git a/test/OptionalRequiredTest.cpp b/test/OptionalRequiredTest.cpp
index c3fbfd1..028ca77 100644
--- a/test/OptionalRequiredTest.cpp
+++ b/test/OptionalRequiredTest.cpp
@@ -11,9 +11,9 @@
 using std::map;
 using std::string;
 using namespace thrift::test;
-using namespace facebook::thrift;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::protocol;
+using namespace apache::thrift;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::protocol;
 
 
 /*
diff --git a/test/ReflectionTest.cpp b/test/ReflectionTest.cpp
index d60b52c..c670c82 100644
--- a/test/ReflectionTest.cpp
+++ b/test/ReflectionTest.cpp
@@ -7,13 +7,13 @@
   using std::cout;
   using std::endl;
 
-  facebook::thrift::reflection::limited::Service srv1;
+  apache::thrift::reflection::limited::Service srv1;
   thrift::test::debug::PartiallyReflectableIf::getStaticLimitedReflection(srv1);
-  cout << facebook::thrift::ThriftDebugString(srv1) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(srv1) << endl << endl;
 
-  facebook::thrift::reflection::limited::Service srv2;
+  apache::thrift::reflection::limited::Service srv2;
   test::stress::ServiceIf::getStaticLimitedReflection(srv2);
-  cout << facebook::thrift::ThriftDebugString(srv2) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(srv2) << endl << endl;
 
   return 0;
 }
diff --git a/test/TBufferBaseTest.cpp b/test/TBufferBaseTest.cpp
index cd394b2..ac7e9cb 100644
--- a/test/TBufferBaseTest.cpp
+++ b/test/TBufferBaseTest.cpp
@@ -6,10 +6,10 @@
 
 using std::string;
 using boost::shared_ptr;
-using facebook::thrift::transport::TMemoryBuffer;
-using facebook::thrift::transport::TBufferedTransport;
-using facebook::thrift::transport::TFramedTransport;
-using facebook::thrift::transport::test::TShortReadTransport;
+using apache::thrift::transport::TMemoryBuffer;
+using apache::thrift::transport::TBufferedTransport;
+using apache::thrift::transport::TFramedTransport;
+using apache::thrift::transport::test::TShortReadTransport;
 
 #define foreach BOOST_FOREACH
 
diff --git a/test/TFDTransportTest.cpp b/test/TFDTransportTest.cpp
index dfc2d27..5e7e032 100644
--- a/test/TFDTransportTest.cpp
+++ b/test/TFDTransportTest.cpp
@@ -2,8 +2,8 @@
 #include <stdexcept>
 #include <Thrift.h>
 #include <transport/TFDTransport.h>
-using facebook::thrift::transport::TTransportException;
-using facebook::thrift::transport::TFDTransport;
+using apache::thrift::transport::TTransportException;
+using apache::thrift::transport::TFDTransport;
 
 class DummyException : std::exception {
 };
diff --git a/test/TMemoryBufferTest.cpp b/test/TMemoryBufferTest.cpp
index 4614196..61f7ecf 100644
--- a/test/TMemoryBufferTest.cpp
+++ b/test/TMemoryBufferTest.cpp
@@ -9,8 +9,8 @@
 BOOST_AUTO_TEST_SUITE( TMemoryBufferTest )
 
 BOOST_AUTO_TEST_CASE( test_roundtrip ) {
-    using facebook::thrift::transport::TMemoryBuffer;
-    using facebook::thrift::protocol::TBinaryProtocol;
+    using apache::thrift::transport::TMemoryBuffer;
+    using apache::thrift::protocol::TBinaryProtocol;
     using boost::shared_ptr;
 
     shared_ptr<TMemoryBuffer> strBuffer(new TMemoryBuffer());
@@ -36,7 +36,7 @@
 
 BOOST_AUTO_TEST_CASE( test_copy )
   {
-    using facebook::thrift::transport::TMemoryBuffer;
+    using apache::thrift::transport::TMemoryBuffer;
     using std::string;
     using std::cout;
     using std::endl;
@@ -62,8 +62,8 @@
 
 BOOST_AUTO_TEST_CASE( test_exceptions )
   {
-    using facebook::thrift::transport::TTransportException;
-    using facebook::thrift::transport::TMemoryBuffer;
+    using apache::thrift::transport::TTransportException;
+    using apache::thrift::transport::TMemoryBuffer;
     using std::string;
 
     char data[] = "foo\0bar";
diff --git a/test/TPipedTransportTest.cpp b/test/TPipedTransportTest.cpp
index 06950ea..991032a 100644
--- a/test/TPipedTransportTest.cpp
+++ b/test/TPipedTransportTest.cpp
@@ -5,9 +5,9 @@
 #include <transport/TBufferTransports.h>
 using namespace std;
 using boost::shared_ptr;
-using facebook::thrift::transport::TTransportException;
-using facebook::thrift::transport::TPipedTransport;
-using facebook::thrift::transport::TMemoryBuffer;
+using apache::thrift::transport::TTransportException;
+using apache::thrift::transport::TPipedTransport;
+using apache::thrift::transport::TMemoryBuffer;
 
 int main() {
   shared_ptr<TMemoryBuffer> underlying(new TMemoryBuffer);
diff --git a/test/ThriftTest_extras.cpp b/test/ThriftTest_extras.cpp
index aa761a8..6a56d31 100644
--- a/test/ThriftTest_extras.cpp
+++ b/test/ThriftTest_extras.cpp
@@ -7,7 +7,7 @@
 namespace thrift { namespace test {
 
 bool Insanity::operator<(thrift::test::Insanity const& other) const {
-  using facebook::thrift::ThriftDebugString;
+  using apache::thrift::ThriftDebugString;
   return ThriftDebugString(*this) < ThriftDebugString(other);
 }
 
diff --git a/test/ZlibTest.cpp b/test/ZlibTest.cpp
index 08ec174..3084728 100644
--- a/test/ZlibTest.cpp
+++ b/test/ZlibTest.cpp
@@ -147,7 +147,7 @@
 int main() {
   using namespace std;
   using namespace boost;
-  using namespace facebook::thrift::transport;
+  using namespace apache::thrift::transport;
 
   char *file_names[] = {
     // Highly compressible.
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index 8529938..5350297 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -13,9 +13,9 @@
 
 using namespace boost;
 using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
 using namespace thrift::test;
 
 //extern uint32_t g_socket_syscalls;
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp
index 602f454..56068f1 100644
--- a/test/cpp/src/TestServer.cpp
+++ b/test/cpp/src/TestServer.cpp
@@ -19,11 +19,11 @@
 using namespace std;
 using namespace boost;
 
-using namespace facebook::thrift;
-using namespace facebook::thrift::concurrency;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
+using namespace apache::thrift;
+using namespace apache::thrift::concurrency;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
 
 using namespace thrift::test;
 
@@ -223,7 +223,7 @@
   }
 
   void testException(const std::string &arg)
-    throw(Xception, facebook::thrift::TException)
+    throw(Xception, apache::thrift::TException)
   {
     printf("testException(%s)\n", arg.c_str());
     if (arg.compare("Xception") == 0) {
@@ -232,7 +232,7 @@
       e.message = arg;
       throw e;
     } else if (arg.compare("ApplicationException") == 0) {
-      facebook::thrift::TException e;
+      apache::thrift::TException e;
       throw e;
     } else {
       Xtruct result;
diff --git a/test/cpp/src/main.cpp b/test/cpp/src/main.cpp
index 78491d6..d0a3cd2 100644
--- a/test/cpp/src/main.cpp
+++ b/test/cpp/src/main.cpp
@@ -28,11 +28,11 @@
 using namespace std;
 using namespace boost;
 
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 using namespace test::stress;
 
diff --git a/test/cpp/src/nb-main.cpp b/test/cpp/src/nb-main.cpp
index 164febb..188c440 100644
--- a/test/cpp/src/nb-main.cpp
+++ b/test/cpp/src/nb-main.cpp
@@ -32,11 +32,11 @@
 using namespace std;
 using namespace boost;
 
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 using namespace test::stress;
 
diff --git a/test/threads/ThreadsClient.cpp b/test/threads/ThreadsClient.cpp
index 7ad6f00..24a1540 100644
--- a/test/threads/ThreadsClient.cpp
+++ b/test/threads/ThreadsClient.cpp
@@ -11,11 +11,11 @@
 #include <thrift/concurrency/PosixThreadFactory.h>
 
 using boost::shared_ptr;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 int main(int argc, char **argv) {
   int port = 9090;
diff --git a/test/threads/ThreadsServer.cpp b/test/threads/ThreadsServer.cpp
index 826bbdb..c4ce2c9 100644
--- a/test/threads/ThreadsServer.cpp
+++ b/test/threads/ThreadsServer.cpp
@@ -12,11 +12,11 @@
 #include <thrift/concurrency/PosixThreadFactory.h>
 
 using boost::shared_ptr;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 
 class ThreadsTestHandler : virtual public ThreadsTestIf {
diff --git a/tutorial/cpp/CppClient.cpp b/tutorial/cpp/CppClient.cpp
index a21125b..da77c7d 100644
--- a/tutorial/cpp/CppClient.cpp
+++ b/tutorial/cpp/CppClient.cpp
@@ -9,9 +9,9 @@
 #include "../gen-cpp/Calculator.h"
 
 using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
 
 using namespace tutorial;
 using namespace shared;
diff --git a/tutorial/cpp/CppServer.cpp b/tutorial/cpp/CppServer.cpp
index 3be19c0..a2c30d2 100644
--- a/tutorial/cpp/CppServer.cpp
+++ b/tutorial/cpp/CppServer.cpp
@@ -14,10 +14,10 @@
 #include "../gen-cpp/Calculator.h"
 
 using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
 
 using namespace tutorial;
 using namespace shared;