Giter Club home page Giter Club logo

action-core's Introduction

action-core

The action-core is an HDFS endpoint. Unlike the browser shipped with the Hadoop namenode, it integrates a de-serialization mechanism to read files content.

Usage

mvn -Daction.hadoop.namenode.url=hdfs://namenode.mycompany.com:9000 jetty:run

You can now browse HDFS:

http://127.0.0.1:8080/metrics.action/action

Query parameters

  • path: path to open in HDFS

  • range: when opening a file, bucket of lines to display (e.g. range=1-50 for the first 51 lines)

  • raw: whether to display the nice, HTML version (raw=true) or plain text (raw=false)

  • recursive: whether to craw a directory recursively. If you want to download all content under /user/pierre:

    curl 'http://127.0.0.1:8080/metrics.action/action?path=/user/pierre&recursive=true&raw=true'
    

Notes on serialization

You can specify your custom serialization classes (which implement org.apache.hadoop.io.serializer.Serialization<T>) on the command line (make sure to escape the comma):

-Daction.hadoop.io.serializations=com.mycompany.FuuBarSerialization\,org.apache.hadoop.io.serializer.WritableSerialization

The action-core implements two different row renderers, one for ThriftEnvelope (see github.com/pierre/serialization) and one for org.apache.hadoop.io.Text. This means that if you use the collector (see github.com/pierre/collector) or plain text files, the action-core should work out of the box. Otherwise, you need to implement your renderer (see com.ning.metrics.action.hdfs.data.parser.RowSerializer) and specify it on the command line, e.g.:

-Daction.hadoop.io.row.serializations=com.mycompany.FuuBarRowSerializer\,com.ning.metrics.action.hdfs.data.parser.WritableRowSerializer

Documenting schemas

When clicking on a row, an exploded content of the row is show as JSON. By default, each column is labeled as “Field_…”. This can be overridden by implementing the Registrar interface.

action-core supports out of the box Goodwill (see github.com/pierre/goodwill) which is an HTTP based type registrar.

Build

mvn package

will build a war.

License

See COPYING file.

action-core's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

strategist922

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.