Giter Club home page Giter Club logo

dwp.hbase-retriever's Introduction

hbase-retriever

A simple Lambda to allow clients to retrieve values from Hbase in EMR that have been written by Kafka2Hbase (see https://github.com/dwp/kafka-to-hbase).

To request a record, call the lambda with a document containing a topic and message key from Kafka. The value of that message as persisted in Hbase will be returned.

{
  "topic": "db.claimants.address",
  "key": "1c2c47d6-5b8b-4d82-929e-b5b05b1b2306"
}

If a specific version (other than "latest") is required, specify the version as a numeric timestamp.

{
  "topic": "db.claimants.address",
  "key": "1c2c47d6-5b8b-4d82-929e-b5b05b1b2306",
  "timestamp": 1563809926831
}

The returned value is the raw bytes as received from Kafka. If the integration response is set to convert to text, it will be a base64 encoded string.

Configuration

Configuration of the Lambda is done entirely via environment variables.

  • ZOOKEEPER_PARENT - set hbase.zookeeper.parent to hbase parent URI (default /hbase, aws /hbase-unsecure)
  • ZOOKEEPER_QUORUM - set hbase.zookeeper.quorum to a list of hosts (default zookeeper)
  • ZOOKEEPER_PORT - set hbase.zookeeper.port to an integer port (default 2181)
  • TABLE - the fully qualified Hbase table to read from
  • FAMILY - the column family to search for

Rows are retrieved from the configured table using the requested key. The cell value is fetched from the configured column family using the requested topic as the qualifier. If a timestamp is specified, the matching version is returned.

If no valid row is found, null is returned.

dwp.hbase-retriever's People

Contributors

steveburton4 avatar udaychokkam avatar steveburtoniw avatar danielchicot avatar dataworks-ci avatar benj-fletch avatar tea-short avatar mattburgess avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.