Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Running Alluxio on Hadoop 2.7

DZone's Guide to

Running Alluxio on Hadoop 2.7

Using Alluxio (formerly Tachyon) as an in-memory accelerator for Hadoop to accelerate any data access to HDFS including Hive QL queries and ODBC calls.

· Big Data Zone
Free Resource

Learn best practices according to DataOps. Download the free O'Reilly eBook on building a modern Big Data platform.

Alluxio can be installed on Vanilla Hadoop or also a distribution like Hortonworks' latest 2.4.

To get started, check out Alluxio's Getting Started Guide.

To use on HDP, you need to edit the /opt/alluxio-1.0.1/conf/alluxio-env.sh after you create it and change the port from 9000 to 8020.

Image title

You can also override at the command line:

export
ALLUXIO_UNDERFS_ADDRESS=hdfs://localhost:8020

To setup Alluxio. First download it.

bin/alluxio format[root@sandbox
alluxio-1.0.1]# bin/alluxio formatConnecting to
localhost as root...Warning: Permanently
added 'localhost' (RSA) to the list of known hosts.Formatting Alluxio
Worker @ sandbox.hortonworks.comConnection to
localhost closed.Formatting Alluxio
Master @ localhost[root@sandbox
alluxio-1.0.1]# bin/alluxio-start.sh local
Killed 0 processes
on sandbox.hortonworks.comKilled 0 processes
on sandbox.hortonworks.comConnecting to
localhost as root...Killed 0 processes
on sandbox.hortonworks.comConnection to
localhost closed.Formatting RamFS:
/mnt/ramdisk (1gb)Starting master @
localhost. Logging to /opt/alluxio-1.0.1/logsStarting worker @
sandbox.hortonworks.com. Logging to /opt/alluxio-1.0.1/logs
==>
/opt/alluxio-1.0.1/logs/user.log <==2016-05-25
17:22:45,622 INFO  logger.type
(Format.java:formatFolder) - Formatting
JOURNAL_FOLDER:/opt/alluxio-1.0.1/journal/2016-05-25
17:22:45,656 INFO  logger.type
(Format.java:formatFolder) - Formatting
BlockMaster_JOURNAL_FOLDER:/opt/alluxio-1.0.1/journal/BlockMaster2016-05-25
17:22:45,657 INFO  logger.type
(Format.java:formatFolder) - Formatting
FileSystemMaster_JOURNAL_FOLDER:/opt/alluxio-1.0.1/journal/FileSystemMaster2016-05-25
17:22:45,659 INFO  logger.type
(Format.java:formatFolder) - Formatting
LineageMaster_JOURNAL_FOLDER:/opt/alluxio-1.0.1/journal/LineageMaster
==>
/opt/alluxio-1.0.1/logs/worker.log <==2016-05-26
20:46:19,189 INFO 
server.AbstractConnector (AbstractConnector.java:doStart) - Started
SelectChannelConnector@0.0.0.0:300002016-05-26
20:46:19,189 INFO  logger.type
(UIWebServer.java:startWebServer) - Alluxio Worker Web service started @
0.0.0.0/0.0.0.0:300002016-05-26
20:46:19,191 INFO  logger.type
(AbstractClient.java:connect) - Alluxio client (version 1.0.1) is trying to
connect with BlockMasterWorker master @ sandbox.hortonworks.com/10.0.2.15:199982016-05-26
20:46:19,199 INFO  logger.type
(AbstractClient.java:connect) - Client registered with BlockMasterWorker master
@ sandbox.hortonworks.com/10.0.2.15:199982016-05-26
20:46:19,312 INFO  logger.type
(AlluxioWorker.java:start) - Started worker with id 12016-05-26
20:46:19,312 INFO  logger.type
(AlluxioWorker.java:start) - Alluxio Worker version 1.0.1 started @
sandbox.hortonworks.com/10.0.2.15:299982016-05-26
20:46:20,311 INFO  logger.type
(AbstractClient.java:connect) - Alluxio client (version 1.0.1) is trying to
connect with FileSystemMasterWorker master @
sandbox.hortonworks.com/10.0.2.15:199982016-05-26
20:46:20,311 INFO  logger.type
(AbstractClient.java:connect) - Client registered with FileSystemMasterWorker
master @ sandbox.hortonworks.com/10.0.2.15:199982016-05-26
20:46:20,313 INFO  logger.type
(AbstractClient.java:connect) - Alluxio client (version 1.0.1) is trying to
connect with FileSystemMasterWorker master @
sandbox.hortonworks.com/10.0.2.15:199982016-05-26
20:46:20,314 INFO  logger.type
(AbstractClient.java:connect) - Client registered with FileSystemMasterWorker
master @ sandbox.hortonworks.com/10.0.2.15:19998

