博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hive 12及以后,可以使用非同步查询
阅读量:6940 次
发布时间:2019-06-27

本文共 761 字,大约阅读时间需要 2 分钟。

hot3.png

hive 12及以后,可以使用非同步查询

rbhive1.0对此的支持函数如下

# encoding: UTF-8$LOAD_PATH.unshift(File.dirname(__FILE__))require 'pp'require 'rbhive'def abc_function()   RBHive.tcli_connect('1.2.3.4', 10000,{hive_version: 12, transport: :sasl, :sasl_params => {}}) do |connection|           handles =connection.async_execute('select * from abc limit 2')           state= connection.async_state(handles)           while true do            sleep 10  state= connection.async_state(handles)                if(state == :finished)  result = connection.async_fetch(handles,1000)  pp result  connection.async_close_session(handles)  break  end  end    endendbegin    abc_function()rescue Exception => e  puts "#{e}"  puts "#{e.backtrace}"end

转载于:https://my.oschina.net/forrest420/blog/339126

你可能感兴趣的文章
DLL技术应用03 - 零基础入门学习Delphi46
查看>>
壳的执行过程
查看>>
多维数组元素的地址
查看>>
动态内存管理 - C++快速入门33
查看>>
iOS 动画篇(一) Core Animation
查看>>
css背景雪碧图等
查看>>
odoo 之报date<form string=''product lc''> 错误
查看>>
leetcode34. Find First and Last Position of Element in Sorted Array
查看>>
62. Unique Paths(矩阵的总路径数)
查看>>
【巧妙的模拟】【UVA 10881】 - Piotr's Ants/Piotr的蚂蚁
查看>>
[20190402]Library Cache mutex.txt
查看>>
Swift 基本运算符
查看>>
Python strip()方法
查看>>
用父类引用指向子类好处
查看>>
图片质量压缩
查看>>
vue分页tbale小荔枝
查看>>
配合bootstrap实现的table 嵌套table
查看>>
c#.net中引入ConfigurationManager报错
查看>>
今天开通了博客
查看>>
Windows API 第16篇 GetLogicalDrivers 获取驱动器位掩码
查看>>