Skip to content

Sample application reading dataset from HDFS and presenting a chart in UI

License

Notifications You must be signed in to change notification settings

iman-saleh/dataset-reader-sample

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dataset Reader

This project contains example application that is able to read a dataset from HDFS and present it in a graphical form to user.

Let's imagine flow as below:

  1. Dataset is uploaded through data catalog into the platform. The file is stored on the HDFS
  2. Data scientist does some analysis on it using ATK. The result is also stored on HDFS
  3. Application developer uploades the dataset-reader application into the platform and binds it with the file.
  4. Dataset-reader presents the dataset in a nice form of a set of charts

Compilation and running

  1. Clone this repository

git clone https://github.com/trustedanalytics/dataset-reader-sample.git

  1. Compile it using Maven

mvn compile

  1. (optional) Run it locally passing path to the file

FILE=<path_to_the_file> mvn spring-boot:run -Dspring.profiles.active=local

Pushing to the platform

  1. Make Java package

mvn package

  1. Login and set proper organization and space
cf api <platform API address>
cf login
cf target -o <organization name> -s <space name>
  1. (optional) Change the application name and host name if necessary in the manifest.yml
name: <your application name>
host: <application host name>

ℹ️ E.g. if you set host to "dataset-reader" and your platform URL is "example.com", the application will be hosted under 'dataset-reader.example.com' domain.

  1. Push dataset-reader to the platform

cf push

  1. Application will start but won't show anything, because it doesn't know which file to serve. To fix that, pass the path to the file on HDFS as a environment variable called "FILE":
cf set-env <application name> FILE <path to file on HDFS>
cf restart <application name>

About

Sample application reading dataset from HDFS and presenting a chart in UI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 59.5%
  • HTML 17.5%
  • JavaScript 12.7%
  • CSS 10.2%
  • Shell 0.1%