1

我可以在哪里找到超表的示例代码,或者任何人都可以使用 C++ 发布超表的示例

4

3 回答 3

1

如果您的意思是超表的源代码

否则这里是手册

您可以使用此HQL 教程查看此示例

于 2011-02-19T08:15:38.153 回答
0
#ifndef BOOST_FOREACH
#define BOOST_FOREACH 0
#endif

#include "Common/Compat.h"
#include "Common/System.h"

#include <arpa/inet.h>
#include <iostream>
#include <fstream>
#include "ThriftBroker/Client.h"
#include "ThriftBroker/gen-cpp/HqlService.h"
#include "ThriftBroker/ThriftHelper.h"
#include "ThriftBroker/SerializedCellsReader.h"

using namespace Hypertable;
using namespace Hypertable::ThriftGen;

int main (int argc, char **argv)
{
    Thrift::Client *client = new Thrift::Client("localhost", 38080);
    if (!client->namespace_exists("/"))
    {
        delete client;
        return 0;
    }
   Namespace ns = client->namespace_open("/");
   HqlResult result;
   client->hql_query(result, ns, "select * from foo");
   std::cout << result << std::endl;
   client->namespace_close(ns);
   delete client;
   return 0;
}

将其和/opt/hypertable/current/include/ThriftBroker/gen-cpp文件夹下的Client_constants.cpp、Client_types.cpp、ClientService.cpp、Hql_constants.cpp、Hql_types.cpp、HqlService.cpp一起编译</p>

于 2013-09-16T02:27:03.977 回答
0

看到这个:: http://blog.hypertable.com/ 并下载超表项目:: http://www.hypertable.org/

于 2011-02-19T08:16:04.340 回答