Tuesday, December 27, 2011

Format Conversion

Programming Lab 3: Format Conversion
  1. This lab demonstrates how to use different map-reduce formats for input and output
  2. Also shows how to convert from one format to another
Problem to Solve
  1. We will work with one set of data OrgChart and will represent that data in a different format:
Create Project and Link with Libraries
  1. Copy provided libraries and java code from USB drives
  2. Create project in NetBeans or Eclipse
  3. Link with libraries
  4. Create new class and copy provided code
  5. Modify input and output directory
  6. Run code and examine result
  7. For detailed instructions on project creating refer to Lab1.
Task1. Parse existing Key Value Text Input
  1. We need to parse existing Key Value Text input and output it in the Key Value Text.
  2. Data representation is not going to change, but data will be sorted by its key
  3. Set proper input format
  1. Set proper output format
  1. Don’t forget to change input path to the correct path on your workstation
  2. Expected output
Task2. Generate Sequence File From Key Value Text Input
  1. We need to parse existing Key Value Text input and output it in the Sequence File
  2. Data representation is not going to change, but data item will be sorted by its key and it will be in a compressed form
  3. Set proper input format
  1. Set proper output format
  1. Enable compression
  1. Expected output will not be readable since it is compressed
Task3. Generate Map File From Key Value Text Input
  1. We need to parse existing Key Value Text input and output it in the Map File
  2. Data representation is not going to change, but data will be sorted by its key and it will be in compressed form. Also, Map file will create index for faster access of the data.
  3. Set proper input format
  1. Set proper output format
  1. Compression remains enabled
Expected output will not be readable since it is compressed and map file output will generate index file
Task4. Generate Key Value Text Format  From Map File
  1. We need to parse existing Map File and output it in the Key Value Text input
  2. Data representation is not going to change, but data will be sorted by its key and has to match the input data
  3. Keep in mind that if you keep compression enabled the data will be compressed
  4. Set proper input format
  1. Set proper output format
  1. We can choose to keep compression  enabled
Expected output will not be readable since it is compressed and map file output will generate index file
Summary
  1. This lab has demonstrated how to work with different data format
  2. You should be comfortable in using any of them

No comments:

Post a Comment