Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there sleep function in Hive?

Tags:

sleep

hive

hiveql

In Mysql, we can use DO sleep(5) ; to make a pause. But it did not work in Hive.

Is there any sleep function in Hive?

like image 751
Frank.Chang Avatar asked Jun 10 '26 08:06

Frank.Chang


1 Answers

You can call Thread via reflection to make hive wait for some extra time after processing each row, for instance the following query will make hive to wait for 10 seconds

select reflect("java.lang.Thread", "sleep", bigint(10000));

Not the best way but it might work.

like image 91
serge_k Avatar answered Jun 11 '26 22:06

serge_k



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!