commit | 956fa920303cd0729ce4c5ed4c016c1c1c80874b | [log] [tgz] |
---|---|---|
author | Fabio Ponciroli <ponch78@gmail.com> | Tue Dec 19 11:28:44 2017 +0100 |
committer | ponch78 <ponch78@gmail.com> | Fri Dec 22 10:04:25 2017 -0500 |
tree | 79e51a3ef397a6fa507302ae9989377b8a4f8457 | |
parent | c5618617714001cab0077b1ddeb8fa98f881354f [diff] |
Projects overview dashboard It includes the following visualization: * overall statistic gauge * commits per day * commits per author * commits per organization * authors stats table * organizations stats table * projects stats table * authors activities heatmap Change-Id: I7909a4164c457465d19b2fcd35280e43ddb14452
Spark ETL to extra analytics data from Gerrit Projects.
Job can be launched with the following parameters:
bin/spark-submit \ --conf spark.es.nodes=es.mycompany.com \ --conf spark.es.net.http.auth.user=elastic \ --conf spark.es.net.http.auth.pass=changeme \ $JARS/SparkAnalytics-assembly-1.0.jar \ --since 2000-06-01 \ --aggregate email_hour \ --url http://gerrit.mycompany.com \ -e gerrit/analytics
since, until, aggregate are the same defined in Gerrit Analytics plugin see: https://gerrit.googlesource.com/plugins/analytics/+/master/README.md
-u --url Gerrit server URL with the analytics plugins installed
-p --prefix (optional) Projects prefix. Limit the results to those projects that start with the specified prefix.
-e --elasticIndex specify as / to be loaded in Elastic Search if not provided no ES export will be performed
-o --out folder location for storing the output as JSON files if not provided data is saved to /analytics- where is the system temporary directory
-a --email-aliases (optional) “emails to author alias” input data path.
CSVs with 3 columns are expected in input.
Here an example of the required files structure:
author,email,organization John Smith,john@email.com,John's Company John Smith,john@anotheremail.com,John's Company David Smith,david.smith@email.com,Indipendent David Smith,david@myemail.com,Indipendent
You can use the following command to quickly extract the list of authors and emails to create part of an input CSV file:
echo -e "author,email\n$(git log --pretty="%an,%ae%n%cn,%ce"|sort |uniq )" > /tmp/my_aliases.csv
Once you have it, you just have to add the organization column.
NOTE:
A docker compose file is provided to spin up an instance of Elastisearch with Kibana locally. Just run docker-compose up
.
Kibana will run on port 5601
and Elastisearch on port 9200
The Elastisearch default user is elastic
and the default password changeme
If Elastisearch dies with exit code 137
you might have to give Docker more memory (check this article for more details)