Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here

hive

Parallel lua states

Subscribe to updates I use hive


Statistics on hive

Number of watchers on Github 175
Number of open issues 0
Average time to close an issue less than a minute
Main language C
Average time to merge a PR about 5 hours
Open pull requests 0+
Closed pull requests 0+
Last commit over 6 years ago
Repo Created about 7 years ago
Repo Last Updated over 2 years ago
Size 333 KB
Organization / Authorcloudwu
Contributors4
Page Updated
Do you use hive? Leave a review!
View hive activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating hive for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Hive

Parallel multiple lua states , actor model for lua.

Quick Start

make and run

lua test.lua

the main logic is in test/main.lua .

You can read this blog first (http://blog.codingnow.com/2013/06/hive_lua_actor_model.html) (In Chinese)

How to Launch the hive

local hive = require "hive"

hive.start {
  thread = 4,   -- 4 worker thread, You can set more if you have more cpu core.
    main = "test.main",  -- main cell, the cell name search rule is the same with require.
}

How the cell work

Let's read test/pingpong.lua first.

local cell = require "cell"

cell.command {
  ping = function()
        cell.sleep(1)
        return "pong"
    end
}

function cell.main(...)
    print("pingpong launched")
    return ...
end

If you launch test.pingping, the function cell.main(...) will be execute first.

You can use cell.cmd(launch, test.pingpong, ...) to launch it.

test.pingpong is a simple cell that support one command 'ping'. If you send a command 'ping' to it, It will sleep 0.01 second first, and the send 'pong' back.

None-blocking socket library

Hive support none-blocking socket api that can be used in every cell.

cell.listen can be used in a server cell, the accepter will be call every time accept a new connection. You can forward the data from new connection to a new cell, or forward to itself (fork a coroutine to deliver the data).

cell.connect can be used in a client cell.

Todo

  • Multi-process support
  • Broadcast message
  • Signal for cell exit
  • Database (Redis/Mongo/SQL) driver
  • Debugger/Monitor
  • Log system (Instead of print error message)
  • Better document
  • Better samples
  • More options in hive.start
  • And more
hive questions on Stackoverflow (View All Questions)
  • How to connect Kerberized Hive via ODBC and avoid the "No credentials cache found" error
  • hive: get_json_object returns a string instead of a collection
  • JSON to HIVE ingestion
  • connect to Apache hive from perl script
  • Hive version compatibility with Spark
  • ClassCastException while de-serializing(loading into hive table) decimals written in avro schema backed Parquet format
  • Hive installation issues: Hive metastore database is not initialized
  • Autoincrement UDF works in hive but returns null in Impala
  • Hive Beeline -f option displays whole file, which is not a case in Hive CLI
  • HIVE or PIG as alternative for NETEZZA
  • Hive Partitions - How to delete null or hive_default_partition
  • How do I compile a Hive UDF
  • Hadoop and Hive transactions are crashing
  • Hive concat and then result i want from string to INT
  • Spark: Hive Insert overwrite throws ClassNotFoundException
  • how can i get current time with milliseconds while creating table in hive
  • java.lang.ClassFormatError exception is appering during hive installation
  • insert data in HDFS using Hive
  • HA job scheduling in hadoop / hive
  • query failed when quering the hive table create by using mongodb
  • Hive table created, however map task is failing with exception
  • Hive Left join returning null result whereas rows exist
  • Hive: Count non zero characters in substrings of a string
  • Too many counter groups while storing Hive partitioned table as parquet
  • flume hive sink can not work
  • How to query struct array with Hive (get_json_object)?
  • Extracting an Array of Structs in Hive
  • How to access individul elements of a blob in dynamoDb using a hive script?
  • Hive- alter a column values and insert new values in place of old column values in the table
  • Connecting to hive database from spark
hive list of languages used
Other projects in C