thrift

Thrift JS compatibility with Cassandra (JSON Protocol)

北战南征 提交于 2019-12-08 02:43:25
问题 I have generated a Thrift lib for Cassandra targeting JavaScript from the latest Thrift build in SVN. However, I noticed in the provided js thrift client library the following statement: This client can only speak the JSON Protocol and the only supported transport is AJAX. Does anyone know if the JSON protocol is compatible with Cassandra? The transport is not an issue as I am planning on porting this to use a node.js socket, but I need to know if the JSON Protocol is going to allow me to

How to run a Sqoop Import from a Hive Thrift Client to a Hive Thrift Server?

柔情痞子 提交于 2019-12-07 22:42:53
问题 Using JDBC I easily connected and able to Run Hive-QL query with the following sample code:- Connection con = DriverManager.getConnection("jdbc:hive2://192.168.56.102:10000/default", "", ""); Statement stmt = con.createStatement(); String tableName = "testHiveDriverTable1"; stmt.executeQuery("create table " + tableName + " (key int, value string)"); This means I am able to communicate with Hive. Now I want to execute sqoop also. How can I do it? I did it through command line, see following

SparkSQL使用之Thrift JDBC server

白昼怎懂夜的黑 提交于 2019-12-07 19:22:18
Thrift JDBC Server描述 Thrift JDBC Server使用的是HIVE0.12的HiveServer2实现。能够使用Spark或者hive0.12版本的beeline脚本与JDBC Server进行交互使用。Thrift JDBC Server默认监听端口是10000。 使用Thrift JDBC Server前需要注意: 1、将hive-site.xml配置文件拷贝到$SPARK_HOME/conf目录下; 2、需要在$SPARK_HOME/conf/spark-env.sh中的SPARK_CLASSPATH添加jdbc驱动的jar包 export SPARK_CLASSPATH=$SPARK_CLASSPATH:/home/hadoop/software/mysql-connector-java-5.1.27-bin.jar Thrift JDBC Server命令使用帮助: cd $SPARK_HOME/ sbin start -thriftserver. sh --help Usage: ./sbin/start- thriftserver [options] [thrift server options] Spark assembly has been built with Hive, including Datanucleus jars on

Apache Thrift: Serializing data

ぐ巨炮叔叔 提交于 2019-12-07 18:20:27
RELATED QUESTION: Can I directly serialize to a file using PHP's thrift library? I have to use apache thrift to integrate two systems. But instead of the usual, which have a client / server files that communicates with each other (like the thrift examples). The application must generate a zip file with the thrift entries serialized in order to be imported on the other application manually. So there's no direct communication at all. I need to to this in PHP and all I have is a Java example which have the following code: package br.gov.saude.esus.transport.test; import java.io

thrift: changing from tSimpleServer to TNonblockingServer

