# proj24 **Repository Path**: cui-shang/proj24 ## Basic Information - **Project Name**: proj24 - **Description**: 24上项目 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-14 - **Last Updated**: 2024-06-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1、启动hadoop集群 2、将proj24代码打包为Jar,上传到hadoop集群之中 3、将欲分析数据上传到hdfs根目录 4、启动hadoop集群,然后 cd /usr/local/hadoop-2.9.2/sbin 5、在hadoop中输入指令执行对应功能,指令列表如下: 查询新发行歌曲: hadoop jar proj24.jar com.qdu.recent.RecentDriver100 /input/songs /output/recent 按语言搜索歌曲: hadoop jar proj24.jar com.qdu.searchbylang.SearchByLangDriver200 /input/songs /output/sbl <待查询语言编号> 查询用户的偏好歌曲: hadoop jar proj24.jar com.qdu.favoritesongs.FavoriteSongsDriver300 /input/actions /output/fvs <待查询用户id> 例:9b6385fca0d2412b5eef5051fe8d94b3 查询用户的偏好歌手: hadoop jar proj24.jar com.qdu.favoritesinger.JoinDriver400 /input/songs /input/actions /output/fvl0 <待查询用户id> 例:f6a071bbe24fa52ce013f1adf182e7fc hadoop jar proj24.jar com.qdu.favoritesinger.SingerDriver401 /output/fvl0 /output/fvl1 6、此时数据在hdfs上,用IntelliJ IDEA打开toSQL,创建数据库连接,Database栏写数据库名称 7、启动功能将对应结果存入数据库: 查询新发行歌曲:RecentToSQL100 按语言搜索歌曲:SearchByLangToSQL200 查询用户的偏好歌曲:FavoriteSongsToSQL300 查询用户的偏好歌手:SingerToSQL401