To validate your install, run the tests:

./bin/alluxio runTests
All tests passed

Image title

You can view from the command line (http://www.alluxio.org/documentation/en/Command-Line-Interface.html)

[root@sandbox
alluxio-1.0.1]# ./bin/alluxio fs ls /default_tests_files
80.00B  05-26-2016 20:49:01:243  In Memory 
/default_tests_files/BasicFile_CACHE_PROMOTE_MUST_CACHE
84.00B  05-26-2016 20:49:02:877  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_PROMOTE_MUST_CACHE
80.00B  05-26-2016 20:49:04:432  In Memory 
/default_tests_files/BasicFile_CACHE_PROMOTE_CACHE_THROUGH
84.00B  05-26-2016 20:49:08:236  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_PROMOTE_CACHE_THROUGH
80.00B  05-26-2016 20:49:12:342  In Memory 
/default_tests_files/BasicFile_CACHE_PROMOTE_THROUGH
84.00B  05-26-2016 20:49:16:392  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_PROMOTE_THROUGH
80.00B  05-26-2016 20:49:20:851  In Memory 
/default_tests_files/BasicFile_CACHE_PROMOTE_ASYNC_THROUGH
84.00B  05-26-2016 20:49:23:190  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_PROMOTE_ASYNC_THROUGH
80.00B  05-26-2016 20:49:25:152  In Memory 
/default_tests_files/BasicFile_CACHE_MUST_CACHE
84.00B  05-26-2016 20:49:26:975  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_MUST_CACHE
80.00B  05-26-2016 20:49:28:595  In Memory 
/default_tests_files/BasicFile_CACHE_CACHE_THROUGH
84.00B  05-26-2016 20:49:32:375  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_CACHE_THROUGH
80.00B  05-26-2016 20:49:36:505  In Memory 
/default_tests_files/BasicFile_CACHE_THROUGH
84.00B  05-26-2016 20:49:40:823  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_THROUGH
80.00B  05-26-2016 20:49:44:827  In Memory 
/default_tests_files/BasicFile_CACHE_ASYNC_THROUGH
84.00B  05-26-2016 20:49:47:248  In Memory 
/default_tests_files/BasicNonByteBuffer_CACHE_ASYNC_THROUGH
80.00B  05-26-2016 20:49:49:614  In Memory 
/default_tests_files/BasicFile_NO_CACHE_MUST_CACHE
84.00B  05-26-2016 20:49:52:384  In Memory 
/default_tests_files/BasicNonByteBuffer_NO_CACHE_MUST_CACHE
80.00B  05-26-2016 20:49:55:107  In Memory 
/default_tests_files/BasicFile_NO_CACHE_CACHE_THROUGH
84.00B  05-26-2016 20:49:59:675  In Memory 
/default_tests_files/BasicNonByteBuffer_NO_CACHE_CACHE_THROUGH
80.00B  05-26-2016 20:50:03:639  Not In Memory 
/default_tests_files/BasicFile_NO_CACHE_THROUGH
84.00B  05-26-2016 20:50:07:425  Not In Memory 
/default_tests_files/BasicNonByteBuffer_NO_CACHE_THROUGH
80.00B  05-26-2016 20:50:11:384  In Memory 
/default_tests_files/BasicFile_NO_CACHE_ASYNC_THROUGH
84.00B  05-26-2016 20:50:13:310  In Memory 
/default_tests_files/BasicNonByteBuffer_NO_CACHE_ASYNC_THROUGH

You can access these files from Spark and Flink. Alluxio has configurable storage tiers (memory, HHD, SSD) and can sit on top of HDFS.

Image title

To browse the Alluxio file system and also view metrics: http://localhost:19999/home

Image title


References:

Find the perfect platform for a scalable self-service model to manage Big Data workloads in the Cloud. Download the free O'Reilly eBook to learn more.

Topics:
big data ,hadoop ,in-memory data grid ,hortonworks

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}