In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to use asynchronous query in hive, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.
Hive 12 and beyond, you can use asynchronous queries
The rbhive1.0 support functions for this are as follows
# 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 endend endendbegin abc_function () rescue Exception = > e puts "# {e}" puts "# {e.backtrace}" end Thank you for reading this article carefully I hope the article "how to use asynchronous query in hive" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.