天涯浪子 提交于 2019-12-07 17:18:49
问题 I have a simple thrift server: shared_ptr<TProcessor> processor(new MyProcessor(handlerTrace)); shared_ptr<TServerTransport> serverTransport(new TServerSocket(port)); shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory()); shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory()); TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); and able to connect with the following lines: boost::shared_ptr<TSocket> socket(new

Thrift Java server OutOfMemoryError with Javascript client

霸气de小男生 提交于 2019-12-07 16:30:59
问题 I started learning thrift yesterday. After a lot of effort, I successfully executed the Java tutorial. Java server and client are running perfectly. But now, I want a javascript client to communicate with Java Thrift server. For that, I moved all js files in js/ folder. And paste index.html code as below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta

用thrift实现多语言相互调用

早过忘川 提交于 2019-12-07 13:53:11
一、ubuntu下thrift的安装 1.下载源代码 http://thrift.apache.org/download/ 下载最新版本 thrift-0.8.0.tar.gz 2.安装boost库 sudo apt-get install libboost-dev libboost-dbg libboost-doc bcp libboost-* 3.安装其他相关工具包 sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev ant 如果需要支持java,需要安装jdk,配置java环境变量。 4.解压文件,进入目录thrift-0.8.0安装 ./configure --with-cpp --with-boost --without-python --without-csharp --with-java --without-erlang --without-perl --with-php --without-php_extension --without-ruby --without-haskell --without-go make sudo

Linux 安装 Scribe

我与影子孤独终老i 提交于 2019-12-07 13:19:33
序言 它能够从各种日志源上收集日志,存储到一个中央存储系统(可以是 NFS ,分布式文件系统等)上,以便于进行集中统计分析处理。 源码安装 1、前提准备 Scibe 需要下面的依赖库,执行下面命令 yum -y install gcc gcc-c++ m4 autoconf automake libtool libicu-devel python-devel libevent-devel byacc flex 下面的比较全,不放心的话可以直接执行下面的 yum install gcc-c++ libevent libevent-devel automake autoconf m4 bison zlib zlib-devel bzip2 bzip2-devel flex pkgconfig python python-devel ruby ruby-devel mono-devel libxml2 libxml2-devel ant openssl-devel 刷新动态链接库 /sbin/ldconfig 2、准备安装包 演示如下版本 3、安装boost t ar -zxvf boost_1_44_0.tar.gz cd boost_1_44_0 ./bootstrap.sh --prefix=/usr/local/boost ./bjam -s HAVE_ICU=1 -

分布式日志收集系统: Facebook Scribe

雨燕双飞 提交于 2019-12-07 13:16:58
以下是我在公司内部分享的关于分布式日志收集系统的PPT内容,现在与大家分享,希望对于需要使用的人能够起到基本的入门作用或是了解! 1.分布式日志收集系统:背景介绍 许多公司的平台每天会产生大量的日志(一般为流式数据,如,搜索引擎的pv,查询等),处理这些日志需要特定的日志系统,一般而言,这些系统需要具有以下特征: (1) 构建应用系统和分析系统的桥梁,并将它们之间的关联解耦; (2) 支持近实时的在线分析系统和类似于Hadoop之类的离线分析系统; (3) 具有高可扩展性。即:当数据量增加时,可以通过增加节点进行水平扩展。 2.分布式日志收集系统:Facebook Scribe主要内容 (1)Scribe简介及系统架构 (2)Scribe技术架构 (3)Scribe部署结构 (4)Scribe主要功能和使用方案 (5)Scribe的具体应用实例 (6)Scribe的扩展 (7)Scribe研究体会 3.Scribe简介 Scribe是facebook开源的日志收集系统,在facebook内部已经得到大量的应用。 Scribe是基于一个使用非阻断C++服务器的thrift服务的实现。它能够从各种日志源上收集日志,存储到一个中央存储系统 (可以是NFS,分布式文件系统等)上,以便于进行集中统计分析处理。它为日志的“分布式收集,统一处理”提供了一个可扩展的,高容错的方案。 4

详解RPC远程调用和消息队列MQ的区别

南笙酒味 提交于 2019-12-07 08:50:38
什么是RPC RPC(Remote Procedure Call)远程过程调用,主要解决远程通信间的问题,不需要了解底层网络的通信机制。 RPC服务框架有哪些 知名度较高的有Thrift(FB的)、dubbo(阿里的) RPC的一般需要经历4个步骤: 1、建立通信 首先要解决通讯的问题:即A机器想要调用B机器,首先得建立起通信连接,主要是通过在客户端和服务器之间建立TCP连接。 2、服务寻址 要解决寻址的问题,A服务器上如何连接到B服务器(如主机或IP地址)以及特定的端口,方法的名称是什么。 3、网络传输 1)序列化 当A服务器上的应用发起一个RPC调用时,调用方法和参数数据都需要先进行序列化。 2)反序列化 当B服务器接收到A服务器的请求之后,又需要对接收到的参数等信息进行反序列化操作。 4、服务调用 B服务器进行本地调用(通过代理Proxy)之后得到了返回值,此时还需要再把返回值发送回A服务器,同样也需要经过序列化操作,然后再经过网络传输将二进制数据发送回A服务器。 通常,一次完整的PRC调用需要经历如上4个步骤。 MQ(消息队列) 消息队列(MQ)是一种能实现生产者到消费者单向通信的通信模型,一般来说是指实现这个模型的中间件。 典型的特点: 1、解耦 2、可靠投递 3、广播 4、最终一致性 5、流量削峰 6、消息投递保证 7、异步通信(支持同步) 8、提高系统吞吐、健壮性