A Distributed Framework for Community Analysis in Social Networks