Challenge Overview
Project Overview
As you might have already known, TopCoder is now part of Appirio, creating the world's largest professional development and design commuity. TopCoder and CloudSpokes will eventually be merged together, and one of the very first steps is to merge the user accounts of two platforms.
For this contest, we are going to implement a loader that will load CloudSpokes user data into TopCoder's user database.
Competition Task Overview
The purpose of this contest is to implement a loader to load CloudSpokes user data into TopCoder's user database.
Source & Destination
The source from which to load CloudSpokes user data will be a CSV file. The destination should be TopCoder's user database which includes multiple tables, you should analyze the provided mapping file and query to figure out which exact tables are affected. We'll also provide sample CSV data.
For userid in CloudSpokes we'll store to user.open_id, also there is create_date, we'll store to user.create_date. We will set status as ‘U’ and store ‘cloudspokes’ as user.reg_source.
We also want to auto check them for 'I want to use direct' ,'I want to compete' and 'I want to compete studio', mappings for these will be provided during the contest.
These could be good references to find out which tables are used by TopCoder registration / profile pages:
- In com/topcoder/web/reg/
controller and com/topcoder/web/reg/view, we have the classes and jsp to update/create user profile. These are used in the registration process and update profile process. - In com/topcoder/web/tc/
controller/request/statistics/ MemberProfile.java and com/topcoder/web/tc/view/ request/statistics/ MemberProfile*.jsp, we have the class and jsp to view user profile. User profile is accessed in various places, the other one that I can think of now is the 'My TopCoder', for which the source locates at com/topcoder/web/tc/ controller/request/myhome/ - Query query_Coder_Data.txt could be a useful reference too.
Conflicts
There might be conflicts when loading the data from CloudSpokes (i.e. same username/handle or same email), in such cases we don't want to import the conflict records into TopCoder's user database, instead you should write the conflicts into a human readable text file.
Errors
Unexpected errors should not cause the whole loading process to fail, instead rows/records that caused errors should be logged and the loader should continue with the remaining records.
Progress
While loading the data, the tool should show some progress (in console).
Report
After the loader is done with loading the data, we need to see a report of the results (for example: how many records are imported, how many fail and which exact ones fail, etc...)
Logging
The tool should log detailed debug/warn/error info during the load process.
Command Line
The loader should be implemented as a command line application using Java, and it should support at least the following command line options:
- Test Run: this option will test the loader to perform a test run, i.e. it will not insert anything into the database but will generate the conflicts file and report stated above.
- Source CSV File: the path of the source CSV file. This is a required parameter.
- Output Directory: the path of the folder to which the conflicts file and report will be written. This is a required parameter.
- Help: this option should print the usage of the command line application.
SVN
Please email support@topcoder.com to request access to direct trunk, please include the contest title/link and your user name in the email.
Trunk: https://coder.topcoder.com/internal/web_module/trunk/src/main/com/topcoder/utilities/dwload/cloudspokes
DB Trunk: https://coder.topcoder.com/internal/database/scripts/trunk
TC Web: https://coder.topcoder.com/internal/web_module/trunk
VM
VM specific information is found here: http://www.topcoder.com/wiki/display/docs/VM+Image+2.5.
Upon registration as a submitter or reviewer you will need to request a VM based on the new TopCoder Cockpit/Direct image. To request your image, please use the forum.
Before requesting your VM, you need to ensure that you have an SSH key created and in your member profile. Instructions to do so are here:http://www.topcoder.com/wiki/display/projects/Generate+SSH+Key, and instructions to connect afterwards are here: http://www.topcoder.com/wiki/display/projects/Connect+Using+SSH+Key.
There is a TC Site Resource page that contains documentation / instructions for the VM instance you will be issued upon request. It is located here:http://www.topcoder.com/wiki/display/projects/Cockpit%2CDirect+VM
Technology Overview
- Java 1.5
- CSV
- JSP
- Struts 2
- Redhat Linux
- JBoss 4.0.2
- Informix 10.0
Final Submission Guidelines
Submission Deliverables
- Source code which are necessary to meet all the requirements stated above.
- The competitor should provide a deployment document. This document should include a step-by-step guide on how to use and verify the tool.
- Test data to verify your submission.
Final Submission
For each member, the final submission should be uploaded to the Online Review Tool.