Giter Site home page Giter Site logo

perilousapricot / hadoop-xrootd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cerndb/hadoop-xrootd

0.0 2.0 1.0 305 KB

A library to connect an xrootd-based file system with the Hadoop ecosystem.

License: Apache License 2.0

Java 67.21% C++ 27.89% Shell 1.76% Makefile 3.14%

hadoop-xrootd's Introduction

CERN IT Hadoop-XRootD-Connector

Connector between Hadoop and XRootD protocols (EOS compatible)

Build and run PySpark Shell with XRootD-Connector

Prerequisites:

This will build the environment image and run bash shell. While in bash, run pyspark with any required packages or any other command

./run-demo.sh

while in bash shell inside the docker, you can run spark shell with connector preinstalled

/usr/lib/spark/bin/pyspark --packages org.diana-hep:spark-root_2.11:0.1.15

>>> input = "root://eospublic.cern.ch//eos/opendata/cms/MonteCarlo2012/Summer12_DR53X/DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/AODSIM/PU_RD1_START53_V7N-v1/20000/DCF94DC3-42CE-E211-867A-001E67398011.root"
>>> df = sqlContext.read.format("org.dianahep.sparkroot").option("tree", "Events").load(input)
>>> df.count()

NOTE: First run is the longest, but next attempts will be instant

Build and test XRootD-Connector in hadalytic

Prerequisites:

xrootd-client, xrootd-client-libs, xrootd-client-devel

Use "make all" command to compile

make all

Use "make test" command to run integration tests

cp EOSfs.jar /usr/lib/hadoop/share/hadoop/common/lib/EOSfs.jar
cp libjXrdCl.so /usr/lib/hadoop/lib/native/libjXrdCl.so
make test

Build and test XRootD-Connector in docker on localhost

This will build the environment image and run integration tests.

./run-docker-tests.sh

NOTE: First run is the longest, but next attempts will be instant

Documentation: Recommended

NOTE: User inside docker is different then on parent host, thus one might need to change ownership with `chown

NOTE: If you don't have connectivity inside the docker e.g. ping www.google.com please ensure that you edit /etc/docker/daemon.json with

{ 
    "dns": ["<your-cern-dns>", "8.8.8.8"] 
}

Documentation: XRootD-Connector prebuild environment

Use XRootD-Connector Docker with your gcc, java version, and hadoop versions

Build the image

docker build -t hadoop-xrootd-connector .

You can go to docker inside with bash

docker run --rm -it hadoop-xrootd-connector bash

You can then test your connector with e.g.

make clean
make all
cp /data/EOSfs.jar /usr/lib/hadoop-2.7.4/share/hadoop/common/lib/EOSfs.jar
cp /data/libjXrdCl.so /usr/lib/hadoop/lib/native/libjXrdCl.so
make clean
export EOS_debug=1
kinit <your-username>
hdfs dfs -ls root://eosuser.cern.ch/
hdfs dfs -get root://eospublic.cern.ch/eos/opendata/cms/MonteCarlo2012/Summer12_DR53X/DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/AODSIM/PU_RD1_START53_V7N-v1/20000/DCF94DC3-42CE-E211-867A-001E67398011.root /tmp/

hadoop-xrootd's People

Contributors

mevangem avatar

Watchers

Andrew Melo avatar James Cloos avatar

Forkers

onealbao

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.